JoinBlock<T1,T2,T3>.ISourceBlock<Tuple<T1,T2,T3>>.ConsumeMessage(DataflowMessageHeader, ITargetBlock<Tuple<T1,T2,T3>>, Boolean) Método
Definição
Passa a propriedade da mensagem identificada pelo DataflowMessageHeader desta instância de ISourceBlock<TOutput> para o ITargetBlock<TInput>.Passes the ownership of the message identified by the DataflowMessageHeader from this ISourceBlock<TOutput> instance to the ITargetBlock<TInput>.
virtual Tuple<T1, T2, T3> ^ System.Threading.Tasks.Dataflow.ISourceBlock<System.Tuple<T1,T2,T3>>.ConsumeMessage(System::Threading::Tasks::Dataflow::DataflowMessageHeader messageHeader, System::Threading::Tasks::Dataflow::ITargetBlock<Tuple<T1, T2, T3> ^> ^ target, [Runtime::InteropServices::Out] bool % messageConsumed) = System::Threading::Tasks::Dataflow::ISourceBlock<Tuple<T1, T2, T3> ^>::ConsumeMessage;
Tuple<T1,T2,T3> ISourceBlock<Tuple<T1,T2,T3>>.ConsumeMessage (System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock<Tuple<T1,T2,T3>> target, out bool messageConsumed);
abstract member System.Threading.Tasks.Dataflow.ISourceBlock<System.Tuple<T1,T2,T3>>.ConsumeMessage : System.Threading.Tasks.Dataflow.DataflowMessageHeader * System.Threading.Tasks.Dataflow.ITargetBlock<'T1 * 'T2 * 'T3> * bool -> 'T1 * 'T2 * 'T3
override this.System.Threading.Tasks.Dataflow.ISourceBlock<System.Tuple<T1,T2,T3>>.ConsumeMessage : System.Threading.Tasks.Dataflow.DataflowMessageHeader * System.Threading.Tasks.Dataflow.ITargetBlock<'T1 * 'T2 * 'T3> * bool -> 'T1 * 'T2 * 'T3
Function ConsumeMessage (messageHeader As DataflowMessageHeader, target As ITargetBlock(Of Tuple(Of T1, T2, T3)), ByRef messageConsumed As Boolean) As Tuple(Of T1, T2, T3) Implements ISourceBlock(Of Tuple(Of T1, T2, T3)).ConsumeMessage
Parâmetros
- messageHeader
- DataflowMessageHeader
O DataflowMessageHeader da mensagem a ser consumida.The DataflowMessageHeader of the message that is to be consumed.
- target
- ITargetBlock<Tuple<T1,T2,T3>>
O ITargetBlock<TInput> para o qual a mensagem deverá ser consumida.The ITargetBlock<TInput> for which the message is to be consumed.
- messageConsumed
- Boolean
true se a mensagem tiver sido consumida com êxito.true if the message was successfully consumed. false caso contrário.false otherwise.
Retornos
O valor da mensagem consumida.The value of the consumed message. Pode corresponder a uma instância DataflowMessageHeader diferente do que foi reservado anteriormente e passado como o messageHeader para este método.This may correspond to a different DataflowMessageHeader instance than was previously reserved and passed as the messageHeader to this method. O ITargetBlock<TInput> de consumo deve usar o valor retornado em vez do valor passado como messageValue para OfferMessage(DataflowMessageHeader, TInput, ISourceBlock<TInput>, Boolean).The consuming ITargetBlock<TInput> must use the returned value instead of the value passed as messageValue to OfferMessage(DataflowMessageHeader, TInput, ISourceBlock<TInput>, Boolean). Se a mensagem solicitada não estiver disponível, o valor retornado será null (Nothing em Visual Basic).If the message requested is not available, the return value is null (Nothing in Visual Basic).
Implementações
Exceções
O messageHeader não é válido.The messageHeader is not valid.
O target é null (Nothing no Visual Basic).The target is null (Nothing in Visual Basic).
Comentários
O ITargetBlock<TInput> para o qual a mensagem a ser consumida não precisa ser vinculado dessa ISourceBlock<TOutput> instância.The ITargetBlock<TInput> for which the message is to be consumed need not be linked from this ISourceBlock<TOutput> instance. Além disso, essa ISourceBlock<TOutput> instância pode nunca ter oferecido a mensagem diretamente ao ITargetBlock<TInput> .Moreover, this ISourceBlock<TOutput> instance may have never offered the message directly to the ITargetBlock<TInput>.