C# Class NuGet.StreamExtensions

Show file Open project: monoman/NugetCracker

Public Methods

Method Description
AsStream ( this value ) : Stream
AsStream ( this value, Encoding encoding ) : Stream
ContentEquals ( this stream, Stream otherStream ) : bool
ReadAllBytes ( this stream ) : byte[]
ReadToEnd ( this stream ) : string
ToStreamFactory ( this stream ) : Func

Turns an existing stream into one that a stream factory that can be reopened.

Method Details

AsStream() public static method

public static AsStream ( this value ) : Stream
value this
return Stream

AsStream() public static method

public static AsStream ( this value, Encoding encoding ) : Stream
value this
encoding System.Text.Encoding
return Stream

ContentEquals() public static method

public static ContentEquals ( this stream, Stream otherStream ) : bool
stream this
otherStream Stream
return bool

ReadAllBytes() public static method

public static ReadAllBytes ( this stream ) : byte[]
stream this
return byte[]

ReadToEnd() public static method

public static ReadToEnd ( this stream ) : string
stream this
return string

ToStreamFactory() public static method

Turns an existing stream into one that a stream factory that can be reopened.
public static ToStreamFactory ( this stream ) : Func
stream this
return Func