C# Class Baseline.StreamExtensions

显示文件 Open project: JasperFx/baseline

Public Methods

Method Description
ReadAllBytes ( this stream ) : byte[]

Read all the bytes in a Stream from its current location to a byte[] array

ReadAllBytesAsync ( this stream ) : Task

Asynchronously read all the bytes in a Stream from its current location to a byte[] array

ReadAllText ( this stream ) : string

Read the contents of a Stream from its current location into a String

ReadAllTextAsync ( this stream ) : Task

Asynchronously read the contents of a Stream from its current location into a String

Method Details

ReadAllBytes() public static method

Read all the bytes in a Stream from its current location to a byte[] array
public static ReadAllBytes ( this stream ) : byte[]
stream this
return byte[]

ReadAllBytesAsync() public static method

Asynchronously read all the bytes in a Stream from its current location to a byte[] array
public static ReadAllBytesAsync ( this stream ) : Task
stream this
return Task

ReadAllText() public static method

Read the contents of a Stream from its current location into a String
public static ReadAllText ( this stream ) : string
stream this
return string

ReadAllTextAsync() public static method

Asynchronously read the contents of a Stream from its current location into a String
public static ReadAllTextAsync ( this stream ) : Task
stream this
return Task