Modifica

Condividi tramite


DataflowBlock.LinkTo Method

Definition

Overloads

LinkTo<TOutput>(ISourceBlock<TOutput>, ITargetBlock<TOutput>)

Links the ISourceBlock<TOutput> to the specified ITargetBlock<TInput>.

LinkTo<TOutput>(ISourceBlock<TOutput>, ITargetBlock<TOutput>, Predicate<TOutput>)

Links the ISourceBlock<TOutput> to the specified ITargetBlock<TInput> using the specified filter.

LinkTo<TOutput>(ISourceBlock<TOutput>, ITargetBlock<TOutput>, DataflowLinkOptions, Predicate<TOutput>)

Links the ISourceBlock<TOutput> to the specified ITargetBlock<TInput> using the specified filter.

LinkTo<TOutput>(ISourceBlock<TOutput>, ITargetBlock<TOutput>)

Source:
DataflowBlock.cs
Source:
DataflowBlock.cs
Source:
DataflowBlock.cs
Source:
DataflowBlock.cs

Links the ISourceBlock<TOutput> to the specified ITargetBlock<TInput>.

public:
generic <typename TOutput>
[System::Runtime::CompilerServices::Extension]
 static IDisposable ^ LinkTo(System::Threading::Tasks::Dataflow::ISourceBlock<TOutput> ^ source, System::Threading::Tasks::Dataflow::ITargetBlock<TOutput> ^ target);
public static IDisposable LinkTo<TOutput> (this System.Threading.Tasks.Dataflow.ISourceBlock<TOutput> source, System.Threading.Tasks.Dataflow.ITargetBlock<TOutput> target);
static member LinkTo : System.Threading.Tasks.Dataflow.ISourceBlock<'Output> * System.Threading.Tasks.Dataflow.ITargetBlock<'Output> -> IDisposable
<Extension()>
Public Function LinkTo(Of TOutput) (source As ISourceBlock(Of TOutput), target As ITargetBlock(Of TOutput)) As IDisposable

Type Parameters

TOutput

Specifies the type of data contained in the source.

Parameters

source
ISourceBlock<TOutput>

The source from which to link.

target
ITargetBlock<TOutput>

The ITargetBlock<TInput> to which to connect the source.

Returns

An IDisposable that, upon calling Dispose, will unlink the source from the target.

Exceptions

The source is null.

-or-

The target is null.

Applies to

LinkTo<TOutput>(ISourceBlock<TOutput>, ITargetBlock<TOutput>, Predicate<TOutput>)

Source:
DataflowBlock.cs
Source:
DataflowBlock.cs
Source:
DataflowBlock.cs
Source:
DataflowBlock.cs

Links the ISourceBlock<TOutput> to the specified ITargetBlock<TInput> using the specified filter.

public:
generic <typename TOutput>
[System::Runtime::CompilerServices::Extension]
 static IDisposable ^ LinkTo(System::Threading::Tasks::Dataflow::ISourceBlock<TOutput> ^ source, System::Threading::Tasks::Dataflow::ITargetBlock<TOutput> ^ target, Predicate<TOutput> ^ predicate);
public static IDisposable LinkTo<TOutput> (this System.Threading.Tasks.Dataflow.ISourceBlock<TOutput> source, System.Threading.Tasks.Dataflow.ITargetBlock<TOutput> target, Predicate<TOutput> predicate);
static member LinkTo : System.Threading.Tasks.Dataflow.ISourceBlock<'Output> * System.Threading.Tasks.Dataflow.ITargetBlock<'Output> * Predicate<'Output> -> IDisposable
<Extension()>
Public Function LinkTo(Of TOutput) (source As ISourceBlock(Of TOutput), target As ITargetBlock(Of TOutput), predicate As Predicate(Of TOutput)) As IDisposable

Type Parameters

TOutput

Specifies the type of data contained in the source.

Parameters

source
ISourceBlock<TOutput>

The source from which to link.

target
ITargetBlock<TOutput>

The ITargetBlock<TInput> to which to connect the source.

predicate
Predicate<TOutput>

The filter a message must pass in order for it to propagate from the source to the target.

Returns

An IDisposable that, upon calling Dispose, will unlink the source from the target.

Exceptions

The source is null.

-or-

The target is null.

-or-

The predicate is null.

Applies to

LinkTo<TOutput>(ISourceBlock<TOutput>, ITargetBlock<TOutput>, DataflowLinkOptions, Predicate<TOutput>)

Source:
DataflowBlock.cs
Source:
DataflowBlock.cs
Source:
DataflowBlock.cs
Source:
DataflowBlock.cs

Links the ISourceBlock<TOutput> to the specified ITargetBlock<TInput> using the specified filter.

public:
generic <typename TOutput>
[System::Runtime::CompilerServices::Extension]
 static IDisposable ^ LinkTo(System::Threading::Tasks::Dataflow::ISourceBlock<TOutput> ^ source, System::Threading::Tasks::Dataflow::ITargetBlock<TOutput> ^ target, System::Threading::Tasks::Dataflow::DataflowLinkOptions ^ linkOptions, Predicate<TOutput> ^ predicate);
public static IDisposable LinkTo<TOutput> (this System.Threading.Tasks.Dataflow.ISourceBlock<TOutput> source, System.Threading.Tasks.Dataflow.ITargetBlock<TOutput> target, System.Threading.Tasks.Dataflow.DataflowLinkOptions linkOptions, Predicate<TOutput> predicate);
static member LinkTo : System.Threading.Tasks.Dataflow.ISourceBlock<'Output> * System.Threading.Tasks.Dataflow.ITargetBlock<'Output> * System.Threading.Tasks.Dataflow.DataflowLinkOptions * Predicate<'Output> -> IDisposable
<Extension()>
Public Function LinkTo(Of TOutput) (source As ISourceBlock(Of TOutput), target As ITargetBlock(Of TOutput), linkOptions As DataflowLinkOptions, predicate As Predicate(Of TOutput)) As IDisposable

Type Parameters

TOutput

Specifies the type of data contained in the source.

Parameters

source
ISourceBlock<TOutput>

The source from which to link.

target
ITargetBlock<TOutput>

The ITargetBlock<TInput> to which to connect the source.

linkOptions
DataflowLinkOptions

One of the enumeration values that specifies how to configure a link between dataflow blocks.

predicate
Predicate<TOutput>

The filter a message must pass in order for it to propagate from the source to the target.

Returns

An IDisposable that, upon calling Dispose, will unlink the source from the target.

Exceptions

The source is null (Nothing in Visual Basic).

-or-

The target is null (Nothing in Visual Basic).

-or-

The linkOptions is null (Nothing in Visual Basic).

-or-

The predicate is null (Nothing in Visual Basic).

Applies to