BatchedJoinBlock<T1,T2>.ISourceBlock<Tuple<IList<T1>,IList<T2>>>.ConsumeMessage Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Przekazuje własność komunikatu zidentyfikowanego przez DataflowMessageHeader wystąpienie z tego ISourceBlock<TOutput> wystąpienia do ITargetBlock<TInput>.
virtual Tuple<System::Collections::Generic::IList<T1> ^, System::Collections::Generic::IList<T2> ^> ^ System.Threading.Tasks.Dataflow.ISourceBlock<System.Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>>>.ConsumeMessage(System::Threading::Tasks::Dataflow::DataflowMessageHeader messageHeader, System::Threading::Tasks::Dataflow::ITargetBlock<Tuple<System::Collections::Generic::IList<T1> ^, System::Collections::Generic::IList<T2> ^> ^> ^ target, [Runtime::InteropServices::Out] bool % messageConsumed) = System::Threading::Tasks::Dataflow::ISourceBlock<Tuple<System::Collections::Generic::IList<T1> ^, System::Collections::Generic::IList<T2> ^> ^>::ConsumeMessage;
Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>> ISourceBlock<Tuple<IList<T1>,IList<T2>>>.ConsumeMessage (System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock<Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>>> target, out bool messageConsumed);
abstract member System.Threading.Tasks.Dataflow.ISourceBlock<System.Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>>>.ConsumeMessage : System.Threading.Tasks.Dataflow.DataflowMessageHeader * System.Threading.Tasks.Dataflow.ITargetBlock<System.Collections.Generic.IList<'T1> * System.Collections.Generic.IList<'T2>> * bool -> System.Collections.Generic.IList<'T1> * System.Collections.Generic.IList<'T2>
override this.System.Threading.Tasks.Dataflow.ISourceBlock<System.Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>>>.ConsumeMessage : System.Threading.Tasks.Dataflow.DataflowMessageHeader * System.Threading.Tasks.Dataflow.ITargetBlock<System.Collections.Generic.IList<'T1> * System.Collections.Generic.IList<'T2>> * bool -> System.Collections.Generic.IList<'T1> * System.Collections.Generic.IList<'T2>
Function ConsumeMessage (messageHeader As DataflowMessageHeader, target As ITargetBlock(Of Tuple(Of IList(Of T1), IList(Of T2))), ByRef messageConsumed As Boolean) As Tuple(Of IList(Of T1), IList(Of T2)) Implements ISourceBlock(Of Tuple(Of IList(Of T1), IList(Of T2))).ConsumeMessage
Parametry
- messageHeader
- DataflowMessageHeader
Komunikat DataflowMessageHeader , który ma zostać użyty.
- target
- ITargetBlock<Tuple<IList<T1>,IList<T2>>>
Element ITargetBlock<TInput> , dla którego ma zostać użyty komunikat.
- messageConsumed
- Boolean
true
jeśli komunikat został pomyślnie użyty. false
Inaczej.
Zwraca
Wartość zużytego komunikatu. Może to odpowiadać innej DataflowMessageHeader liczbie wystąpień niż wcześniej zarezerwowane i przekazane jako messageHeader
do tej metody. Użycie ITargetBlock<TInput> musi używać zwróconej wartości zamiast wartości przekazanej jako messageValue
.OfferMessage(DataflowMessageHeader, TInput, ISourceBlock<TInput>, Boolean) Jeśli żądany komunikat jest niedostępny, zwracana wartość to null
(Nothing
w Visual Basic).
Implementuje
Wyjątki
Wartość jest nieprawidłowa messageHeader
.
Is target
null
(Nic w Visual Basic).
Uwagi
Dla ITargetBlock<TInput> którego komunikat ma być używany, nie musi być połączony z tym ISourceBlock<TOutput> wystąpieniem. Co więcej, to ISourceBlock<TOutput> wystąpienie może nigdy nie zaoferować komunikatu bezpośrednio do .ITargetBlock<TInput>