C# Class Microsoft.SqlServer.TDS.EndPoint.PlaceholderStream

A simple pass-through implementation of stream that allows dynamically switching the underlying stream
Inheritance: Stream
Mostra file Open project: dotnet/corefx Class Usage Examples

Public Methods

Method Description
Close ( ) : void

Close the stream

Flush ( ) : void

Flush the data into the underlying stream

PlaceholderStream ( Stream innerStream ) : System

Initialization constructor

PlaceholderStream ( Stream innerStream, bool leaveInnerStreamOpen ) : System

Initialization constructor

Read ( byte buffer, int offset, int count ) : int

Read the data from the stream

ReadAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task
Seek ( long offset, SeekOrigin origin ) : long

Seek position in the stream

SetLength ( long value ) : void

Set stream length

Write ( byte buffer, int offset, int count ) : void

Write data into the stream

WriteAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task

Method Details

Close() public method

Close the stream
public Close ( ) : void
return void

Flush() public method

Flush the data into the underlying stream
public Flush ( ) : void
return void

PlaceholderStream() public method

Initialization constructor
public PlaceholderStream ( Stream innerStream ) : System
innerStream Stream
return System

PlaceholderStream() public method

Initialization constructor
public PlaceholderStream ( Stream innerStream, bool leaveInnerStreamOpen ) : System
innerStream Stream
leaveInnerStreamOpen bool
return System

Read() public method

Read the data from the stream
public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
return int

ReadAsync() public method

public ReadAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task
buffer byte
offset int
count int
cancellationToken System.Threading.CancellationToken
return Task

Seek() public method

Seek position in the stream
public Seek ( long offset, SeekOrigin origin ) : long
offset long
origin SeekOrigin
return long

SetLength() public method

Set stream length
public SetLength ( long value ) : void
value long
return void

Write() public method

Write data into the stream
public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
return void

WriteAsync() public method

public WriteAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task
buffer byte
offset int
count int
cancellationToken System.Threading.CancellationToken
return Task