BatchBlock<T> Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides a dataflow block that batches inputs into arrays.
generic <typename T>
public ref class BatchBlock sealed : System::Threading::Tasks::Dataflow::IPropagatorBlock<T, cli::array <T> ^>, System::Threading::Tasks::Dataflow::IReceivableSourceBlock<cli::array <T> ^>, System::Threading::Tasks::Dataflow::ISourceBlock<cli::array <T> ^>, System::Threading::Tasks::Dataflow::ITargetBlock<T>
public sealed class BatchBlock<T> : System.Threading.Tasks.Dataflow.IPropagatorBlock<T,T[]>, System.Threading.Tasks.Dataflow.IReceivableSourceBlock<T[]>, System.Threading.Tasks.Dataflow.ISourceBlock<T[]>, System.Threading.Tasks.Dataflow.ITargetBlock<T>
type BatchBlock<'T> = class
interface IPropagatorBlock<'T, 'T[]>
interface ITargetBlock<'T>
interface IDataflowBlock
interface ISourceBlock<'T[]>
interface IReceivableSourceBlock<'T[]>
type BatchBlock<'T> = class
interface IDataflowBlock
interface IPropagatorBlock<'T, 'T[]>
interface ISourceBlock<'T[]>
interface ITargetBlock<'T>
interface IReceivableSourceBlock<'T[]>
Public NotInheritable Class BatchBlock(Of T)
Implements IPropagatorBlock(Of T, T()), IReceivableSourceBlock(Of T()), ISourceBlock(Of T()), ITargetBlock(Of T)
- T
Specifies the type of data put into batches.
- Inheritance
-
BatchBlock<T>
- Implements
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
.
Batch |
Initializes a new BatchBlock<T> with the specified batch size, declining option, and block options. |
Batch |
Initializes a new BatchBlock<T> with the specified batch size. |
Batch |
Gets the size of the batches generated by this BatchBlock<T>. |
Completion |
Gets a Task that represents the asynchronous operation and completion of the dataflow block. |
Output |
Gets the number of output items available to be received from this block. |
Complete() |
Signals to the IDataflowBlock that it should not accept nor produce any more messages nor consume any more postponed messages. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Link |
Links the ISourceBlock<TOutput> to the specified ITargetBlock<TInput> . |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
To |
Returns a string that represents the formatted name of this IDataflowBlock instance. |
Trigger |
Triggers the BatchBlock<T> to initiate a batching operation even if the number of currently queued or postponed items is less than the BatchSize. |
Try |
Attempts to synchronously receive an available output item from the IReceivableSourceBlock<TOutput>. |
Try |
Attempts to synchronously receive all available items from the IReceivableSourceBlock<TOutput>. |
IDataflow |
Causes the IDataflowBlock to complete in a Faulted state. |
ISource |
Called by a linked ITargetBlock<TInput> to accept and consume a DataflowMessageHeader previously offered by this ISourceBlock<TOutput> . |
ISource |
Called by a linked ITargetBlock<TInput> to release a previously reserved DataflowMessageHeader by this ISourceBlock<TOutput>. |
ISource |
Called by a linked ITargetBlock<TInput> to reserve a previously offered DataflowMessageHeader by this ISourceBlock<TOutput>. |
ITarget |
Offers a message to the ITargetBlock<TInput>, giving the target the opportunity to consume or postpone the message. |
As |
Creates a new IObservable<T> abstraction over the ISourceBlock<TOutput>. |
As |
Creates a new IObserver<T> abstraction over the ITargetBlock<TInput>. |
Link |
Links the ISourceBlock<TOutput> to the specified ITargetBlock<TInput> using the specified filter. |
Link |
Links the ISourceBlock<TOutput> to the specified ITargetBlock<TInput> using the specified filter. |
Link |
Links the ISourceBlock<TOutput> to the specified ITargetBlock<TInput>. |
Output |
Provides a Task<TResult> that asynchronously monitors the source for available output. |
Output |
Provides a Task<TResult> that asynchronously monitors the source for available output. |
Post<TInput>(ITarget |
Posts an item to the ITargetBlock<TInput>. |
Receive<TOutput>(ISource |
Synchronously receives a value from a specified source and provides a token to cancel the operation. |
Receive<TOutput>(ISource |
Synchronously receives a value from a specified source, providing a token to cancel the operation and observing an optional time-out interval. |
Receive<TOutput>(ISource |
Synchronously receives a value from a specified source, observing an optional time-out period. |
Receive<TOutput>(ISource |
Synchronously receives a value from a specified source. |
Receive |
Creates an IAsyncEnumerable<T> that enables receiving all of the data from the source. |
Receive |
Asynchronously receives a value from a specified source and provides a token to cancel the operation. |
Receive |
Asynchronously receives a value from a specified source, providing a token to cancel the operation and observing an optional time-out interval. |
Receive |
Asynchronously receives a value from a specified source, observing an optional time-out period. |
Receive |
Asynchronously receives a value from a specified source. |
Send |
Asynchronously offers a message to the target message block, allowing for postponement. |
Send |
Asynchronously offers a message to the target message block, allowing for postponement. |
Try |
Attempts to synchronously receive an item from the ISourceBlock<TOutput>. |
Product | Versions |
---|---|
.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 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided), 2.1 (package-provided) |
UWP | 10.0 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: