Try our conversational search powered by Generative AI!

Class TrackingToken

Used to define a token that will be associated with a System.Threading.Tasks.Task. Can be used to retrieve status about the task using TaskMonitor.

Inheritance
System.Object
TrackingToken
Implements
System.IEquatable<TrackingToken>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Async
Assembly: EPiServer.Framework.dll
Version: 11.20.7
Syntax
public class TrackingToken : IEquatable<TrackingToken>

Constructors

TrackingToken()

Initializes a new instance of the TrackingToken class with a new identifier.

Declaration
public TrackingToken()

TrackingToken(Guid)

Initializes a new instance of the TrackingToken class with a specific identifier.

Declaration
public TrackingToken(Guid id)
Parameters
Type Name Description
System.Guid id

The identifier.

Properties

Id

The identifier for the token used to track progress.

Declaration
public Guid Id { get; }
Property Value
Type Description
System.Guid

None

Returns an empty TrackingToken value.

Declaration
public static TrackingToken None { get; }
Property Value
Type Description
TrackingToken

Methods

Equals(TrackingToken)

Determines if other is considered equal with this instance.

Declaration
public bool Equals(TrackingToken other)
Parameters
Type Name Description
TrackingToken other

The other TrackingToken to compare with.

Returns
Type Description
System.Boolean

true if the tokens are considered equal else false.

Equals(Object)

Determines if obj is considered equal with this instance.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The other TrackingToken to compare with.

Returns
Type Description
System.Boolean

true if the tokens are considered equal else false.

Overrides
System.Object.Equals(System.Object)

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.Object.GetHashCode()

Parse(String)

Parses value to a TrackingToken.

Declaration
public static TrackingToken Parse(string value)
Parameters
Type Name Description
System.String value

The string to parse.

Returns
Type Description
TrackingToken

A tracking token

Exceptions
Type Condition
System.ArgumentException

In case the string is not in expected format.

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

TryParse(String, out TrackingToken)

Tries to parses value to a TrackingToken.

Declaration
public static bool TryParse(string value, out TrackingToken token)
Parameters
Type Name Description
System.String value

The string to parse.

TrackingToken token

The parsed token or null if value could not be parsed.

Returns
Type Description
System.Boolean

true if value could be parsed else false.

Implements

System.IEquatable<T>

Extension Methods