Method LoadNext
LoadNext(Object)
Responsible for loading of items.
Declaration
LoaderResult LoadNext(object userContext)
Parameters
Type | Name | Description |
---|---|---|
System.Object | userContext |
Returns
Type | Description |
---|---|
LoaderResult | LoaderResult |
Examples
Following examples loads product or order into cache based on the hint
OrderedDictionary orderedDictionary = new OrderedDictionary();
string key = "";
ProviderCacheItem cacheItem = null;
if (hint.Equals("Product"))
{
key = "Product";
cacheItem = new ProviderCacheItem("Product");
}
else if (hint.Equals("Order"))
{
key = "Order";
cacheItem = new ProviderCacheItem("Order");
}
orderedDictionary.Add(key, cacheItem);
LoaderResult result = new LoaderResult();
result.Data = orderedDictionary;
result.HasMoreData = false;
return result;