C# Класс Test.MiniCBOR

Contains lightweight methods for reading and writing CBOR data.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
ReadBoolean ( Stream stream ) : bool
ReadDouble ( Stream stream ) : double

Reads a double-precision floating point number in CBOR format from a data stream.

ReadInt32 ( Stream stream ) : int

Reads a 32-bit integer in CBOR format from a data stream. If the object read is a floating-point number, it is truncated to an integer.

WriteBoolean ( bool value, Stream stream ) : void
WriteInt32 ( int value, Stream stream ) : void

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

Метод Описание
HalfPrecisionToSingle ( int value ) : float
ReadFP ( Stream stream, int headByte ) : double
ReadInteger ( Stream stream, int headByte, bool check32bit ) : long
ToDouble ( long value ) : double
ToSingle ( int value ) : float

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

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

public static ReadBoolean ( Stream stream ) : bool
stream Stream
Результат bool

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

Reads a double-precision floating point number in CBOR format from a data stream.
The end of the stream was /// reached, or the object read isn't a number. The parameter is null.
public static ReadDouble ( Stream stream ) : double
stream Stream A data stream.
Результат double

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

Reads a 32-bit integer in CBOR format from a data stream. If the object read is a floating-point number, it is truncated to an integer.
The end of the stream was /// reached, or the object read isn't a number, or can't fit a 32-bit /// integer. The parameter is null.
public static ReadInt32 ( Stream stream ) : int
stream Stream A data stream.
Результат int

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

public static WriteBoolean ( bool value, Stream stream ) : void
value bool
stream Stream
Результат void

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

public static WriteInt32 ( int value, Stream stream ) : void
value int
stream Stream
Результат void