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 SourceReadAllBytes(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. |
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. |