Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataflowBlock::TryReceive<TOutput> Method (IReceivableSourceBlock<TOutput>^, TOutput)

 

Attempts to synchronously receive an item from the ISourceBlock<TOutput>.

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

public:
generic<typename TOutput>
[ExtensionAttribute]
static bool TryReceive(
	IReceivableSourceBlock<TOutput>^ source,
	[OutAttribute] TOutput% item
)

Parameters

source
Type: System.Threading.Tasks.Dataflow::IReceivableSourceBlock<TOutput>^

The source from which to receive.

item
Type: TOutput

The item received from the source.

Return Value

Type: System::Boolean

true if an item could be received; otherwise, false.

Type Parameters

TOutput

Specifies the type of data contained in the source.

This method does not wait until the source has an item to provide.

It will return whether or not an element was available.

Return to top
Show:
© 2017 Microsoft