TransformBlock<TInput,TOutput> 构造函数
定义
重载
| TransformBlock<TInput,TOutput>(Func<TInput,Task<TOutput>>) |
使用指定的 Func<T,TResult> 初始化新的 TransformBlock<TInput,TOutput>。Initializes a new TransformBlock<TInput,TOutput> with the specified Func<T,TResult>. |
| TransformBlock<TInput,TOutput>(Func<TInput,TOutput>) |
使用指定的 Func<T,TResult> 初始化新的 TransformBlock<TInput,TOutput>。Initializes a new TransformBlock<TInput,TOutput> with the specified Func<T,TResult>. |
| TransformBlock<TInput,TOutput>(Func<TInput,Task<TOutput>>, ExecutionDataflowBlockOptions) |
使用指定的 Func<T,TResult> 和 ExecutionDataflowBlockOptions 初始化新 TransformBlock<TInput,TOutput>。Initializes a new TransformBlock<TInput,TOutput> with the specified Func<T,TResult> and ExecutionDataflowBlockOptions. |
| TransformBlock<TInput,TOutput>(Func<TInput,TOutput>, ExecutionDataflowBlockOptions) |
使用指定的 Func<T,TResult> 和 ExecutionDataflowBlockOptions 初始化新 TransformBlock<TInput,TOutput>。Initializes a new TransformBlock<TInput,TOutput> with the specified Func<T,TResult> and ExecutionDataflowBlockOptions. |
TransformBlock<TInput,TOutput>(Func<TInput,Task<TOutput>>)
使用指定的 Func<T,TResult> 初始化新的 TransformBlock<TInput,TOutput>。Initializes a new TransformBlock<TInput,TOutput> with the specified Func<T,TResult>.
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)))
参数
使用接收的各个数据元素调用的函数。The function to invoke with each data element received.
例外
transform 为 null。The transform is null.
适用于
TransformBlock<TInput,TOutput>(Func<TInput,TOutput>)
使用指定的 Func<T,TResult> 初始化新的 TransformBlock<TInput,TOutput>。Initializes a new TransformBlock<TInput,TOutput> with the specified Func<T,TResult>.
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>
使用接收的各个数据元素调用的函数。The function to invoke with each data element received.
例外
transform 为 null。The transform is null.
适用于
TransformBlock<TInput,TOutput>(Func<TInput,Task<TOutput>>, ExecutionDataflowBlockOptions)
使用指定的 Func<T,TResult> 和 ExecutionDataflowBlockOptions 初始化新 TransformBlock<TInput,TOutput>。Initializes a new TransformBlock<TInput,TOutput> with the specified Func<T,TResult> and 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)
参数
使用接收的各个数据元素调用的函数。The function to invoke with each data element received.
- dataflowBlockOptions
- ExecutionDataflowBlockOptions
用来配置此 TransformBlock<TInput,TOutput>的选项。The options with which to configure this TransformBlock<TInput,TOutput>.
例外
transform 为 null。The transform is null.
- 或 --or-
dataflowBlockOptions 为 null。The dataflowBlockOptions is null.
适用于
TransformBlock<TInput,TOutput>(Func<TInput,TOutput>, ExecutionDataflowBlockOptions)
使用指定的 Func<T,TResult> 和 ExecutionDataflowBlockOptions 初始化新 TransformBlock<TInput,TOutput>。Initializes a new TransformBlock<TInput,TOutput> with the specified Func<T,TResult> and 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>
使用接收的各个数据元素调用的函数。The function to invoke with each data element received.
- dataflowBlockOptions
- ExecutionDataflowBlockOptions
用来配置此 TransformBlock<TInput,TOutput>的选项。The options with which to configure this TransformBlock<TInput,TOutput>.
例外
transform 为 null。The transform is null.
- 或 --or-
dataflowBlockOptions 为 null。The dataflowBlockOptions is null.