BatchedJoinBlock<T1,T2>.TryReceive Metoda

Definicja

Próbuje synchronicznie odebrać dostępny element wyjściowy z elementu 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>>>

Predykat musi pomyślnie przekazać wartość, aby została odebrana. filter może to być null, w którym przypadku wszystkie elementy zostaną przekazane.

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

Element otrzymany ze źródła.

Zwraca

Boolean

true jeśli element może zostać odebrany; w przeciwnym razie , false.

Uwagi

Ta metoda nie blokuje oczekiwania na podanie elementu przez źródło.

Zostanie zwrócony po sprawdzeniu elementu, czy element był dostępny.

Dotyczy