C# Класс FoundationDB.Layers.Tuples.FdbTupleParser

Helper class that contains low-level encoders for the tuple binary format
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
MostSignificantBit ( uint v ) : int

Returns the position of the most significant bit (0-based) in a 32-bit integer

NumberOfBytes ( long v ) : int

Returns the minimum number of bytes needed to represent a value

Note: will return 1 even for == 0

NumberOfBytes ( uint v ) : int

Returns the minimum number of bytes needed to represent a value

Note: will return 1 even for == 0

NumberOfBytes ( ulong v ) : int

Returns the minimum number of bytes needed to represent a value

ParseNext ( SliceReader &reader ) : Slice

Decode the next token from a packed tuple

WriteBytes ( FoundationDB.Client.SliceWriter &writer, ArraySegment value ) : void

Writes a binary string

WriteBytes ( FoundationDB.Client.SliceWriter &writer, [ value, int offset, int count ) : void

Writes a binary string

WriteBytes ( FoundationDB.Client.SliceWriter &writer, byte value ) : void

Writes a binary string

WriteChar ( FoundationDB.Client.SliceWriter &writer, char value ) : void

Writes a char encoded in UTF-8

WriteDouble ( FoundationDB.Client.SliceWriter &writer, double value ) : void

Writes an Double at the end, and advance the cursor

WriteGuid ( FoundationDB.Client.SliceWriter &writer, System.Guid value ) : void

Writes a RFC 4122 encoded 16-byte Microsoft GUID

WriteInt32 ( FoundationDB.Client.SliceWriter &writer, int value ) : void

Writes an Int32 at the end, and advance the cursor

WriteInt64 ( FoundationDB.Client.SliceWriter &writer, long value ) : void

Writes an Int64 at the end, and advance the cursor

WriteInt8 ( FoundationDB.Client.SliceWriter &writer, byte value ) : void

Writes an UInt8 at the end, and advance the cursor

WriteNil ( FoundationDB.Client.SliceWriter &writer ) : void

Writes a null value at the end, and advance the cursor

WriteSingle ( FoundationDB.Client.SliceWriter &writer, float value ) : void

Writes an Single at the end, and advance the cursor

WriteString ( FoundationDB.Client.SliceWriter &writer, string value ) : void

Writes a string encoded in UTF-8

WriteUInt32 ( FoundationDB.Client.SliceWriter &writer, uint value ) : void

Writes an UInt32 at the end, and advance the cursor

WriteUInt64 ( FoundationDB.Client.SliceWriter &writer, ulong value ) : void

Writes an UInt64 at the end, and advance the cursor

WriteUuid128 ( FoundationDB.Client.SliceWriter &writer, Uuid128 value ) : void

Writes a RFC 4122 encoded 128-bit UUID

WriteUuid64 ( FoundationDB.Client.SliceWriter &writer, Uuid64 value ) : void

Writes a 64-bit UUID

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

Метод Описание
ParseAscii ( Slice slice ) : string
ParseBytes ( Slice slice ) : Slice
ParseDouble ( Slice slice ) : double
ParseGuid ( Slice slice ) : System.Guid
ParseInt64 ( int type, Slice slice ) : long
ParseSingle ( Slice slice ) : float
ParseUnicode ( Slice slice ) : string
ParseUuid128 ( Slice slice ) : Uuid128
ParseUuid64 ( Slice slice ) : Uuid64
TryWriteUnescapedUtf8String ( FoundationDB.Client.SliceWriter &writer, char chars, int count ) : bool
UnescapeByteString ( [ buffer, int offset, int count ) : ArraySegment
UnescapeByteStringSlow ( [ buffer, int offset, int count, int offsetOfFirstZero ) : ArraySegment
WriteChars ( FoundationDB.Client.SliceWriter &writer, char value, int offset, int count ) : void

Writes a char array encoded in UTF-8

WriteInt64Slow ( FoundationDB.Client.SliceWriter &writer, long value ) : void
WriteNulEscapedBytes ( FoundationDB.Client.SliceWriter &writer, byte type, [ value ) : void

Writes a buffer with all instances of 0 escaped as '00 FF'

WriteNulEscapedBytes ( FoundationDB.Client.SliceWriter &writer, byte type, [ value, int offset, int count ) : void

Writes a buffer with all instances of 0 escaped as '00 FF'

WriteUInt64Slow ( FoundationDB.Client.SliceWriter &writer, ulong value ) : void
WriteUnescapedAsciiChars ( FoundationDB.Client.SliceWriter &writer, char chars, int count ) : void

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

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

Returns the position of the most significant bit (0-based) in a 32-bit integer
public static MostSignificantBit ( uint v ) : int
v uint 32-bit integer
Результат int

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

Returns the minimum number of bytes needed to represent a value
Note: will return 1 even for == 0
public static NumberOfBytes ( long v ) : int
v long
Результат int

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

Returns the minimum number of bytes needed to represent a value
Note: will return 1 even for == 0
public static NumberOfBytes ( uint v ) : int
v uint
Результат int

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

Returns the minimum number of bytes needed to represent a value
public static NumberOfBytes ( ulong v ) : int
v ulong
Результат int

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

Decode the next token from a packed tuple
public static ParseNext ( SliceReader &reader ) : Slice
reader FoundationDB.Client.SliceReader Parser from wich to read the next token
Результат Slice

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

Writes a binary string
public static WriteBytes ( FoundationDB.Client.SliceWriter &writer, ArraySegment value ) : void
writer FoundationDB.Client.SliceWriter
value ArraySegment
Результат void

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

Writes a binary string
public static WriteBytes ( FoundationDB.Client.SliceWriter &writer, [ value, int offset, int count ) : void
writer FoundationDB.Client.SliceWriter
value [
offset int
count int
Результат void

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

Writes a binary string
public static WriteBytes ( FoundationDB.Client.SliceWriter &writer, byte value ) : void
writer FoundationDB.Client.SliceWriter
value byte
Результат void

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

Writes a char encoded in UTF-8
public static WriteChar ( FoundationDB.Client.SliceWriter &writer, char value ) : void
writer FoundationDB.Client.SliceWriter
value char
Результат void

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

Writes an Double at the end, and advance the cursor
public static WriteDouble ( FoundationDB.Client.SliceWriter &writer, double value ) : void
writer FoundationDB.Client.SliceWriter Target buffer
value double IEEE Floating point, 64 bits, High Endian
Результат void

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

Writes a RFC 4122 encoded 16-byte Microsoft GUID
public static WriteGuid ( FoundationDB.Client.SliceWriter &writer, System.Guid value ) : void
writer FoundationDB.Client.SliceWriter
value System.Guid
Результат void

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

Writes an Int32 at the end, and advance the cursor
public static WriteInt32 ( FoundationDB.Client.SliceWriter &writer, int value ) : void
writer FoundationDB.Client.SliceWriter Target buffer
value int Signed DWORD, 32 bits, High Endian
Результат void

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

Writes an Int64 at the end, and advance the cursor
public static WriteInt64 ( FoundationDB.Client.SliceWriter &writer, long value ) : void
writer FoundationDB.Client.SliceWriter Target buffer
value long Signed QWORD, 64 bits, High Endian
Результат void

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

Writes an UInt8 at the end, and advance the cursor
public static WriteInt8 ( FoundationDB.Client.SliceWriter &writer, byte value ) : void
writer FoundationDB.Client.SliceWriter Target buffer
value byte Unsigned BYTE, 32 bits
Результат void

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

Writes a null value at the end, and advance the cursor
public static WriteNil ( FoundationDB.Client.SliceWriter &writer ) : void
writer FoundationDB.Client.SliceWriter
Результат void

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

Writes an Single at the end, and advance the cursor
public static WriteSingle ( FoundationDB.Client.SliceWriter &writer, float value ) : void
writer FoundationDB.Client.SliceWriter Target buffer
value float IEEE Floating point, 32 bits, High Endian
Результат void

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

Writes a string encoded in UTF-8
public static WriteString ( FoundationDB.Client.SliceWriter &writer, string value ) : void
writer FoundationDB.Client.SliceWriter
value string
Результат void

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

Writes an UInt32 at the end, and advance the cursor
public static WriteUInt32 ( FoundationDB.Client.SliceWriter &writer, uint value ) : void
writer FoundationDB.Client.SliceWriter Target buffer
value uint Signed DWORD, 32 bits, High Endian
Результат void

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

Writes an UInt64 at the end, and advance the cursor
public static WriteUInt64 ( FoundationDB.Client.SliceWriter &writer, ulong value ) : void
writer FoundationDB.Client.SliceWriter Target buffer
value ulong Signed QWORD, 64 bits, High Endian
Результат void

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

Writes a RFC 4122 encoded 128-bit UUID
public static WriteUuid128 ( FoundationDB.Client.SliceWriter &writer, Uuid128 value ) : void
writer FoundationDB.Client.SliceWriter
value Uuid128
Результат void

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

Writes a 64-bit UUID
public static WriteUuid64 ( FoundationDB.Client.SliceWriter &writer, Uuid64 value ) : void
writer FoundationDB.Client.SliceWriter
value Uuid64
Результат void