共用方式為


BatchedJoinBlock<T1,T2,T3>.TryReceive 方法

定義

嘗試以同步方式從 IReceivableSourceBlock<TOutput> 接收可用的輸出項目。

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

參數

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

述詞的值必須成功傳遞才能讓它接收。 filter 可以是 null,在這種情況下所有項目都會通過。

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

從來源接收的項目。

傳回

Boolean

如果可以接收項目,則為 true,否則為 false

備註

此方法不會封鎖等候來源提供專案。

它會在檢查項目之後傳回,不論專案是否可用。

適用於