Method GetList
GetList<T>(String, ReadThruOptions)
Gets Distributed List interface against the provided collection name.
Declaration
IDistributedList<T> GetList<T>(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 |
---|---|
IDistributedList<T> | Interface for using List. |
Type Parameters
Name | Description |
---|---|
T | Type of List items. |
Examples
The following code sample shows how to get a Distributed List handler from cache.
ICache cache = CacheManager.GetCache("demoClusteredCache");
string dataTypeName = "DistributedList";
IDistributedList<Product> list = cache.DataTypeManager.GetList<Product>(dataTypeName);