Class IGameObjectCacheExtensions
Extension methods for IGameObjectCache.
Inherited Members
Namespace: Microsoft.XboxStudios.GameStateTracker.Cache
Assembly: GameStateTracker.Abstractions.dll
Syntax
public static class IGameObjectCacheExtensions
Methods
View SourceClearClass(IGameObjectCache, string)
Removes all matching objects from the cache.
Declaration
public static void ClearClass(this IGameObjectCache cache, string className)
Parameters
Type | Name | Description |
---|---|---|
IGameObjectCache | cache | The cache being extended. |
string | className | The class name to search for. |
GetClassAge(IGameObjectCache, string?)
Gets the age of a set of objects in the cache.
Declaration
public static TimeSpan? GetClassAge(this IGameObjectCache cache, string? className)
Parameters
Type | Name | Description |
---|---|---|
IGameObjectCache | cache | The cache being extended. |
string | className | The class name to search for. |
Returns
Type | Description |
---|---|
TimeSpan? | The time since the objects were last refreshed. |
GetClassAge(IGameObjectCache, string?, DateTime)
Gets the age of a set of objects in the cache.
Declaration
public static TimeSpan? GetClassAge(this IGameObjectCache cache, string? className, DateTime now)
Parameters
Type | Name | Description |
---|---|---|
IGameObjectCache | cache | The cache being extended. |
string | className | The class name to search for. |
DateTime | now | The current time to compare to. |
Returns
Type | Description |
---|---|
TimeSpan? | The time since the objects were last refreshed. |
RefreshClass(IGameObjectCache, string)
Updates the age of all matching objects in the cache.
Declaration
public static void RefreshClass(this IGameObjectCache cache, string className)
Parameters
Type | Name | Description |
---|---|---|
IGameObjectCache | cache | The cache being extended. |
string | className | The class name to search for. |
RefreshClass(IGameObjectCache, string, DateTime)
Updates the age of all matching objects in the cache.
Declaration
public static void RefreshClass(this IGameObjectCache cache, string className, DateTime now)
Parameters
Type | Name | Description |
---|---|---|
IGameObjectCache | cache | The cache being extended. |
string | className | The class name to search for. |
DateTime | now | The current time to compare to. |