Interface IRosterItemCache
Encapsulates Roster item cache functionality.
Namespace: Microsoft.GNS.Roster.DataAccess
Assembly: Microsoft.GNS.Roster.DataAccess.dll
Syntax
public interface IRosterItemCache
Methods
View SourceGetCachedEnumerationAsync<TItem>(String, String, String)
Tries to get an enumeration in the cache.
Declaration
Task<IEnumerable<TItem>> GetCachedEnumerationAsync<TItem>(string enumerationType, string itemType, string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | enumerationType | A unique enumeration type name. |
System.String | itemType | A unique item type name. |
System.String | id | The unique enumeration Id. |
Returns
Type | Description |
---|---|
Task<IEnumerable<TItem>> | Returns an enumeration of |
Type Parameters
Name | Description |
---|---|
TItem | The enumeration item type. |
GetCachedItemAsync<TItem>(String, String)
Tries to get a cached item.
Declaration
Task<TItem> GetCachedItemAsync<TItem>(string itemType, string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | itemType | The item type name. |
System.String | id | Unique item Id. |
Returns
Type | Description |
---|---|
Task<TItem> | Returns the cached item or null if not found. |
Type Parameters
Name | Description |
---|---|
TItem | The item type. |
SetCacheEnumerationAsync<TItem>(String, String, String, IEnumerable<TItem>)
Sets an enumeration in the cache.
Declaration
Task SetCacheEnumerationAsync<TItem>(string enumerationType, string itemType, string id, IEnumerable<TItem> items)
where TItem : IRosterIdentity
Parameters
Type | Name | Description |
---|---|---|
System.String | enumerationType | A unique enumeration type name. |
System.String | itemType | A unique item type name. |
System.String | id | Unique enumeration Id. |
IEnumerable<TItem> | items | Items to cache. |
Returns
Type | Description |
---|---|
Task | A task representing the set the cache enumeration. |
Type Parameters
Name | Description |
---|---|
TItem | The enumeration item type. |
SetCacheItemAsync<TItem>(String, String, TItem)
Sets a item in the cache.
Declaration
Task SetCacheItemAsync<TItem>(string itemType, string id, TItem item)
Parameters
Type | Name | Description |
---|---|---|
System.String | itemType | The item type name. |
System.String | id | Unique item Id. |
TItem | item | The item to set. |
Returns
Type | Description |
---|---|
Task | A task representing the set the cache item. |
Type Parameters
Name | Description |
---|---|
TItem | The item type. |