• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class InterruptionToken

Propagates a cooperative cancellation request to long-running save, load, and export operations. Created by InterruptionTokenSource; pass the token via InterruptionToken or InterruptionToken.

Operations that accept a token periodically check IsCancellationRequested and throw OperationCanceledException when cancellation is requested.

Inheritance
object
InterruptionToken
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Presentation
Assembly: DRIT.Presentation.dll
Syntax
public sealed class InterruptionToken

Properties

IsCancellationRequested

Gets whether cancellation has been requested for this token.

Declaration
public bool IsCancellationRequested { get; }
Property Value
Type Description
bool

None

Returns an empty token that never requests cancellation.

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

Methods

ThrowIfCancellationRequested()

Throws an OperationCanceledException if cancellation has been requested. Long-running operations should call this periodically (e.g. once per slide) to allow cooperative cancellation.

Declaration
public void ThrowIfCancellationRequested()
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX