Show / Hide Table of Contents

Struct CancellationTokenMultiplexer.ScopeWithTimeout

Represents a scope that controls the lifetime of the multiplexed cancellation token and allows to specify the timeout.

Implements
IMultiplexedCancellationTokenSource
IDisposable
IAsyncDisposable
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: DotNext.Threading
Assembly: DotNext.Threading.dll
Syntax
public readonly struct CancellationTokenMultiplexer.ScopeWithTimeout : IMultiplexedCancellationTokenSource, IDisposable, IAsyncDisposable

Properties

| Edit this page View Source

CancellationOrigin

Gets the cancellation origin.

Declaration
public CancellationToken CancellationOrigin { get; }
Property Value
Type Description
CancellationToken
| Edit this page View Source

IsTimedOut

Gets a value indicating that the multiplexed token is cancelled by the timeout.

Declaration
public bool IsTimedOut { get; }
Property Value
Type Description
bool
| Edit this page View Source

Timeout

Sets the optional timeout.

Declaration
public TimeSpan Timeout { set; }
Property Value
Type Description
TimeSpan
See Also
CombineAndSetTimeoutLater(ReadOnlySpan<CancellationToken>)
| Edit this page View Source

Token

Gets the multiplexed token.

Declaration
public CancellationToken Token { get; }
Property Value
Type Description
CancellationToken

Methods

| Edit this page View Source

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()
| Edit this page View Source

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

Declaration
public ValueTask DisposeAsync()
Returns
Type Description
ValueTask

A task that represents the asynchronous dispose operation.

Implements

IMultiplexedCancellationTokenSource
IDisposable
IAsyncDisposable

Extension Methods

BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, ReadOnlySpan<T>)
Collection.ToAsyncEnumerator<TEnumerator, T>(TEnumerator, CancellationToken)
Collection.ToClassicEnumerator<TEnumerator, T>(TEnumerator)
Enumerator.Skip<TEnumerator, T>(ref TEnumerator, int)
ExpressionBuilder.Const<T>(T)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾