Table of Contents

Class AsyncOptions

Namespace
Cuemon.Threading
Assembly
Cuemon.Core.dll

Specifies options that is related to asynchronous operations.

public class AsyncOptions : IAsyncOptions, IParameterObject
Inheritance
AsyncOptions
Implements
Derived

Constructors

AsyncOptions()

Initializes a new instance of the AsyncOptions class.

public AsyncOptions()

Remarks

The following table shows the initial property values for an instance of AsyncOptions.

PropertyInitial Value
CancellationTokendefault
CancellationTokenProvidernull

Properties

CancellationToken

Gets or sets the cancellation token of an asynchronous operations.

public CancellationToken CancellationToken { get; set; }

Property Value

CancellationToken

The cancellation token of an asynchronous operations.

Remarks

CancellationTokenProvider takes precedence when set, meaning that the getter of this property will invoke said mentioned function delegate.

CancellationTokenProvider

Gets or sets the function delegate that is invoked when a CancellationToken is requested.

public Func<CancellationToken> CancellationTokenProvider { get; set; }

Property Value

Func<CancellationToken>

The function delegate that is invoked when a CancellationToken is requested.

Remarks

This function delegate is meant for edge cases where this instance might be stored as a singleton or similar use case.

See Also