Show / Hide Table of Contents

Class StreamExtensions

A stream extensions.

Inheritance
System.Object
StreamExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.IO
Assembly: Kephas.Core.dll
Syntax
public static class StreamExtensions

Methods

| Improve this Doc View Source

ReadAllBytes(Stream)

A Stream extension method that reads all bytes.

Declaration
public static byte[] ReadAllBytes(this Stream input)
Parameters
Type Name Description
System.IO.Stream input

The input to act on.

Returns
Type Description
System.Byte[]

An array of byte.

| Improve this Doc View Source

ReadAllBytesAsync(Stream, CancellationToken)

A Stream extension method that reads all bytes asynchronously.

Declaration
public static Task<byte[]> ReadAllBytesAsync(this Stream input, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.IO.Stream input

The input to act on.

System.Threading.CancellationToken cancellationToken

Optional. the cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Byte[]>

An array of byte.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX