SolutionId

References
Provides an app-wide secure way to generate solution runtime ids.

Properties

CancelledIds

#
public static IEnumerable<SolutionId> CancelledIds { get; }
Enumerate over the most recent cancelled solution IDs, starting with the most recent one. This iterator is thread-safe, but does not update during its lifespan. Calling IsCancelled(SolutionId) is a much faster way to check for a specific cancellation.

IsValid

#
public bool IsValid { get; }
Gets whether this is a valid Id.

None

#
public static SolutionId None { get; }
Gets an unset solution id.

Methods

CompareTo

#
public int CompareTo(SolutionId other)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
other (SolutionId)An object to compare with this instance.
A value that indicates the relative order of the objects being compared.

Equals

#
public override bool Equals(object obj)
Indicates whether this instance and a specified object are equal.
obj (object)The object to compare with the current instance.
true if obj and this instance are the same type and represent the same value; otherwise, false.
ValueType.Equals

Equals

#
public bool Equals(SolutionId other)
Indicates whether the current object is equal to another object of the same type.
other (SolutionId)An object to compare with this object.

GetHashCode

#
public override int GetHashCode()
Returns the hash code for this instance.
A hash of the solution id. Invalid hashes are always zero, valid hashes are never zero.

GetHashCode

#
public int GetHashCode(out long sixtyFourBitHashCode)
Returns the hash code for this instance.
sixtyFourBitHashCode (out long)
A hash of the solution id. Invalid hashes are always zero, valid hashes are never zero.

IsCancelled

#
public static bool IsCancelled(long sixtyFourBitHash)
Gets whether a specific solution has been cancelled. There is at present no way to check whether an id is still running or whether it has completed.
sixtyFourBitHash (long)The 64-bit hash code returned from GetHashCode(long).
True if the solution with the provided hash has been cancelled.

IsCancelled

#
public static bool IsCancelled(SolutionId id)
Gets whether a specific solution has been cancelled. There is at present no way to check whether an id is still running or whether it has completed.
id (SolutionId)Id to check.
True if the solution with the provided ID has been cancelled.

ToString

#
public override string ToString()
Returns the fully qualified type name of this instance.
The fully qualified type name.

Operators

OperationResultDescription
SolutionId==SolutionIdboolTest two solutions for equality. Invalid solutions are not equal to anything, even other invalid solutions.
SolutionId>SolutionIdboolTest two solutions for greater-than-ness. Invalid solutions are smaller than valid solutions, older valid solutions are smaller than newer valid solutions.
SolutionId>=SolutionIdboolTest two solutions for equality or greater-than-ness. Invalid solutions are smaller than valid solutions, older valid solutions are smaller than newer valid solutions.
SolutionId!=SolutionIdboolTest two solutions for inequality. Invalid solutions are not equal to anything, even other invalid solutions.
SolutionId<SolutionIdboolTest two solutions for smaller-than-ness. Invalid solutions are smaller than valid solutions, older valid solutions are smaller than newer valid solutions.
SolutionId<=SolutionIdboolTest two solutions for equality or smaller-than-ness. Invalid solutions are smaller than valid solutions, older valid solutions are smaller than newer valid solutions.