API reference · Kjarni 0.2.7

Class CancelToken

Namespace: Kjarni
Assembly: Kjarni.dll

Token to cancel long-running operations.

public class CancelToken : IDisposable

Inheritance

object ← CancelToken

Implements

IDisposable

Constructors

CancelToken()

Creates a token that has not been cancelled.

public CancelToken()

Properties

IsCancelled

Check if cancellation has been requested.

public bool IsCancelled { get; }

Property Value

bool

Methods

Cancel()

Request cancellation of the associated operation.

public void Cancel()

Dispose()

Releases the native token. The object cannot be used afterwards.

public void Dispose()

~CancelToken()

Releases the native token if was not called.

protected ~CancelToken()

Reset()

Reset the token for reuse with another operation.

public void Reset()

Kjarni runs the same engine on every platform: