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

Definizione

Riserva il diritto di passare la proprietà del messaggio identificato da DataflowMessageHeader da questa istanza di ISourceBlock<TOutput> a 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

Parametri

messageHeader
DataflowMessageHeader

DataflowMessageHeader del messaggio da prenotare.

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

ITargetBlock<TInput> per cui deve essere prenotato il messaggio.

Restituisce

true se il messaggio è stato riservato, false in caso contrario.

Implementazioni

Eccezioni

L'elemento messageHeader non è valido.

target è null (Nothing in Visual Basic).

Commenti

L'oggetto ITargetBlock<TInput> per il quale il messaggio deve essere riservato non deve essere collegato da questa ISourceBlock<TOutput> istanza. Inoltre, questa ISourceBlock<TOutput> istanza potrebbe non aver mai offerto il messaggio direttamente all'oggetto ITargetBlock<TInput>.

Se true viene restituito, è necessario chiamare ConsumeMessage successivamente o ReleaseReservation per questo messaggio con lo stesso DataflowMessageHeader e ITargetBlock<TInput>. In caso contrario, l'origine potrebbe non essere in grado di propagare altri messaggi a qualsiasi destinazione.

Non chiamare ReserveMessage mentre la destinazione mantiene blocchi interni. In questo modo verrà violata la gerarchia di blocchi necessaria per evitare deadlock in una rete del flusso di dati.

Si applica a