Show / Hide Table of Contents

Interface ITokenResolver

Interface for a class that knows how to resolve a token.

Namespace: Microsoft.Internal.Studios.Aruba.Infrastructure
Assembly: Aruba.Infrastructure.dll
Syntax
public interface ITokenResolver

Properties

View Source

SupportedTokenDefinitions

Gets or sets the list of token definitions supported by this resolver.

Declaration
IReadOnlyCollection<BasicTokenDefinition> SupportedTokenDefinitions { get; set; }
Property Value
Type Description
IReadOnlyCollection<BasicTokenDefinition>
View Source

TokenDefinitionType

Gets the Type of object used as a token definition by this resolver. This should be a subclass of BasicTokenDefinition.

Declaration
Type TokenDefinitionType { get; }
Property Value
Type Description
Type

Methods

View Source

BeginResolveTokensAsync(Guid, CancellationToken)

Allow for slow-running operations before resolving any tokens using this resolver.

Declaration
Task BeginResolveTokensAsync(Guid bugResolveId, CancellationToken cancellationToken)
Parameters
Type Name Description
Guid bugResolveId

The id associated with this bug.

CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
Task

The task.

View Source

CreateNewTokenDefinition()

Creates a new token definition and returns it, but does not add it to the SupportedTokenDefinitions list.

Declaration
BasicTokenDefinition CreateNewTokenDefinition()
Returns
Type Description
BasicTokenDefinition

The basic token definition.

View Source

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
BasicTokenDefinition? CreateUserDefinedToken()
Returns
Type Description
BasicTokenDefinition

The basic token definition, if it exists.

View Source

EndResolveTokens()

Called when token-resolution is done. Guaranteed to be called once after each BeginResolveTokensAsync(Guid, CancellationToken).

Declaration
void EndResolveTokens()
View Source

LoadTokenDefinitionsAsync(IDataStoreProvider, bool)

Load token definitions from the given IDataStoreProvider

Declaration
Task<List<string>?> LoadTokenDefinitionsAsync(IDataStoreProvider storeProvider, bool createDefinitionFileIfFileNotFound)
Parameters
Type Name Description
IDataStoreProvider storeProvider

The store provider.

bool createDefinitionFileIfFileNotFound

Create a definition file if one doesn't exist.

Returns
Type Description
Task<List<string>>

A list of tokens that failed to load.

View Source

ResolveTokenAsync(string, Guid, Guid)

Resolve a given token, asynchronously, to a specific value (object).

Declaration
Task<List<object?>?> ResolveTokenAsync(string token, Guid bugResolveId, Guid resolvePassId)
Parameters
Type Name Description
string token

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 list of the resolved values.

View Source

SaveTokenDefinitionsAsync(IDataStoreProvider)

Save token definitions to the given IDataStoreProvider

Declaration
Task SaveTokenDefinitionsAsync(IDataStoreProvider storeProvider)
Parameters
Type Name Description
IDataStoreProvider storeProvider

The store provider.

Returns
Type Description
Task

The task.

  • View Source
In this article
Back to top Generated by DocFX