Class StreamExtensions
Provides some convenience methods to use with System.IO.Stream objects.
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: Stubbery
Assembly: Stubbery.dll
Syntax
public static class StreamExtensions
Methods
| Improve this Doc View SourceReadAsString(Stream)
Reads the whole stream
as a string synchronously.
Declaration
public static string ReadAsString(this Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream to read. |
Returns
Type | Description |
---|---|
System.String | The whole content of the stream. |
ReadAsStringAsync(Stream)
Reads the whole stream
as a string asynchronously.
Declaration
public static async Task<string> ReadAsStringAsync(this Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream to read. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | The System.Threading.Tasks.Task representing the asynchronous operation. |