Core/CafeLib.Core/Extensions/StreamExtensions.cs
/// <summary>
/// Converts stream to byte array.
/// </summary>
/// <param name="stream">stream</param>
/// <returns>byte array</returns>
Converts stream to byte array.
Converts stream to byte array .
public static async Task<byte[]> ToByteArrayAsync(this Stream stream)
        {
            await using var memoryStream = await stream.ToMemoryStreamAsync().ConfigureAwait(false);
            return memoryStream.ToArray();
        }
public static async Task < byte [ ] > ToByteArrayAsync ( this Stream stream ) { await using var memoryStream = await stream . ToMemoryStreamAsync ( ) . ConfigureAwait ( false ) ; return memoryStream . ToArray ( ) ; }
Converts stream to byte array.
Converts stream to byte array .
None
Stream
this
stream
None