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. |
key | Name of collection. |
Read |
options | Read |
Returns
Type | Description |
---|---|
IDistributed |
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("myCache");
string dataTypeName = "DistributedQueue";
IDistributedDictionary<string, Product> dictionary = cache.DataTypeManager.GetDictionary<string, Product>(dataTypeName);