Class GameClientTokenResolver
A class containing the ITokenResolver implementation.
Implements
Inherited Members
Namespace: Microsoft.Internal.Studios.Aruba.Infrastructure.Token
Assembly: Aruba.Infrastructure.dll
Syntax
public class GameClientTokenResolver : ITokenResolver
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 |
TokenDefinitions
Gets the token definitions
Declaration
public ICollection<GameClientTokenDefinitionParsed> TokenDefinitions { get; }
Property Value
Type | Description |
---|---|
ICollection<GameClientTokenDefinitionParsed> |
Methods
View SourceBeginResolveTokensAsync(Guid, List<IGameDevice>, CancellationToken)
Connects to the game client(s) given a device list.
Declaration
public Task BeginResolveTokensAsync(Guid bugResolveId, List<IGameDevice> devices, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Guid | bugResolveId | The id associated with this bug. |
List<IGameDevice> | devices | Takes a device list to setup the resolver to use a subset of game clients from those devices. |
CancellationToken | cancellationToken | A cancellation token for the connection task. |
Returns
Type | Description |
---|---|
Task | A task. |
BeginResolveTokensAsync(Guid, CancellationToken)
Connects to the game client(s).
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 Basic Token Definition.
Declaration
public BasicTokenDefinition CreateNewTokenDefinition()
Returns
Type | Description |
---|---|
BasicTokenDefinition | The created Basic 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()
Final steps for resolving tokens.
Declaration
public void EndResolveTokens()
LoadTokenDefinitionsAsync(IDataStoreProvider, bool)
Load the token definitions.
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)
Resolve the token on its target.
Declaration
public Task<List<object?>?> ResolveTokenAsync(string token, Guid bugResolveId, Guid resolvePassId)
Parameters
Type | Name | Description |
---|---|---|
string | token | The name of the token. |
Guid | bugResolveId | The id associated with this bug. |
Guid | resolvePassId | The id associated with this resolve pass. |
Returns
Type | Description |
---|---|
Task<List<object>> | A task containing the result of the resolved token. |
SaveTokenDefinitionsAsync(IDataStoreProvider)
Save the token definitions.
Declaration
public Task SaveTokenDefinitionsAsync(IDataStoreProvider storeProvider)
Parameters
Type | Name | Description |
---|---|---|
IDataStoreProvider | storeProvider | The store provider to save the tokens to. |
Returns
Type | Description |
---|---|
Task | A task. |