Interface IGenericGameState
An interface used to implement IGameState using a class manager.
Inherited Members
Namespace: Microsoft.XboxStudios.GameStateTracker.Generic
Assembly: GameStateTracker.Generic.Abstractions.dll
Syntax
public interface IGenericGameState : IGameState, IState<ObjectInfo, IGameObject>, IReadOnlyCollection<IGameObject>, IEnumerable<IGameObject>, IEnumerable, IEventAggregator<IGameEventArgs>, IEventPublisher<IGameEventArgs>, IHasUpdateTime, IQueryResultConsumer<IGameObject>
Properties
View SourceClassManager
Gets a class manager storing the set of properties to retrieve for game classes.
Declaration
IClassManager ClassManager { get; }
Property Value
Type | Description |
---|---|
IClassManager |
Methods
View SourceExisting<T>(string?)
Gets a cached game object which has the given name.
Declaration
T? Existing<T>(string? objectName = null) where T : class, IGameObject
Parameters
Type | Name | Description |
---|---|---|
string | objectName | The object name to look for. |
Returns
Type | Description |
---|---|
T | A game object. |
Type Parameters
Name | Description |
---|---|
T | The game object type. |
Get<T>(string?, TimeSpan, CancellationToken)
Retrieves a game object which has the given name.
Declaration
Task<T?> Get<T>(string? objectName, TimeSpan maxAge, CancellationToken token = default) where T : class, IGameObject
Parameters
Type | Name | Description |
---|---|---|
string | objectName | The object name to look for. |
TimeSpan | maxAge | The maximum age of the object, if it exists in the cache. |
CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
Task<T> | The game object. |
Type Parameters
Name | Description |
---|---|
T | The object type. |