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

Internal utilities
Показать файл Открыть проект

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

Метод Описание
GetEncryptionResponse ( TDSPreLoginTokenEncryptionType client, TDSPreLoginTokenEncryptionType server ) : TDSPreLoginTokenEncryptionType

Generate an encryption response based on the client request and server setting

Log ( TextWriter log, string prefix, object instance ) : void

Log object content into destination

ResolveEncryption ( TDSPreLoginTokenEncryptionType client, TDSPreLoginTokenEncryptionType server ) : TDSEncryptionType

Convert indications of encryption support by client and server into expected behavior

SerializedWriteLineToLog ( TextWriter log, string text ) : void

Serialized write line to destination

WriteUInt ( Stream destination, uint value ) : void

Write unsigned integer into the stream

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

Метод Описание
ReadInt ( Stream source ) : int

Read signed integer from the packet

ReadPasswordString ( Stream source, ushort length ) : string

Read a password string and decrypt it

ReadString ( Stream source, ushort length ) : string

Read string from the packet

ReadUInt ( Stream source ) : uint

Read unsigned integer from the stream

ReadULong ( Stream source ) : ulong

Read unsigned long from the stream

ReadUShort ( Stream source ) : ushort

Read unsigned short from the packet

WriteInt ( Stream destination, int value ) : void

Write signed integer into the stream

WritePasswordString ( Stream destination, string value ) : void

Write password string encrypted into the packet

WriteString ( Stream destination, string value ) : void

Write string from into the packet

WriteULong ( Stream destination, ulong value ) : void

Write unsigned long into the stream

WriteUShort ( Stream destination, ushort value ) : void

Write unsigned short into the stream

WriteUShortBigEndian ( Stream destination, ushort value ) : void

Write unsigned short into the stream in network byte order (big-endian)

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

GetEncryptionResponse() публичный статический Метод

Generate an encryption response based on the client request and server setting
public static GetEncryptionResponse ( TDSPreLoginTokenEncryptionType client, TDSPreLoginTokenEncryptionType server ) : TDSPreLoginTokenEncryptionType
client TDSPreLoginTokenEncryptionType A value received from the client
server TDSPreLoginTokenEncryptionType Configuration of the server
Результат TDSPreLoginTokenEncryptionType

Log() публичный статический Метод

Log object content into destination
public static Log ( TextWriter log, string prefix, object instance ) : void
log System.IO.TextWriter Destination
prefix string Prefix the output with
instance object Object to log
Результат void

ResolveEncryption() публичный статический Метод

Convert indications of encryption support by client and server into expected behavior
public static ResolveEncryption ( TDSPreLoginTokenEncryptionType client, TDSPreLoginTokenEncryptionType server ) : TDSEncryptionType
client TDSPreLoginTokenEncryptionType
server TDSPreLoginTokenEncryptionType
Результат TDSEncryptionType

SerializedWriteLineToLog() публичный статический Метод

Serialized write line to destination
public static SerializedWriteLineToLog ( TextWriter log, string text ) : void
log System.IO.TextWriter Destination
text string Text to log
Результат void

WriteUInt() публичный статический Метод

Write unsigned integer into the stream
public static WriteUInt ( Stream destination, uint value ) : void
destination Stream
value uint
Результат void