C# Класс Microsoft.SqlServer.TDS.TDSStream

Stream that wraps the data with TDS protocol
Наследование: Stream
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
_AllocateIncomingPacket void
_AllocateOutgoingPacket void
_CreateOutgoingPacket void
_EnsureIncomingPacketHasData bool
_EnsureOutgoingPacketHasSpace void
_MoveToNextIncomingPacketHeader bool
_SendCurrentPacket void

Открытые методы

Метод Описание
Close ( ) : void

Close the stream

EndMessage ( ) : void

Send the last packet of the message and complete the request/response

Flush ( ) : void

Flush the data into the underlying stream

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

Read the data from the stream

ReadNextHeader ( ) : bool

Read packet header

Seek ( long offset, SeekOrigin origin ) : long

Seek position in the stream

SetLength ( long value ) : void

Set stream length

StartMessage ( TDSMessageType type ) : void

Start a new message

TDSStream ( Stream innerStream ) : System

Initialization constructor

TDSStream ( Stream innerStream, bool leaveInnerStreamOpen ) : System

Initialization constructor

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

Write data into the stream

Приватные методы

Метод Описание
_AllocateIncomingPacket ( ) : void

Prepare to read and inflate incoming packet

_AllocateOutgoingPacket ( ) : void

Allocate or reallocate a packet

_CreateOutgoingPacket ( TDSMessageType type, byte packetID ) : void

Create a new TDS packet in the message

_EnsureIncomingPacketHasData ( ) : bool

This routine checks whether current packet still has data to read and moves to the next if it doesn't

_EnsureOutgoingPacketHasSpace ( ) : void

Ensures that the current packet has at least a single spare byte

_MoveToNextIncomingPacketHeader ( ) : bool

Skip current packet if it is pending and move to the next packet, reading only the header

_SendCurrentPacket ( ) : void

Serialize current packet into the underlying stream

Описание методов

Close() публичный Метод

Close the stream
public Close ( ) : void
Результат void

EndMessage() публичный Метод

Send the last packet of the message and complete the request/response
public EndMessage ( ) : void
Результат void

Flush() публичный Метод

Flush the data into the underlying stream
public Flush ( ) : void
Результат void

Read() публичный Метод

Read the data from the stream
public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
Результат int

ReadNextHeader() публичный Метод

Read packet header
public ReadNextHeader ( ) : bool
Результат bool

Seek() публичный Метод

Seek position in the stream
public Seek ( long offset, SeekOrigin origin ) : long
offset long
origin SeekOrigin
Результат long

SetLength() публичный Метод

Set stream length
public SetLength ( long value ) : void
value long
Результат void

StartMessage() публичный Метод

Start a new message
public StartMessage ( TDSMessageType type ) : void
type TDSMessageType Type of the message to start
Результат void

TDSStream() публичный Метод

Initialization constructor
public TDSStream ( Stream innerStream ) : System
innerStream Stream
Результат System

TDSStream() публичный Метод

Initialization constructor
public TDSStream ( Stream innerStream, bool leaveInnerStreamOpen ) : System
innerStream Stream
leaveInnerStreamOpen bool
Результат System

Write() публичный Метод

Write data into the stream
public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
Результат void