CancellationToken(Boolean) Konstruktor

Definice

Inicializuje 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

Zrušený stav tokenu.The canceled state for the token.

Poznámky

Tokeny vytvořené pomocí tohoto konstruktoru zůstanou ve zrušeném stavu určeném canceled parametrem.Tokens created with this constructor will remain in the canceled state specified by the canceled parameter. Pokud canceledfalse , i CanBeCanceled , IsCancellationRequested budou false .If canceled is false, both CanBeCanceled and IsCancellationRequested will be false.

Pokud canceledtrue , i CanBeCanceled , IsCancellationRequested budou true .If canceled is true, both CanBeCanceled and IsCancellationRequested will be true.

Platí pro