Sdílet prostřednictvím


BatchedJoinBlock<T1,T2>.TryReceive Metoda

Definice

Pokusí se synchronně přijmout dostupnou výstupní položku z .IReceivableSourceBlock<TOutput>

public:
 virtual bool TryReceive(Predicate<Tuple<System::Collections::Generic::IList<T1> ^, System::Collections::Generic::IList<T2> ^> ^> ^ filter, [Runtime::InteropServices::Out] Tuple<System::Collections::Generic::IList<T1> ^, System::Collections::Generic::IList<T2> ^> ^ % item);
public bool TryReceive (Predicate<Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>>> filter, out Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>> item);
public bool TryReceive (Predicate<Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>>>? filter, out Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>>? item);
abstract member TryReceive : Predicate<System.Collections.Generic.IList<'T1> * System.Collections.Generic.IList<'T2>> * Tuple -> bool
override this.TryReceive : Predicate<System.Collections.Generic.IList<'T1> * System.Collections.Generic.IList<'T2>> * Tuple -> bool
Public Function TryReceive (filter As Predicate(Of Tuple(Of IList(Of T1), IList(Of T2))), ByRef item As Tuple(Of IList(Of T1), IList(Of T2))) As Boolean

Parametry

filter
Predicate<Tuple<IList<T1>,IList<T2>>>

Predikát musí úspěšně předat hodnotu, aby byla přijata. filter může být null, v takovém případě budou všechny položky předávat.

item
Tuple<IList<T1>,IList<T2>>

Položka přijatá ze zdroje.

Návraty

Boolean

true pokud by mohla být přijata položka; falsev opačném případě .

Poznámky

Tato metoda neblokuje čekání na poskytnutí položky zdroje.

Vrátí se po kontrole prvku, zda byl prvek k dispozici nebo ne.

Platí pro