InterruptionToken

InterruptionToken class

This class represents the token to use for signaling long running tasks whether the interruption was requested.

public class InterruptionToken : IInterruptionToken

Properties

NameDescription
static None { get; }Represents an empty interruption token. Long-running operations will never be interrupted via Interrupt when using this token.
IsInterruptionRequested { get; }Returns Boolean.true if interruption was requested.

Methods

NameDescription
ThrowIfInterruptionRequested()Throws an OperationCanceledException if interruption was requested.

See Also