BatchedJoinBlock<T1,T2>.ISourceBlock<Tuple<IList<T1>,IList<T2>>>.ReserveMessage メソッド

定義

権利を予約して、DataflowMessageHeader によって識別されるメッセージの所有権をこの ISourceBlock<TOutput> から ITargetBlock<TInput> に渡します。

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

パラメーター

messageHeader
DataflowMessageHeader

予約されるメッセージの DataflowMessageHeader

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

メッセージが使用される ITargetBlock<TInput>

戻り値

Boolean

メッセージが正常に予約された場合は true、それ以外の場合は false

実装

例外

messageHeader が有効ではありません。

targetnull (Visual Basic の場合は Nothing) です。

注釈

ITargetBlock<TInput>メッセージを予約する対象は、このISourceBlock<TOutput>インスタンスからリンクする必要はありません。 さらに、この ISourceBlock<TOutput> インスタンスはメッセージを直接 ITargetBlock<TInput>.

返された場合trueは、その後、同じDataflowMessageHeaderメッセージをITargetBlock<TInput>使用してReleaseReservationこのメッセージをConsumeMessage呼び出す必要があります。 そうしないと、ソースがそれ以上のメッセージをターゲットに伝達できない可能性があります。

ターゲットが内部ロックを保持している間は呼び出 ReserveMessage さないでください。 これを行うと、データフロー ネットワークのデッドロックを回避するために必要なロック階層に違反します。

適用対象