Class DynamicGameStateTokenResolver
A resolver for dynamic game state tokens.
Implements
Inherited Members
Namespace: Phoenix.Aruba
Assembly: Phoenix.Plugin.Aruba.dll
Syntax
public class DynamicGameStateTokenResolver : ITokenResolver
Remarks
Initializes a new instance of the DynamicGameStateTokenResolver class.
Constructors
View SourceDynamicGameStateTokenResolver(IEnumerable<IGameObjectRepositoryProvider>, IDeviceManager)
A resolver for dynamic game state tokens.
Declaration
public DynamicGameStateTokenResolver(IEnumerable<IGameObjectRepositoryProvider> repositoryProviders, IDeviceManager deviceManager)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IGameObjectRepositoryProvider> | repositoryProviders | The repository providers. |
IDeviceManager | deviceManager | The device manager. |
Remarks
Initializes a new instance of the DynamicGameStateTokenResolver class.
Fields
View SourceResolverName
The resolver name.
Declaration
public const string ResolverName = "DynamicGameState"
Field Value
Type | Description |
---|---|
string |
Properties
View SourceSupportedTokenDefinitions
Gets or sets the supported token definitions.
Declaration
public IReadOnlyCollection<BasicTokenDefinition> SupportedTokenDefinitions { get; set; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<BasicTokenDefinition> |
TokenDefinitionType
Gets the token definition type.
Declaration
public Type TokenDefinitionType { get; }
Property Value
Type | Description |
---|---|
Type |
Methods
View SourceBeginResolveTokensAsync(Guid, CancellationToken)
Resolve the tokens.
Declaration
public Task BeginResolveTokensAsync(Guid bugResolveId, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Guid | bugResolveId | The id associated with this bug. |
CancellationToken | cancellationToken | A cancellation token for the connection task. |
Returns
Type | Description |
---|---|
Task | A task. |
CreateNewTokenDefinition()
Create a new token definition.
Declaration
public BasicTokenDefinition CreateNewTokenDefinition()
Returns
Type | Description |
---|---|
BasicTokenDefinition | A dynamic game state token definition. |
CreateUserDefinedToken()
Called by the user in the UI to create a new token definition and returns it, but does not add it to the SupportedTokenDefinitions list.
Declaration
public BasicTokenDefinition? CreateUserDefinedToken()
Returns
Type | Description |
---|---|
BasicTokenDefinition | The basic token definition, if it exists. |
EndResolveTokens()
Finish resolving the tokens.
Declaration
public void EndResolveTokens()
LoadTokenDefinitionsAsync(IDataStoreProvider, bool)
Load the token definitions from the data store provider.
Declaration
public Task<List<string>?> LoadTokenDefinitionsAsync(IDataStoreProvider storeProvider, bool createDefinitionFileIfFileNotFound)
Parameters
Type | Name | Description |
---|---|---|
IDataStoreProvider | storeProvider | The store provider to load tokens from. |
bool | createDefinitionFileIfFileNotFound | Whether to create file if it doesn't already exist. |
Returns
Type | Description |
---|---|
Task<List<string>> | A list of tokens that failed to load. |
ResolveTokenAsync(string, Guid, Guid)
The resolve token.
Declaration
public Task<List<object?>?> ResolveTokenAsync(string token, Guid bugResolveId, Guid resolvePassId)
Parameters
Type | Name | Description |
---|---|---|
string | token | The token string. |
Guid | bugResolveId | The id associated with this bug. |
Guid | resolvePassId | The id associated with this resolve pass. |
Returns
Type | Description |
---|---|
Task<List<object>> | The task. |
SaveTokenDefinitionsAsync(IDataStoreProvider)
Save the token definitions.
Declaration
public Task SaveTokenDefinitionsAsync(IDataStoreProvider storeProvider)
Parameters
Type | Name | Description |
---|---|---|
IDataStoreProvider | storeProvider | The data store provider. |
Returns
Type | Description |
---|---|
Task | The task. |
ShowDynamicGameStateTokenUIAndConfigureToken(BasicTokenDefinition?)
Launches the configuration UI for a dynamic game state token.
Declaration
public static DynamicGameStateToken? ShowDynamicGameStateTokenUIAndConfigureToken(BasicTokenDefinition? tokenToConfigure = null)
Parameters
Type | Name | Description |
---|---|---|
BasicTokenDefinition | tokenToConfigure | The token to configure, if it exists. |
Returns
Type | Description |
---|---|
DynamicGameStateToken | The configured token, if the user went through the confirmation process. |
Remarks
If no token is provided, the user will have to configure a new one from scratch in the UI.