source/Logging/source/RequestResponseMiddleware/ResponseStreamReader.cs
/// <summary>
/// Returns copy of input stream. Expect stream to be seekable and position to be at 0;
/// </summary>
/// <returns>copy of stream</returns>
Returns copy of input stream. Expect stream to be seekable and position to be at 0.
Returns copy of input stream . Expect stream to be seekable and position to be at 0 .
public static async Task<Stream> CopyBodyStreamAsync(Stream fromStream)
        {
            var ms = new MemoryStream();
            await fromStream.CopyToAsync(ms);
            await ms.FlushAsync();
            ms.Position = 0;
            return ms;
        }
public static async Task < Stream > CopyBodyStreamAsync ( Stream fromStream ) { var ms = new MemoryStream ( ) ; await fromStream . CopyToAsync ( ms ) ; await ms . FlushAsync ( ) ; ms . Position = 0 ; return ms ; }
Returns copy of input stream.
Returns copy of input stream .
copy of stream
copy of stream
fromStream
Stream