Επεξεργασία

Κοινή χρήση μέσω


IReceivableSourceBlock<TOutput> Interface

Definition

Represents a dataflow block that supports receiving messages without linking.

generic <typename TOutput>
public interface class IReceivableSourceBlock : System::Threading::Tasks::Dataflow::ISourceBlock<TOutput>
public interface IReceivableSourceBlock<TOutput> : System.Threading.Tasks.Dataflow.ISourceBlock<TOutput>
type IReceivableSourceBlock<'Output> = interface
    interface ISourceBlock<'Output>
    interface IDataflowBlock
type IReceivableSourceBlock<'Output> = interface
    interface IDataflowBlock
    interface ISourceBlock<'Output>
Public Interface IReceivableSourceBlock(Of TOutput)
Implements ISourceBlock(Of TOutput)

Type Parameters

TOutput

Specifies the type of data supplied by the IReceivableSourceBlock<TOutput>.

Derived
Implements

Remarks

Note

The TPL Dataflow Library (the System.Threading.Tasks.Dataflow namespace) is not distributed with .NET. To install the System.Threading.Tasks.Dataflow namespace in Visual Studio, open your project, choose Manage NuGet Packages from the Project menu, and search online for the System.Threading.Tasks.Dataflow package. Alternatively, to install it using the .NET Core CLI, run dotnet add package System.Threading.Tasks.Dataflow.

Properties

Completion

Gets a Task that represents the asynchronous operation and completion of the dataflow block.

(Inherited from IDataflowBlock)

Methods

Complete()

Signals to the IDataflowBlock that it should not accept nor produce any more messages nor consume any more postponed messages.

(Inherited from IDataflowBlock)
ConsumeMessage(DataflowMessageHeader, ITargetBlock<TOutput>, Boolean)

Called by a linked ITargetBlock<TInput> to accept and consume a DataflowMessageHeader previously offered by this ISourceBlock<TOutput>.

(Inherited from ISourceBlock<TOutput>)
Fault(Exception)

Causes the IDataflowBlock to complete in a Faulted state.

(Inherited from IDataflowBlock)
LinkTo(ITargetBlock<TOutput>, DataflowLinkOptions)

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

(Inherited from ISourceBlock<TOutput>)
ReleaseReservation(DataflowMessageHeader, ITargetBlock<TOutput>)

Called by a linked ITargetBlock<TInput> to release a previously reserved DataflowMessageHeader by this ISourceBlock<TOutput>.

(Inherited from ISourceBlock<TOutput>)
ReserveMessage(DataflowMessageHeader, ITargetBlock<TOutput>)

Called by a linked ITargetBlock<TInput> to reserve a previously offered DataflowMessageHeader by this ISourceBlock<TOutput>.

(Inherited from ISourceBlock<TOutput>)
TryReceive(Predicate<TOutput>, TOutput)

Attempts to synchronously receive an available output item from the IReceivableSourceBlock<TOutput>.

TryReceiveAll(IList<TOutput>)

Attempts to synchronously receive all available items from the IReceivableSourceBlock<TOutput>.

Extension Methods

AsObservable<TOutput>(ISourceBlock<TOutput>)

Creates a new IObservable<T> abstraction over the ISourceBlock<TOutput>.

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>)

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

OutputAvailableAsync<TOutput>(ISourceBlock<TOutput>, CancellationToken)

Provides a Task<TResult> that asynchronously monitors the source for available output.

OutputAvailableAsync<TOutput>(ISourceBlock<TOutput>)

Provides a Task<TResult> that asynchronously monitors the source for available output.

Receive<TOutput>(ISourceBlock<TOutput>, CancellationToken)

Synchronously receives a value from a specified source and provides a token to cancel the operation.

Receive<TOutput>(ISourceBlock<TOutput>, TimeSpan, CancellationToken)

Synchronously receives a value from a specified source, providing a token to cancel the operation and observing an optional time-out interval.

Receive<TOutput>(ISourceBlock<TOutput>, TimeSpan)

Synchronously receives a value from a specified source, observing an optional time-out period.

Receive<TOutput>(ISourceBlock<TOutput>)

Synchronously receives a value from a specified source.

ReceiveAllAsync<TOutput>(IReceivableSourceBlock<TOutput>, CancellationToken)

Creates an IAsyncEnumerable<T> that enables receiving all of the data from the source.

ReceiveAsync<TOutput>(ISourceBlock<TOutput>, CancellationToken)

Asynchronously receives a value from a specified source and provides a token to cancel the operation.

ReceiveAsync<TOutput>(ISourceBlock<TOutput>, TimeSpan, CancellationToken)

Asynchronously receives a value from a specified source, providing a token to cancel the operation and observing an optional time-out interval.

ReceiveAsync<TOutput>(ISourceBlock<TOutput>, TimeSpan)

Asynchronously receives a value from a specified source, observing an optional time-out period.

ReceiveAsync<TOutput>(ISourceBlock<TOutput>)

Asynchronously receives a value from a specified source.

TryReceive<TOutput>(IReceivableSourceBlock<TOutput>, TOutput)

Attempts to synchronously receive an item from the ISourceBlock<TOutput>.

Applies to