CancellationToken(Boolean) Construtor

Definição

Inicializa o 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)

Parâmetros

canceled
Boolean

O estado cancelado do token.The canceled state for the token.

Comentários

Os tokens criados com esse construtor permanecerão no estado cancelado especificado pelo canceled parâmetro.Tokens created with this constructor will remain in the canceled state specified by the canceled parameter. Se canceled for false , CanBeCanceled e IsCancellationRequested será false .If canceled is false, both CanBeCanceled and IsCancellationRequested will be false.

Se canceled for true , CanBeCanceled e IsCancellationRequested será true .If canceled is true, both CanBeCanceled and IsCancellationRequested will be true.

Aplica-se a

Confira também