TaskFactory.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 task cancellation token for this task factory.

備註

這個屬性會傳回預設值 CancellationToken,將指派給這個處理站所建立的所有工作,除非在呼叫 factory 方法期間明確指定另一個 CancellationToken 值。This property returns the default CancellationToken that will be assigned to all tasks created by this factory, unless another CancellationToken value is explicitly specified during the call to the factory methods.

適用於

另請參閱