Partilhar via


CancellationTokenExtensions.CombinedCancellationToken Struct

Definition

Provides access to a CancellationToken that combines multiple other tokens, and allows convenient disposal of any applicable CancellationTokenSource.

public: value class CancellationTokenExtensions::CombinedCancellationToken : IDisposable, IEquatable<Microsoft::VisualStudio::Threading::CancellationTokenExtensions::CombinedCancellationToken>
[System.Runtime.CompilerServices.IsReadOnly]
public readonly struct CancellationTokenExtensions.CombinedCancellationToken : IDisposable, IEquatable<Microsoft.VisualStudio.Threading.CancellationTokenExtensions.CombinedCancellationToken>
[<System.Runtime.CompilerServices.IsReadOnly>]
type CancellationTokenExtensions.CombinedCancellationToken = struct
    interface IDisposable
Public Structure CancellationTokenExtensions.CombinedCancellationToken
Implements IDisposable, IEquatable(Of CancellationTokenExtensions.CombinedCancellationToken)
Inheritance
CancellationTokenExtensions.CombinedCancellationToken
Attributes
Implements

Constructors

CancellationTokenExtensions.CombinedCancellationToken(CancellationToken)

Initializes a new instance of the CancellationTokenExtensions.CombinedCancellationToken struct that represents just a single, non-disposable CancellationToken.

CancellationTokenExtensions.CombinedCancellationToken(CancellationTokenSource)

Initializes a new instance of the CancellationTokenExtensions.CombinedCancellationToken struct that contains an aggregate CancellationToken whose source must be disposed.

Properties

Token

Gets the combined cancellation token.

Methods

Dispose()

Disposes the CancellationTokenSource behind this combined token, if any.

Equals(CancellationTokenExtensions+CombinedCancellationToken)

Indicates whether the current object is equal to another object of the same type.

Equals(Object)

Indicates whether this instance and a specified object are equal.

GetHashCode()

Returns the hash code for this instance.

Operators

Equality(CancellationTokenExtensions+CombinedCancellationToken, CancellationTokenExtensions+CombinedCancellationToken)

Checks whether two instances of CancellationTokenExtensions.CombinedCancellationToken are equal.

Inequality(CancellationTokenExtensions+CombinedCancellationToken, CancellationTokenExtensions+CombinedCancellationToken)

Checks whether two instances of CancellationTokenExtensions.CombinedCancellationToken are not equal.

Applies to