C# Class Dse.EndianBitConverter

Equivalent of System.BitConverter but let's you choose the endianness.
Afficher le fichier Open project: datastax/csharp-driver-dse

Méthodes publiques

Méthode Description
ToDouble ( bool isLittleEndian, byte buffer, int offset ) : double

Returns a signed 64-bit double from eight bytes at specified offset from the buffer.

ToInt64 ( bool isLittleEndian, byte buffer, int offset ) : long

Returns a signed 64-bit integer from eight bytes at specified offset from the buffer.

Private Methods

Méthode Description
SetBytes ( bool isLittleEndian, byte buffer, int offset, double value ) : void

Converts an 64-bit double into an array of bytes and sets to the buffer starting at the specified offset.

SetBytes ( bool isLittleEndian, byte buffer, int offset, int value ) : void

Converts an int into an array of bytes and sets to the buffer starting at the specified offset.

SetBytes ( bool isLittleEndian, byte buffer, int offset, long value ) : void

Converts an int into an array of bytes and sets to the buffer starting at the specified offset.

ToInt32 ( bool isLittleEndian, byte buffer, int offset ) : int

Returns a signed 32-bit integer from four bytes at specified offset from the buffer.

Method Details

ToDouble() public static méthode

Returns a signed 64-bit double from eight bytes at specified offset from the buffer.
public static ToDouble ( bool isLittleEndian, byte buffer, int offset ) : double
isLittleEndian bool
buffer byte
offset int
Résultat double

ToInt64() public static méthode

Returns a signed 64-bit integer from eight bytes at specified offset from the buffer.
public static ToInt64 ( bool isLittleEndian, byte buffer, int offset ) : long
isLittleEndian bool
buffer byte
offset int
Résultat long