@@ -14,7 +14,7 @@ namespace System.Net.Http
1414{
1515 /// <summary>
1616 /// Provides an <see cref="HttpContent"/> implementation that exposes an output <see cref="Stream"/>
17- /// which can be written to directly. The ability to push data to the output stream differs from the
17+ /// which can be written to directly. The ability to push data to the output stream differs from the
1818 /// <see cref="StreamContent"/> where data is pulled and not pushed.
1919 /// </summary>
2020 public class PushStreamContent : HttpContent
@@ -24,8 +24,8 @@ public class PushStreamContent : HttpContent
2424 /// <summary>
2525 /// Initializes a new instance of the <see cref="PushStreamContent"/> class. The
2626 /// <paramref name="onStreamAvailable"/> action is called when an output stream
27- /// has become available allowing the action to write to it directly. When the
28- /// stream is closed, it will signal to the content that is has completed and the
27+ /// has become available allowing the action to write to it directly. When the
28+ /// stream is closed, it will signal to the content that it has completed and the
2929 /// HTTP request or response will be completed.
3030 /// </summary>
3131 /// <param name="onStreamAvailable">The action to call when an output stream is available.</param>
@@ -35,10 +35,11 @@ public PushStreamContent(Action<Stream, HttpContent, TransportContext> onStreamA
3535 }
3636
3737 /// <summary>
38- /// Initializes a new instance of the <see cref="PushStreamContent"/> class.
38+ /// Initializes a new instance of the <see cref="PushStreamContent"/> class.
3939 /// </summary>
40- /// <param name="onStreamAvailable">The action to call when an output stream is available. The stream is automatically
41- /// closed when the return task is completed.</param>
40+ /// <param name="onStreamAvailable">The action to call when an output stream is available. When the
41+ /// output stream is closed or disposed, it will signal to the content that it has completed and the
42+ /// HTTP request or response will be completed.</param>
4243 public PushStreamContent ( Func < Stream , HttpContent , TransportContext , Task > onStreamAvailable )
4344 : this ( onStreamAvailable , ( MediaTypeHeaderValue ) null )
4445 {
@@ -47,6 +48,8 @@ public PushStreamContent(Func<Stream, HttpContent, TransportContext, Task> onStr
4748 /// <summary>
4849 /// Initializes a new instance of the <see cref="PushStreamContent"/> class with the given media type.
4950 /// </summary>
51+ /// <param name="onStreamAvailable">The action to call when an output stream is available.</param>
52+ /// <param name="mediaType">The value of the Content-Type content header on an HTTP response.</param>
5053 public PushStreamContent ( Action < Stream , HttpContent , TransportContext > onStreamAvailable , string mediaType )
5154 : this ( Taskify ( onStreamAvailable ) , new MediaTypeHeaderValue ( mediaType ) )
5255 {
@@ -55,6 +58,10 @@ public PushStreamContent(Action<Stream, HttpContent, TransportContext> onStreamA
5558 /// <summary>
5659 /// Initializes a new instance of the <see cref="PushStreamContent"/> class with the given media type.
5760 /// </summary>
61+ /// <param name="onStreamAvailable">The action to call when an output stream is available. When the
62+ /// output stream is closed or disposed, it will signal to the content that it has completed and the
63+ /// HTTP request or response will be completed.</param>
64+ /// <param name="mediaType">The value of the Content-Type content header on an HTTP response.</param>
5865 public PushStreamContent ( Func < Stream , HttpContent , TransportContext , Task > onStreamAvailable , string mediaType )
5966 : this ( onStreamAvailable , new MediaTypeHeaderValue ( mediaType ) )
6067 {
@@ -63,6 +70,8 @@ public PushStreamContent(Func<Stream, HttpContent, TransportContext, Task> onStr
6370 /// <summary>
6471 /// Initializes a new instance of the <see cref="PushStreamContent"/> class with the given <see cref="MediaTypeHeaderValue"/>.
6572 /// </summary>
73+ /// <param name="onStreamAvailable">The action to call when an output stream is available.</param>
74+ /// <param name="mediaType">The value of the Content-Type content header on an HTTP response.</param>
6675 public PushStreamContent ( Action < Stream , HttpContent , TransportContext > onStreamAvailable , MediaTypeHeaderValue mediaType )
6776 : this ( Taskify ( onStreamAvailable ) , mediaType )
6877 {
@@ -71,6 +80,10 @@ public PushStreamContent(Action<Stream, HttpContent, TransportContext> onStreamA
7180 /// <summary>
7281 /// Initializes a new instance of the <see cref="PushStreamContent"/> class with the given <see cref="MediaTypeHeaderValue"/>.
7382 /// </summary>
83+ /// <param name="onStreamAvailable">The action to call when an output stream is available. When the
84+ /// output stream is closed or disposed, it will signal to the content that it has completed and the
85+ /// HTTP request or response will be completed.</param>
86+ /// <param name="mediaType">The value of the Content-Type content header on an HTTP response.</param>
7487 public PushStreamContent ( Func < Stream , HttpContent , TransportContext , Task > onStreamAvailable , MediaTypeHeaderValue mediaType )
7588 {
7689 if ( onStreamAvailable == null )
@@ -98,8 +111,8 @@ private static Func<Stream, HttpContent, TransportContext, Task> Taskify(
98111 }
99112
100113 /// <summary>
101- /// When this method is called, it calls the action provided in the constructor with the output
102- /// stream to write to. Once the action has completed its work it closes the stream which will
114+ /// When this method is called, it calls the action provided in the constructor with the output
115+ /// stream to write to. Once the action has completed its work it closes the stream which will
103116 /// close this content instance and complete the HTTP request or response.
104117 /// </summary>
105118 /// <param name="stream">The <see cref="Stream"/> to which to write.</param>
@@ -142,8 +155,8 @@ public CompleteTaskOnCloseStream(Stream innerStream, TaskCompletionSource<bool>
142155
143156#if NETFX_CORE
144157 [ SuppressMessage (
145- "Microsoft.Usage" ,
146- "CA2215:Dispose methods should call base class dispose" ,
158+ "Microsoft.Usage" ,
159+ "CA2215:Dispose methods should call base class dispose" ,
147160 Justification = "See comments, this is intentional." ) ]
148161 protected override void Dispose ( bool disposing )
149162 {
0 commit comments