Partilhar via


BatchedJoinBlock<T1,T2,T3>.ISourceBlock<Tuple<IList<T1>,IList<T2>,IList<T3>>>.ReserveMessage Método

Definição

Reserva o direito de passar a propriedade da mensagem identificada pelo DataflowMessageHeader desse ISourceBlock<TOutput> para o 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

Parâmetros

messageHeader
DataflowMessageHeader

O DataflowMessageHeader da mensagem a ser reservada.

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

O ITargetBlock<TInput> para o qual a mensagem deverá ser reservada.

Retornos

Boolean

true se a mensagem foi reservada com êxito; caso contrário, false.

Implementações

Exceções

O messageHeader não é válido.

O target é null (Nothing no Visual Basic).

Comentários

A ITargetBlock<TInput> mensagem para a qual a mensagem deve ser reservada não precisa ser vinculada dessa ISourceBlock<TOutput> instância. Além disso, essa ISourceBlock<TOutput> instância pode nunca ter oferecido a mensagem diretamente ao ITargetBlock<TInput>.

Se true for retornado, você deverá ligar ConsumeMessage posteriormente ou ReleaseReservation para essa mensagem com o mesmo DataflowMessageHeader e ITargetBlock<TInput>. Se você não fizer isso, a origem poderá não conseguir propagar mais mensagens para qualquer destino.

Não ligue ReserveMessage enquanto o destino estiver mantendo bloqueios internos. Isso violará a hierarquia de bloqueio necessária para evitar deadlocks em uma rede de fluxo de dados.

Aplica-se a