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