BatchedJoinBlock<T1,T2,T3>.ISourceBlock<Tuple<IList<T1>,IList<T2>,IList<T3>>>.ReserveMessage Metoda

Definicja

Zastrzega sobie prawo do przekazania własności wiadomości zidentyfikowanej przez DataflowMessageHeader element z tego ISourceBlock<TOutput> do .ITargetBlock<TInput>

 virtual bool System.Threading.Tasks.Dataflow.ISourceBlock<System.Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>,System.Collections.Generic.IList<T3>>>.ReserveMessage(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) = System::Threading::Tasks::Dataflow::ISourceBlock<Tuple<System::Collections::Generic::IList<T1> ^, System::Collections::Generic::IList<T2> ^, System::Collections::Generic::IList<T3> ^> ^>::ReserveMessage;
bool ISourceBlock<Tuple<IList<T1>,IList<T2>,IList<T3>>>.ReserveMessage (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);
abstract member System.Threading.Tasks.Dataflow.ISourceBlock<System.Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>,System.Collections.Generic.IList<T3>>>.ReserveMessage : 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
override this.System.Threading.Tasks.Dataflow.ISourceBlock<System.Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>,System.Collections.Generic.IList<T3>>>.ReserveMessage : 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
Function ReserveMessage (messageHeader As DataflowMessageHeader, target As ITargetBlock(Of Tuple(Of IList(Of T1), IList(Of T2), IList(Of T3)))) As Boolean Implements ISourceBlock(Of Tuple(Of IList(Of T1), IList(Of T2), IList(Of T3))).ReserveMessage

Parametry

messageHeader
DataflowMessageHeader

Wiadomość DataflowMessageHeader , która ma być zarezerwowana.

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

Element ITargetBlock<TInput> , dla którego komunikat ma być zarezerwowany.

Zwraca

Boolean

true jeśli komunikat został pomyślnie zarezerwowany; w przeciwnym razie , false.

Implementuje

Wyjątki

Wartość jest nieprawidłowa messageHeader .

Wartość target is null (Nothing w Visual Basic).

Uwagi

Element ITargetBlock<TInput> , dla którego komunikat ma być zarezerwowany, nie musi być połączony z tym ISourceBlock<TOutput> wystąpieniem. Ponadto to ISourceBlock<TOutput> wystąpienie mogło nigdy nie oferować komunikatu bezpośrednio do elementu ITargetBlock<TInput>.

Jeśli true zostanie zwrócona, musisz następnie wywołać jedną ConsumeMessage lub ReleaseReservation dla tej wiadomości z tym samym DataflowMessageHeader i ITargetBlock<TInput>. Jeśli tego nie zrobisz, źródło może nie być w stanie rozpropagować dalszych komunikatów do żadnego obiektu docelowego.

Nie należy wywoływać ReserveMessage , gdy element docelowy przechowuje jakiekolwiek blokady wewnętrzne. Spowoduje to naruszenie hierarchii blokady niezbędnej do uniknięcia zakleszczeń w sieci przepływu danych.

Dotyczy