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
Implements
Namespace: EPiServer.Async
Assembly: EPiServer.Framework.dll
Version: 12.0.3Syntax
public class TrackingToken : Object, 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. |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
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 |
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 |
Returns
Type | Description |
---|---|
System.Boolean | true if |