Show / Hide Table of Contents

    Class StreamExtensions

    Extension methods for the System.IO.Stream class.

    Inheritance
    System.Object
    StreamExtensions
    Namespace: Cuemon.IO
    Assembly: Cuemon.Core.dll
    Syntax
    public static class StreamExtensions

    Methods

    | Improve this Doc

    WriteAsync(Stream, Byte[])

    Asynchronously writes a sequence of bytes to the current stream with the entire size of the buffer starting from position 0.

    Declaration
    public static Task WriteAsync(this Stream stream, byte[] buffer)
    Parameters
    Type Name Description
    System.IO.Stream stream

    The System.IO.Stream to extend.

    System.Byte[] buffer

    The buffer to write data from.

    Returns
    Type Description
    System.Threading.Tasks.Task

    A task that represents the asynchronous write operation.

    Exceptions
    Type Condition
    System.ArgumentNullException

    buffer is null.

    System.NotSupportedException

    The stream does not support writing.

    System.ObjectDisposedException

    The stream has been disposed.

    System.InvalidOperationException

    The stream is currently in use by a previous write operation.

    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX