CancellationToken(Boolean) Konstruktor

Definicja

Inicjuje CancellationToken .Initializes the CancellationToken.

public:
 CancellationToken(bool canceled);
public CancellationToken (bool canceled);
new System.Threading.CancellationToken : bool -> System.Threading.CancellationToken
Public Sub New (canceled As Boolean)

Parametry

canceled
Boolean

Stan anulowany dla tokenu.The canceled state for the token.

Uwagi

Tokeny utworzone za pomocą tego konstruktora pozostaną w stanie anulowanym określonym przez canceled parametr.Tokens created with this constructor will remain in the canceled state specified by the canceled parameter. Jeśli canceled jest false , oba CanBeCanceled i IsCancellationRequested będą false .If canceled is false, both CanBeCanceled and IsCancellationRequested will be false.

Jeśli canceled jest true , oba CanBeCanceled i IsCancellationRequested będą true .If canceled is true, both CanBeCanceled and IsCancellationRequested will be true.

Dotyczy