Export (0) Print
Expand All

DataflowBlockOptions Class

.NET Framework 4.5

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

Namespace:  System.Threading.Tasks.Dataflow
Assembly:  System.Threading.Tasks.Dataflow (in System.Threading.Tasks.Dataflow.dll)

public class DataflowBlockOptions

The DataflowBlockOptions type exposes the following members.

  NameDescription
Public methodSupported by Portable Class LibraryDataflowBlockOptionsInitializes a new DataflowBlockOptions.
Top

  NameDescription
Public propertySupported by Portable Class LibraryBoundedCapacityGets or sets the maximum number of messages that may be buffered by the block.
Public propertySupported by Portable Class LibraryCancellationTokenGets or sets the CancellationToken to monitor for cancellation requests.
Public propertySupported by Portable Class LibraryMaxMessagesPerTaskGets or sets the maximum number of messages that may be processed per task.
Public propertySupported by Portable Class LibraryNameFormatGets or sets the format string to use when a block is queried for its name.
Public propertySupported by Portable Class LibraryTaskSchedulerGets or sets the TaskScheduler to use for scheduling tasks.
Top

  NameDescription
Public methodSupported by Portable Class LibraryEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodSupported by Portable Class LibraryFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Portable Class LibraryGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodSupported by Portable Class LibraryGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodSupported by Portable Class LibraryMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by Portable Class LibraryToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public fieldStatic memberSupported by Portable Class LibraryUnboundedA constant used to specify an unlimited quantity for DataflowBlockOptions members that provide an upper bound. This field is constant.
Top

NoteNote

The TPL Dataflow Library (System.Threading.Tasks.Dataflow namespace) is not distributed with the .NET Framework 4.5. To install the System.Threading.Tasks.Dataflow namespace, open your project in Visual Studio 2012, choose Manage NuGet Packages from the Project menu, and search online for the Microsoft.Tpl.Dataflow package.

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.

.NET Framework

Supported in: 4.5

Portable Class Library

Supported in: Portable Class Library

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft