使用英语阅读

通过


BufferBlock<T>.LinkTo 方法

定义

ISourceBlock<TOutput>将 链接到指定的 ITargetBlock<TInput>

public IDisposable LinkTo(System.Threading.Tasks.Dataflow.ITargetBlock<T> target, System.Threading.Tasks.Dataflow.DataflowLinkOptions linkOptions);

参数

target
ITargetBlock<T>

此源连接到的 ITargetBlock<TInput>

linkOptions
DataflowLinkOptions

DataflowLinkOptions 实例,用于配置链接。

返回

根据调用 Dispose 将取消与目标中源的链接的 IDisposable。

实现

例外

target 为 null (Visual Basic) 中无任何内容,或 linkOptions 为 null (Visual Basic) 中无任何内容。

适用于

产品 版本
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided), 2.1 (package-provided)
UWP 10.0