DataflowBlockOptions DataflowBlockOptions DataflowBlockOptions DataflowBlockOptions Class


Provides options used to configure the processing performed by dataflow blocks.

public ref class DataflowBlockOptions
public class DataflowBlockOptions
type DataflowBlockOptions = class
Public Class DataflowBlockOptions



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.

DataflowBlockOptions is mutable and can be configured through its properties.

When specific configuration options are not set, the following defaults are used:

Options Default
TaskScheduler Default
MaxMessagesPerTask DataflowBlockOptions.Unbounded (-1)
CancellationToken None
BoundedCapacity DataflowBlockOptions.Unbounded (-1)

Dataflow blocks capture the state of the options at their construction. Subsequent changes to the provided DataflowBlockOptions instance should not affect the behavior of a dataflow block.


DataflowBlockOptions() DataflowBlockOptions() DataflowBlockOptions() DataflowBlockOptions()

Initializes a new DataflowBlockOptions.


Unbounded Unbounded Unbounded Unbounded

A constant used to specify an unlimited quantity for DataflowBlockOptions members that provide an upper bound. This field is constant.


BoundedCapacity BoundedCapacity BoundedCapacity BoundedCapacity

Gets or sets the maximum number of messages that may be buffered by the block.

CancellationToken CancellationToken CancellationToken CancellationToken

Gets or sets the CancellationToken to monitor for cancellation requests.

EnsureOrdered EnsureOrdered EnsureOrdered EnsureOrdered

Gets or sets a value that indicates whether ordered processing should be enforced on a block's handling of messages.

MaxMessagesPerTask MaxMessagesPerTask MaxMessagesPerTask MaxMessagesPerTask

Gets or sets the maximum number of messages that may be processed per task.

NameFormat NameFormat NameFormat NameFormat

Gets or sets the format string to use when a block is queried for its name.

TaskScheduler TaskScheduler TaskScheduler TaskScheduler

Gets or sets the TaskScheduler to use for scheduling tasks.


Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to