Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

TransformBlock(Of TInput, TOutput).TryReceive Method

.NET Framework 4.6 and 4.5

Attempts to synchronously receive an available output item from the IReceivableSourceBlock(Of TOutput).

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

'Declaration
Public Function TryReceive ( _
	filter As Predicate(Of TOutput), _
	<OutAttribute> ByRef item As TOutput _
) As Boolean

Parameters

filter
Type: System.Predicate(Of TOutput)

The predicate value must successfully pass in order for it to be received. filter may be Nothing, in which case all items will pass.

item
Type: TOutput

The item received from the source.

Return Value

Type: System.Boolean
true if an item could be received; otherwise, false.

Implements

IReceivableSourceBlock(Of TOutput).TryReceive(Predicate(Of TOutput), TOutput)

This method does not block waiting for the source to provide an item.

It will return after checking for an element, whether or not an element was available.

.NET Framework

Supported in: 4.5

Portable Class Library

Supported in: Portable Class Library
Show:
© 2015 Microsoft