BatchedJoinBlock<T1,T2>.TryReceive Метод

Определение

Пытается синхронно получать доступный выходной элемент из .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

Параметры

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

Предикат, который должен успешно передать значение, чтобы оно было получено. filter может быть null, в этом случае все элементы будут передаваться.

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

Элемент, полученный из источника.

Возвращаемое значение

Значение в противном случае .

Комментарии

Этот метод не блокирует ожидание предоставления элемента источником.

Он возвращается после проверки наличия элемента, независимо от того, был ли доступен элемент.

Применяется к