Rediger

Del via


ExecutionDataflowBlockOptions Class

Definition

Provides options used to configure the processing performed by dataflow blocks that process each message through the invocation of a user-provided delegate. These are dataflow blocks such as ActionBlock<TInput> and TransformBlock<TInput,TOutput>.

public ref class ExecutionDataflowBlockOptions : System::Threading::Tasks::Dataflow::DataflowBlockOptions
public class ExecutionDataflowBlockOptions : System.Threading.Tasks.Dataflow.DataflowBlockOptions
type ExecutionDataflowBlockOptions = class
    inherit DataflowBlockOptions
Public Class ExecutionDataflowBlockOptions
Inherits DataflowBlockOptions
Inheritance
ExecutionDataflowBlockOptions

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.

ExecutionDataflowBlockOptions 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
CancellationToken None
MaxMessagesPerTask DataflowBlockOptions.Unbounded (-1)
BoundedCapacity DataflowBlockOptions.Unbounded (-1)
MaxDegreeOfParallelism 1

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

Constructors

ExecutionDataflowBlockOptions()

Initializes a new ExecutionDataflowBlockOptions.

Fields

Unbounded

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

(Inherited from DataflowBlockOptions)

Properties

BoundedCapacity

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

(Inherited from DataflowBlockOptions)
CancellationToken

Gets or sets the CancellationToken to monitor for cancellation requests.

(Inherited from DataflowBlockOptions)
EnsureOrdered

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

(Inherited from DataflowBlockOptions)
MaxDegreeOfParallelism

Gets the maximum number of messages that may be processed by the block concurrently.

MaxMessagesPerTask

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

(Inherited from DataflowBlockOptions)
NameFormat

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

(Inherited from DataflowBlockOptions)
SingleProducerConstrained

Gets whether code using the dataflow block is constrained to one producer at a time.

TaskScheduler

Gets or sets the TaskScheduler to use for scheduling tasks.

(Inherited from DataflowBlockOptions)

Methods

Equals(Object)

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

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to