TaskFactory<TResult>.CancellationToken 屬性

定義

取得這個工作 Factory 的預設取消語彙基元。Gets the default cancellation token for this task factory.

public:
 property System::Threading::CancellationToken CancellationToken { System::Threading::CancellationToken get(); };
public System.Threading.CancellationToken CancellationToken { get; }
member this.CancellationToken : System.Threading.CancellationToken
Public ReadOnly Property CancellationToken As CancellationToken

屬性值

這個工作 Factory 的預設取消語彙基元。The default cancellation token for this task factory.

備註

這個屬性會傳回預設解除標記,此權杖會指派給這個 factory 所建立的所有工作,除非在呼叫工作 factory 方法時明確指定另一個解除標記值。This property returns the default cancellation token that will be assigned to all tasks created by this factory unless another cancellation token value is explicitly specified during the call to the task factory methods.

適用於

另請參閱