Skip to content

Commit 18345c6

Browse files
authored
System.Threading.Tasks.Dataflow automatic port of comments (#3939)
* System.Threading.Tasks.Dataflow automatic port of comments * Exceptions
1 parent f7a58a3 commit 18345c6

File tree

4 files changed

+227
-63
lines changed

4 files changed

+227
-63
lines changed

xml/System.Threading.Tasks.Dataflow/BatchedJoinBlock`2.xml

Lines changed: 57 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@
256256
<returns>An IDisposable that, upon calling Dispose, will unlink the source from the target.</returns>
257257
<remarks>To be added.</remarks>
258258
<exception cref="T:System.ArgumentNullException">
259-
<paramref name="target" /> is null (Nothing in Visual Basic) or <paramref name="linkOptions" /> is null (Nothing in Visual Basic).</exception>
259+
<paramref name="target" /> is <see langword="null" /> (Nothing in Visual Basic) or <paramref name="linkOptions" /> is <see langword="null" /> (Nothing in Visual Basic).</exception>
260260
</Docs>
261261
</Member>
262262
<Member MemberName="OutputCount">
@@ -353,12 +353,25 @@ After `Fault` has been called on a dataflow block, that block will complete, suc
353353
<Parameter Name="messageConsumed" Type="System.Boolean" RefType="out" />
354354
</Parameters>
355355
<Docs>
356-
<param name="messageHeader">To be added.</param>
357-
<param name="target">To be added.</param>
358-
<param name="messageConsumed">To be added.</param>
359-
<summary>To be added.</summary>
360-
<returns>To be added.</returns>
361-
<remarks>To be added.</remarks>
356+
<param name="messageHeader">The <see cref="T:System.Threading.Tasks.Dataflow.DataflowMessageHeader" /> of the message that is to be consumed.</param>
357+
<param name="target">The <see cref="T:System.Threading.Tasks.Dataflow.ITargetBlock`1" /> for which the message is to be consumed.</param>
358+
<param name="messageConsumed">
359+
<see langword="true" /> if the message was successfully consumed. <see langword="false" /> otherwise.</param>
360+
<summary>Passes the ownership of the message identified by the <see cref="T:System.Threading.Tasks.Dataflow.DataflowMessageHeader" /> from this <see cref="T:System.Threading.Tasks.Dataflow.ISourceBlock`1" /> instance to the <see cref="T:System.Threading.Tasks.Dataflow.ITargetBlock`1" />.</summary>
361+
<returns> The value of the consumed message. This may correspond to a different <see cref="T:System.Threading.Tasks.Dataflow.DataflowMessageHeader" /> instance than was previously reserved and passed as the <paramref name="messageHeader" /> to <see cref="M:ConsumeMessage" />. The consuming <see cref="T:System.Threading.Tasks.Dataflow.ITargetBlock`1" /> must use the returned value instead of the value passed as messageValue through <see cref="M:OfferMessage" />.
362+
If the message requested is not available, the return value will be <see langword="null" /> (Nothing in Visual Basic).
363+
</returns>
364+
<remarks>
365+
<format type="text/markdown"><![CDATA[
366+
367+
## Remarks
368+
369+
The <xref:System.Threading.Tasks.Dataflow.ITargetBlock`1> for which the message is to be consumed need not be linked from this <xref:System.Threading.Tasks.Dataflow.ISourceBlock`1> instance. Moreover, this <xref:System.Threading.Tasks.Dataflow.ISourceBlock`1> instance may have never offered the message directly to the <xref:System.Threading.Tasks.Dataflow.ITargetBlock`1>.
370+
371+
]]></format>
372+
</remarks>
373+
<exception cref="T:System.ArgumentException">The <paramref name="messageHeader" /> is not valid.</exception>
374+
<exception cref="T:System.ArgumentNullException">The <paramref name="target" /> is <see langword="null" /> (Nothing in Visual Basic).</exception>
362375
</Docs>
363376
</Member>
364377
<Member MemberName="System.Threading.Tasks.Dataflow.ISourceBlock&lt;System.Tuple&lt;System.Collections.Generic.IList&lt;T1&gt;,System.Collections.Generic.IList&lt;T2&gt;&gt;&gt;.ReleaseReservation">
@@ -389,10 +402,23 @@ After `Fault` has been called on a dataflow block, that block will complete, suc
389402
<Parameter Name="target" Type="System.Threading.Tasks.Dataflow.ITargetBlock&lt;System.Tuple&lt;System.Collections.Generic.IList&lt;T1&gt;,System.Collections.Generic.IList&lt;T2&gt;&gt;&gt;" />
390403
</Parameters>
391404
<Docs>
392-
<param name="messageHeader">To be added.</param>
393-
<param name="target">To be added.</param>
394-
<summary>To be added.</summary>
395-
<remarks>To be added.</remarks>
405+
<param name="messageHeader">The <see cref="T:System.Threading.Tasks.Dataflow.DataflowMessageHeader" /> of the reserved message.</param>
406+
<param name="target">The <see cref="T:System.Threading.Tasks.Dataflow.ITargetBlock`1" /> that currently holds the reservation.</param>
407+
<summary>Releases the right to pass the ownership of the message identified by the <see cref="T:System.Threading.Tasks.Dataflow.DataflowMessageHeader" /> from this <see cref="T:System.Threading.Tasks.Dataflow.ISourceBlock`1" /> to the <see cref="T:System.Threading.Tasks.Dataflow.ITargetBlock`1" />.</summary>
408+
<remarks>
409+
<format type="text/markdown"><![CDATA[
410+
411+
## Remarks
412+
413+
The <xref:System.Threading.Tasks.Dataflow.ITargetBlock`1> that holds the reservation need not be linked from this <xref:System.Threading.Tasks.Dataflow.ISourceBlock`1> instance. Moreover, this <xref:System.Threading.Tasks.Dataflow.ISourceBlock`1> instance may have never offered the message directly to the <xref:System.Threading.Tasks.Dataflow.ITargetBlock`1>.
414+
It is required that this message has been previously reserved for the same <xref:System.Threading.Tasks.Dataflow.ITargetBlock`1>.
415+
416+
417+
]]></format>
418+
</remarks>
419+
<exception cref="T:System.ArgumentException">The <paramref name="messageHeader" /> is not valid.</exception>
420+
<exception cref="T:System.ArgumentNullException">The <paramref name="target" /> is <see langword="null" /> (Nothing in Visual Basic).</exception>
421+
<exception cref="T:System.InvalidOperationException">The <paramref name="target" /> did not have the message reserved.</exception>
396422
</Docs>
397423
</Member>
398424
<Member MemberName="System.Threading.Tasks.Dataflow.ISourceBlock&lt;System.Tuple&lt;System.Collections.Generic.IList&lt;T1&gt;,System.Collections.Generic.IList&lt;T2&gt;&gt;&gt;.ReserveMessage">
@@ -423,11 +449,26 @@ After `Fault` has been called on a dataflow block, that block will complete, suc
423449
<Parameter Name="target" Type="System.Threading.Tasks.Dataflow.ITargetBlock&lt;System.Tuple&lt;System.Collections.Generic.IList&lt;T1&gt;,System.Collections.Generic.IList&lt;T2&gt;&gt;&gt;" />
424450
</Parameters>
425451
<Docs>
426-
<param name="messageHeader">To be added.</param>
427-
<param name="target">To be added.</param>
428-
<summary>To be added.</summary>
429-
<returns>To be added.</returns>
430-
<remarks>To be added.</remarks>
452+
<param name="messageHeader">The <see cref="T:System.Threading.Tasks.Dataflow.DataflowMessageHeader" /> of the message that is to be reserved.</param>
453+
<param name="target">The <see cref="T:System.Threading.Tasks.Dataflow.ITargetBlock`1" /> for which the message is to be reserved.</param>
454+
<summary>Reserves the right to pass the ownership of the message identified by the <see cref="T:System.Threading.Tasks.Dataflow.DataflowMessageHeader" /> from this <see cref="T:System.Threading.Tasks.Dataflow.ISourceBlock`1" /> to the <see cref="T:System.Threading.Tasks.Dataflow.ITargetBlock`1" />.</summary>
455+
<returns>
456+
<see langword="true" /> if the message was successfully reserved; otherwise, <see langword="false" />.</returns>
457+
<remarks>
458+
<format type="text/markdown"><![CDATA[
459+
460+
## Remarks
461+
462+
The <xref:System.Threading.Tasks.Dataflow.ITargetBlock`1> for which the message is to be reserved need not be linked from this <xref:System.Threading.Tasks.Dataflow.ISourceBlock`1> instance. Moreover, this <xref:System.Threading.Tasks.Dataflow.ISourceBlock`1> instance may have never offered the message directly to the <xref:System.Threading.Tasks.Dataflow.ITargetBlock`1>.
463+
If `true` is returned, either <xref:ConsumeMessage> or <xref:ReleaseReservation> for this message must be subsequently called with the same <xref:System.Threading.Tasks.Dataflow.DataflowMessageHeader> and <xref:System.Threading.Tasks.Dataflow.ITargetBlock`1>.
464+
Failure to do so may result in the source being unable to propagate any further messages to any target.
465+
<xref:ReserveMessage> must not be called while the target is holding any internal locks. Doing so will violate the lock hierarchy necessary to avoid deadlocks in a dataflow network.
466+
467+
468+
]]></format>
469+
</remarks>
470+
<exception cref="T:System.ArgumentException">The <paramref name="messageHeader" /> is not valid.</exception>
471+
<exception cref="T:System.ArgumentNullException">The <paramref name="target" /> is <see langword="null" /> (Nothing in Visual Basic).</exception>
431472
</Docs>
432473
</Member>
433474
<Member MemberName="Target1">

xml/System.Threading.Tasks.Dataflow/BatchedJoinBlock`3.xml

Lines changed: 57 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@
257257
<returns>An IDisposable that, upon calling Dispose, will unlink the source from the target.</returns>
258258
<remarks>To be added.</remarks>
259259
<exception cref="T:System.ArgumentNullException">
260-
<paramref name="target" /> is null (Nothing in Visual Basic) or <paramref name="linkOptions" /> is null (Nothing in Visual Basic).</exception>
260+
<paramref name="target" /> is <see langword="null" /> (Nothing in Visual Basic) or <paramref name="linkOptions" /> is <see langword="null" /> (Nothing in Visual Basic).</exception>
261261
</Docs>
262262
</Member>
263263
<Member MemberName="OutputCount">
@@ -355,12 +355,25 @@
355355
<Parameter Name="messageConsumed" Type="System.Boolean" RefType="out" />
356356
</Parameters>
357357
<Docs>
358-
<param name="messageHeader">To be added.</param>
359-
<param name="target">To be added.</param>
360-
<param name="messageConsumed">To be added.</param>
361-
<summary>To be added.</summary>
362-
<returns>To be added.</returns>
363-
<remarks>To be added.</remarks>
358+
<param name="messageHeader">The <see cref="T:System.Threading.Tasks.Dataflow.DataflowMessageHeader" /> of the message that is to be consumed.</param>
359+
<param name="target">The <see cref="T:System.Threading.Tasks.Dataflow.ITargetBlock`1" /> for which the message is to be consumed.</param>
360+
<param name="messageConsumed">
361+
<see langword="true" /> if the message was successfully consumed. <see langword="false" /> otherwise.</param>
362+
<summary>Passes the ownership of the message identified by the <see cref="T:System.Threading.Tasks.Dataflow.DataflowMessageHeader" /> from this <see cref="T:System.Threading.Tasks.Dataflow.ISourceBlock`1" /> instance to the <see cref="T:System.Threading.Tasks.Dataflow.ITargetBlock`1" />.</summary>
363+
<returns> The value of the consumed message. This may correspond to a different <see cref="T:System.Threading.Tasks.Dataflow.DataflowMessageHeader" /> instance than was previously reserved and passed as the <paramref name="messageHeader" /> to <see cref="M:ConsumeMessage" />. The consuming <see cref="T:System.Threading.Tasks.Dataflow.ITargetBlock`1" /> must use the returned value instead of the value passed as messageValue through <see cref="M:OfferMessage" />.
364+
If the message requested is not available, the return value will be <see langword="null" /> (Nothing in Visual Basic).
365+
</returns>
366+
<remarks>
367+
<format type="text/markdown"><![CDATA[
368+
369+
## Remarks
370+
371+
The <xref:System.Threading.Tasks.Dataflow.ITargetBlock`1> for which the message is to be consumed need not be linked from this <xref:System.Threading.Tasks.Dataflow.ISourceBlock`1> instance. Moreover, this <xref:System.Threading.Tasks.Dataflow.ISourceBlock`1> instance may have never offered the message directly to the <xref:System.Threading.Tasks.Dataflow.ITargetBlock`1>.
372+
373+
]]></format>
374+
</remarks>
375+
<exception cref="T:System.ArgumentException">The <paramref name="messageHeader" /> is not valid.</exception>
376+
<exception cref="T:System.ArgumentNullException">The <paramref name="target" /> is <see langword="null" /> (Nothing in Visual Basic).</exception>
364377
</Docs>
365378
</Member>
366379
<Member MemberName="System.Threading.Tasks.Dataflow.ISourceBlock&lt;System.Tuple&lt;System.Collections.Generic.IList&lt;T1&gt;,System.Collections.Generic.IList&lt;T2&gt;,System.Collections.Generic.IList&lt;T3&gt;&gt;&gt;.ReleaseReservation">
@@ -391,10 +404,23 @@
391404
<Parameter Name="target" Type="System.Threading.Tasks.Dataflow.ITargetBlock&lt;System.Tuple&lt;System.Collections.Generic.IList&lt;T1&gt;,System.Collections.Generic.IList&lt;T2&gt;,System.Collections.Generic.IList&lt;T3&gt;&gt;&gt;" />
392405
</Parameters>
393406
<Docs>
394-
<param name="messageHeader">To be added.</param>
395-
<param name="target">To be added.</param>
396-
<summary>To be added.</summary>
397-
<remarks>To be added.</remarks>
407+
<param name="messageHeader">The <see cref="T:System.Threading.Tasks.Dataflow.DataflowMessageHeader" /> of the reserved message.</param>
408+
<param name="target">The <see cref="T:System.Threading.Tasks.Dataflow.ITargetBlock`1" /> that currently holds the reservation.</param>
409+
<summary>Releases the right to pass the ownership of the message identified by the <see cref="T:System.Threading.Tasks.Dataflow.DataflowMessageHeader" /> from this <see cref="T:System.Threading.Tasks.Dataflow.ISourceBlock`1" /> to the <see cref="T:System.Threading.Tasks.Dataflow.ITargetBlock`1" />.</summary>
410+
<remarks>
411+
<format type="text/markdown"><![CDATA[
412+
413+
## Remarks
414+
415+
The <xref:System.Threading.Tasks.Dataflow.ITargetBlock`1> that holds the reservation need not be linked from this <xref:System.Threading.Tasks.Dataflow.ISourceBlock`1> instance. Moreover, this <xref:System.Threading.Tasks.Dataflow.ISourceBlock`1> instance may have never offered the message directly to the <xref:System.Threading.Tasks.Dataflow.ITargetBlock`1>.
416+
It is required that this message has been previously reserved for the same <xref:System.Threading.Tasks.Dataflow.ITargetBlock`1>.
417+
418+
419+
]]></format>
420+
</remarks>
421+
<exception cref="T:System.ArgumentException">The <paramref name="messageHeader" /> is not valid.</exception>
422+
<exception cref="T:System.ArgumentNullException">The <paramref name="target" /> is <see langword="null" /> (Nothing in Visual Basic).</exception>
423+
<exception cref="T:System.InvalidOperationException">The <paramref name="target" /> did not have the message reserved.</exception>
398424
</Docs>
399425
</Member>
400426
<Member MemberName="System.Threading.Tasks.Dataflow.ISourceBlock&lt;System.Tuple&lt;System.Collections.Generic.IList&lt;T1&gt;,System.Collections.Generic.IList&lt;T2&gt;,System.Collections.Generic.IList&lt;T3&gt;&gt;&gt;.ReserveMessage">
@@ -425,11 +451,26 @@
425451
<Parameter Name="target" Type="System.Threading.Tasks.Dataflow.ITargetBlock&lt;System.Tuple&lt;System.Collections.Generic.IList&lt;T1&gt;,System.Collections.Generic.IList&lt;T2&gt;,System.Collections.Generic.IList&lt;T3&gt;&gt;&gt;" />
426452
</Parameters>
427453
<Docs>
428-
<param name="messageHeader">To be added.</param>
429-
<param name="target">To be added.</param>
430-
<summary>To be added.</summary>
431-
<returns>To be added.</returns>
432-
<remarks>To be added.</remarks>
454+
<param name="messageHeader">The <see cref="T:System.Threading.Tasks.Dataflow.DataflowMessageHeader" /> of the message that is to be reserved.</param>
455+
<param name="target">The <see cref="T:System.Threading.Tasks.Dataflow.ITargetBlock`1" /> for which the message is to be reserved.</param>
456+
<summary>Reserves the right to pass the ownership of the message identified by the <see cref="T:System.Threading.Tasks.Dataflow.DataflowMessageHeader" /> from this <see cref="T:System.Threading.Tasks.Dataflow.ISourceBlock`1" /> to the <see cref="T:System.Threading.Tasks.Dataflow.ITargetBlock`1" />.</summary>
457+
<returns>
458+
<see langword="true" /> if the message was successfully reserved; otherwise, <see langword="false" />.</returns>
459+
<remarks>
460+
<format type="text/markdown"><![CDATA[
461+
462+
## Remarks
463+
464+
The <xref:System.Threading.Tasks.Dataflow.ITargetBlock`1> for which the message is to be reserved need not be linked from this <xref:System.Threading.Tasks.Dataflow.ISourceBlock`1> instance. Moreover, this <xref:System.Threading.Tasks.Dataflow.ISourceBlock`1> instance may have never offered the message directly to the <xref:System.Threading.Tasks.Dataflow.ITargetBlock`1>.
465+
If `true` is returned, either <xref:ConsumeMessage> or <xref:ReleaseReservation> for this message must be subsequently called with the same <xref:System.Threading.Tasks.Dataflow.DataflowMessageHeader> and <xref:System.Threading.Tasks.Dataflow.ITargetBlock`1>.
466+
Failure to do so may result in the source being unable to propagate any further messages to any target.
467+
<xref:ReserveMessage> must not be called while the target is holding any internal locks. Doing so will violate the lock hierarchy necessary to avoid deadlocks in a dataflow network.
468+
469+
470+
]]></format>
471+
</remarks>
472+
<exception cref="T:System.ArgumentException">The <paramref name="messageHeader" /> is not valid.</exception>
473+
<exception cref="T:System.ArgumentNullException">The <paramref name="target" /> is <see langword="null" /> (Nothing in Visual Basic).</exception>
433474
</Docs>
434475
</Member>
435476
<Member MemberName="Target1">

0 commit comments

Comments
 (0)