TransformBlock<TInput,TOutput> 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
TransformBlock<TInput,TOutput>(Func<TInput,Task<TOutput>>)
使用指定的 Func<T,TResult>,將新的 TransformBlock<TInput,TOutput> 初始化。
public:
TransformBlock(Func<TInput, System::Threading::Tasks::Task<TOutput> ^> ^ transform);
public TransformBlock (Func<TInput,System.Threading.Tasks.Task<TOutput>> transform);
new System.Threading.Tasks.Dataflow.TransformBlock<'Input, 'Output> : Func<'Input, System.Threading.Tasks.Task<'Output>> -> System.Threading.Tasks.Dataflow.TransformBlock<'Input, 'Output>
Public Sub New (transform As Func(Of TInput, Task(Of TOutput)))
參數
例外狀況
transform
為 null
。
適用於
TransformBlock<TInput,TOutput>(Func<TInput,TOutput>)
使用指定的 Func<T,TResult>,將新的 TransformBlock<TInput,TOutput> 初始化。
public:
TransformBlock(Func<TInput, TOutput> ^ transform);
public TransformBlock (Func<TInput,TOutput> transform);
new System.Threading.Tasks.Dataflow.TransformBlock<'Input, 'Output> : Func<'Input, 'Output> -> System.Threading.Tasks.Dataflow.TransformBlock<'Input, 'Output>
Public Sub New (transform As Func(Of TInput, TOutput))
參數
- transform
- Func<TInput,TOutput>
要以各個接收的資料項目叫用的函式。
例外狀況
transform
為 null
。
適用於
TransformBlock<TInput,TOutput>(Func<TInput,Task<TOutput>>, ExecutionDataflowBlockOptions)
public:
TransformBlock(Func<TInput, System::Threading::Tasks::Task<TOutput> ^> ^ transform, System::Threading::Tasks::Dataflow::ExecutionDataflowBlockOptions ^ dataflowBlockOptions);
public TransformBlock (Func<TInput,System.Threading.Tasks.Task<TOutput>> transform, System.Threading.Tasks.Dataflow.ExecutionDataflowBlockOptions dataflowBlockOptions);
new System.Threading.Tasks.Dataflow.TransformBlock<'Input, 'Output> : Func<'Input, System.Threading.Tasks.Task<'Output>> * System.Threading.Tasks.Dataflow.ExecutionDataflowBlockOptions -> System.Threading.Tasks.Dataflow.TransformBlock<'Input, 'Output>
Public Sub New (transform As Func(Of TInput, Task(Of TOutput)), dataflowBlockOptions As ExecutionDataflowBlockOptions)
參數
- dataflowBlockOptions
- ExecutionDataflowBlockOptions
用來設定這個TransformBlock<TInput,TOutput> 的選項。
例外狀況
適用於
TransformBlock<TInput,TOutput>(Func<TInput,TOutput>, ExecutionDataflowBlockOptions)
public:
TransformBlock(Func<TInput, TOutput> ^ transform, System::Threading::Tasks::Dataflow::ExecutionDataflowBlockOptions ^ dataflowBlockOptions);
public TransformBlock (Func<TInput,TOutput> transform, System.Threading.Tasks.Dataflow.ExecutionDataflowBlockOptions dataflowBlockOptions);
new System.Threading.Tasks.Dataflow.TransformBlock<'Input, 'Output> : Func<'Input, 'Output> * System.Threading.Tasks.Dataflow.ExecutionDataflowBlockOptions -> System.Threading.Tasks.Dataflow.TransformBlock<'Input, 'Output>
Public Sub New (transform As Func(Of TInput, TOutput), dataflowBlockOptions As ExecutionDataflowBlockOptions)
參數
- transform
- Func<TInput,TOutput>
要以各個接收的資料項目叫用的函式。
- dataflowBlockOptions
- ExecutionDataflowBlockOptions
用來設定這個TransformBlock<TInput,TOutput> 的選項。