共用方式為


BatchedJoinBlock<T1,T2,T3>.ISourceBlock<Tuple<IList<T1>,IList<T2>,IList<T3>>>.ConsumeMessage 方法

定義

將 所 DataflowMessageHeader 識別訊息的擁有權從這個 ISourceBlock<TOutput> 實例傳遞至 ITargetBlock<TInput>

 virtual Tuple<System::Collections::Generic::IList<T1> ^, System::Collections::Generic::IList<T2> ^, System::Collections::Generic::IList<T3> ^> ^ System.Threading.Tasks.Dataflow.ISourceBlock<System.Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>,System.Collections.Generic.IList<T3>>>.ConsumeMessage(System::Threading::Tasks::Dataflow::DataflowMessageHeader messageHeader, System::Threading::Tasks::Dataflow::ITargetBlock<Tuple<System::Collections::Generic::IList<T1> ^, System::Collections::Generic::IList<T2> ^, System::Collections::Generic::IList<T3> ^> ^> ^ target, [Runtime::InteropServices::Out] bool % messageConsumed) = System::Threading::Tasks::Dataflow::ISourceBlock<Tuple<System::Collections::Generic::IList<T1> ^, System::Collections::Generic::IList<T2> ^, System::Collections::Generic::IList<T3> ^> ^>::ConsumeMessage;
Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>,System.Collections.Generic.IList<T3>> ISourceBlock<Tuple<IList<T1>,IList<T2>,IList<T3>>>.ConsumeMessage (System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock<Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>,System.Collections.Generic.IList<T3>>> target, out bool messageConsumed);
abstract member System.Threading.Tasks.Dataflow.ISourceBlock<System.Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>,System.Collections.Generic.IList<T3>>>.ConsumeMessage : System.Threading.Tasks.Dataflow.DataflowMessageHeader * System.Threading.Tasks.Dataflow.ITargetBlock<System.Collections.Generic.IList<'T1> * System.Collections.Generic.IList<'T2> * System.Collections.Generic.IList<'T3>> * bool -> System.Collections.Generic.IList<'T1> * System.Collections.Generic.IList<'T2> * System.Collections.Generic.IList<'T3>
override this.System.Threading.Tasks.Dataflow.ISourceBlock<System.Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>,System.Collections.Generic.IList<T3>>>.ConsumeMessage : System.Threading.Tasks.Dataflow.DataflowMessageHeader * System.Threading.Tasks.Dataflow.ITargetBlock<System.Collections.Generic.IList<'T1> * System.Collections.Generic.IList<'T2> * System.Collections.Generic.IList<'T3>> * bool -> System.Collections.Generic.IList<'T1> * System.Collections.Generic.IList<'T2> * System.Collections.Generic.IList<'T3>
Function ConsumeMessage (messageHeader As DataflowMessageHeader, target As ITargetBlock(Of Tuple(Of IList(Of T1), IList(Of T2), IList(Of T3))), ByRef messageConsumed As Boolean) As Tuple(Of IList(Of T1), IList(Of T2), IList(Of T3)) Implements ISourceBlock(Of Tuple(Of IList(Of T1), IList(Of T2), IList(Of T3))).ConsumeMessage

參數

messageHeader
DataflowMessageHeader

要取用的訊息的 DataflowMessageHeader

target
ITargetBlock<Tuple<IList<T1>,IList<T2>,IList<T3>>>

要取用訊息的 ITargetBlock<TInput>

messageConsumed
Boolean

如果成功取用訊息,則為 true。 否則為 false

傳回

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

使用的訊息的值。 這會對應到的 DataflowMessageHeader 執行個體,可能會和先前已保留並作為 messageHeader 傳遞到此方法的執行個體不同。 取用 ITargetBlock<TInput> 必須使用傳回的值,而不是作為 messageValue 傳遞至 OfferMessage(DataflowMessageHeader, TInput, ISourceBlock<TInput>, Boolean) 的值。 如果無法取得要求的訊息,則傳回值為 null (在 Visual Basic 中為 Nothing)。

實作

例外狀況

messageHeader 無效。

targetnull (在 Visual Basic 中為 Nothing)。

備註

ITargetBlock<TInput>要取用訊息的 ,不需要從這個 ISourceBlock<TOutput> 實例連結。 此外,這個 ISourceBlock<TOutput> 實例可能從未將訊息直接 ITargetBlock<TInput> 提供給 。

適用於