Show / Hide Table of Contents

Class TokenizedItemViewModel

Used for Token resolution. Based on Microsoft.Internal.GamesTest.BugAnywhere.Tokens.TokenizedItem Represents either a TokenReference or plain text that can represent a parsed component of a field value.

Inheritance
object
BindableBase
ItemViewModelBase
TokenizedItemViewModel
Implements
INotifyPropertyChanged
IDataErrorInfo
Inherited Members
ItemViewModelBase.CanEdit
ItemViewModelBase.Error
ItemViewModelBase.HasError
ItemViewModelBase.IsDirty
ItemViewModelBase.this[string]
ItemViewModelBase.MarkAllPropertiesAsValid()
ItemViewModelBase.MarkPropertyAsInvalid(string, string)
ItemViewModelBase.MarkPropertyAsValid(string)
BindableBase.SetProperty<T>(ref T, T, string)
BindableBase.SetProperty<T>(ref T, T, Action, string)
BindableBase.RaisePropertyChanged(string)
BindableBase.OnPropertyChanged(PropertyChangedEventArgs)
BindableBase.PropertyChanged
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Phoenix.Aruba
Assembly: Phoenix.Plugin.Aruba.dll
Syntax
public class TokenizedItemViewModel : ItemViewModelBase, INotifyPropertyChanged, IDataErrorInfo

Properties

View Source

BugResolveGuid

Gets or sets the bug resolve id for the creation of this bug.

Declaration
public Guid BugResolveGuid { get; set; }
Property Value
Type Description
Guid
View Source

CancelResolveThisCommand

Gets the cancel resolve command

Declaration
public ICommand CancelResolveThisCommand { get; }
Property Value
Type Description
ICommand
View Source

IsInDesignMode

Gets a value indicating whether the TokenizedItem is to be used in Design mode.

Declaration
public bool IsInDesignMode { get; }
Property Value
Type Description
bool
View Source

IsInvalidToken

Gets a value indicating whether this token was created as an 'InvalidToken'.

Declaration
public bool IsInvalidToken { get; }
Property Value
Type Description
bool
View Source

IsResolving

Gets or sets a value indicating whether token is refreshing.

Declaration
public bool IsResolving { get; set; }
Property Value
Type Description
bool
View Source

IsToken

Gets a value indicating whether this is a Token item.

Declaration
public bool IsToken { get; }
Property Value
Type Description
bool
View Source

ResolveThisCommand

Gets the resolve command.

Declaration
public ICommand ResolveThisCommand { get; }
Property Value
Type Description
ICommand
View Source

ResolvedValues

Gets or sets the Resolved values for this item. If this item is just a string, the string value will be returned. If the item is a token the resolved values will be returned.

Declaration
public ObservableCollection<ResolvedTokenizedItem> ResolvedValues { get; set; }
Property Value
Type Description
ObservableCollection<ResolvedTokenizedItem>
View Source

TextValue

Gets the plain text, if this represents plain text.

Declaration
public string? TextValue { get; }
Property Value
Type Description
string
View Source

TokenReference

Gets the reference to a token if this represents one.

Declaration
public TokenReferenceViewModel? TokenReference { get; }
Property Value
Type Description
TokenReferenceViewModel
View Source

TokenResolveError

Gets the error message raised when a token could not be resolved.

Declaration
public string? TokenResolveError { get; }
Property Value
Type Description
string
View Source

TokenResolveErrors

Gets the token resolve errors (in the case of multiple devices).

Declaration
public List<string?> TokenResolveErrors { get; }
Property Value
Type Description
List<string>
View Source

TokenResolverRegistry

Gets or sets the TokenResolverRegistry to use for resolving this token. If this is null the token cannot be resolved by itself.

Declaration
public TokenResolverRegistry? TokenResolverRegistry { get; set; }
Property Value
Type Description
TokenResolverRegistry

Methods

View Source

CancelResolveThis()

Cancels the resolve

Declaration
public void CancelResolveThis()
View Source

DeepCopyResolvedValues(TokenizedItemViewModel)

Deep copy ResolvedValues from a source TokenizedItemViewModel.

Declaration
public void DeepCopyResolvedValues(TokenizedItemViewModel sourceTokenizedItemViewModel)
Parameters
Type Name Description
TokenizedItemViewModel sourceTokenizedItemViewModel

The source TokenizedItemViewModel to copy from.

View Source

FromTextValue(string, bool, bool)

Create a new instance of the TokenizedItemViewModel class from a text value.

Declaration
public static TokenizedItemViewModel FromTextValue(string textValue, bool canEdit, bool isInDesignMode)
Parameters
Type Name Description
string textValue

The plain string represented by this item.

bool canEdit

Whether this object is editable.

bool isInDesignMode

The indication if the Tokenized item is to be used in Design mode.

Returns
Type Description
TokenizedItemViewModel

The created TokenizedItemViewModel

View Source

FromTokenReference(TokenReference, TokenResolverRegistry, bool, bool)

Create a new instance of the TokenizedItemViewModel class from a token.

Declaration
public static TokenizedItemViewModel FromTokenReference(TokenReference tokenReference, TokenResolverRegistry registry, bool canEdit, bool isInDesignMode)
Parameters
Type Name Description
TokenReference tokenReference

Token reference that has been parsed already.

TokenResolverRegistry registry

Token resolver registry.

bool canEdit

Whether this object is editable.

bool isInDesignMode

The indication if the Tokenized item is to be used in Design mode.

Returns
Type Description
TokenizedItemViewModel

The created TokenizedItemViewModel

View Source

GetInvalidToken(TokenReference, TokenResolverRegistry, bool, bool)

Creates a TokenizedItemViewModel that represents an invalid token.

Declaration
public static TokenizedItemViewModel GetInvalidToken(TokenReference tokenReference, TokenResolverRegistry tokenResolverRegistry, bool canEdit, bool isInDesignMode)
Parameters
Type Name Description
TokenReference tokenReference

The token reference that was trying to be created.

TokenResolverRegistry tokenResolverRegistry

The token resolver that was being used for this token.

bool canEdit

Whether this object is editable.

bool isInDesignMode

The indication if the Tokenized item is to be used in Design mode.

Returns
Type Description
TokenizedItemViewModel

The created TokenizedItemViewModel

View Source

RaiseResolvedValues()

Raises property changed on Resolved Values.

Declaration
public void RaiseResolvedValues()
View Source

ResolveThisAsync()

Resolve this item by itself.

Declaration
public Task ResolveThisAsync()
Returns
Type Description
Task

A task.

View Source

ToString()

Returns the string representation of TokenizedItem.

Declaration
public override string ToString()
Returns
Type Description
string

The string representation of TokenizedItem.

Overrides
object.ToString()

Implements

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