Method GetDictionary
GetDictionary<String, TValue>(String, ReadThruOptions)
Gets Distributed Dictionary interface against the provided collection name.
Declaration
IDistributedDictionary<string, TValue> GetDictionary<String, TValue>(string key, ReadThruOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Name of collection. |
ReadThruOptions | options | ReadThruOptions to read from data source. These can be either ReadThru, ReadThruForced or none. |
Returns
Type | Description |
---|---|
IDistributedDictionary<System.String, TValue> | Interface for using Dictionary. |
Type Parameters
Name | Description |
---|---|
String | Type of Dictionary keys. |
TValue | Type of Dictionary values. |
Examples
The following code sample shows how to get a Distributed Dictionary handler from cache.
ICache cache = CacheManager.GetCache("demoClusteredCache");
string dataTypeName = "DistributedQueue";
IDistributedDictionary<string, Product> dictionary = cache.DataTypeManager.GetDictionary<string, Product>(dataTypeName);