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("demoClusteredCache");
string dataTypeName = "DistributedQueue";
IDistributedDictionary<string, Product> dictionary = cache.DataTypeManager.GetDictionary<string, Product>(dataTypeName);