The CBOR reader that is able to read CBOR-encoded data from a stream.
More...
|
int | SequenceLength => sequenceLength |
| Returns the length of the current stream sequence. More...
|
|
string | Fieldname => fieldname |
| Returns the fieldname asssociated with the current CBORType. More...
|
|
CBORType | CurrentType => currentType |
| Returns the current CBORType. More...
|
|
bool | InObject => context.IsObject |
| Returns true if the reader is currently within an object structure. Otherwise false. More...
|
|
bool | InArray => context.IsArray |
| Returns true if the reader is currently within an array structure. Otherwise false. More...
|
|
int | StructureDepth => context.Depth |
| Returns the depth level of the current structure. A depth of 0 indicates the 'root' level. More...
|
|
bool | IsEndOfStream => reader.IsEndOfStream |
| Returns true if the reader has reached the end of the stream. Otherwise false. More...
|
|
Stream | BaseStream => reader.BaseStream |
| Returns the underlying stream. More...
|
|
The CBOR reader that is able to read CBOR-encoded data from a stream.
PushTechnology.ClientInterface.IO.CBOR.CBORReader.CBORReader |
( |
Stream |
inputStream | ) |
|
Creates a new CBORReader that is able to read CBOR-encoded data from a given input stream.
The reader does not take ownership of the given inputStream . The stream needs to be disposed of if it is no longer needed.
- Parameters
-
inputStream | The input stream to read CBOR-encoded data from. |
- Exceptions
-
ArgumentNullException | The given stream is null . |
ArgumentException | The given stream does not support reading. |
bool PushTechnology.ClientInterface.IO.CBOR.CBORReader.GetBoolean |
( |
| ) |
|
Returns the current CBORType value as a boolean.
- Returns
- The current CBORType value as a boolean.
- Exceptions
-
byte [] PushTechnology.ClientInterface.IO.CBOR.CBORReader.GetBytes |
( |
| ) |
|
Returns the current CBORType value as a sequence of bytes.
This will return the internal byte array instead of a copy.
- Returns
- The current CBORType value as a sequence of bytes.
- Exceptions
-
double PushTechnology.ClientInterface.IO.CBOR.CBORReader.GetFloatingPoint |
( |
| ) |
|
Returns the current CBORType value as a 64-bit floating point.
- Returns
- The current CBORType value as a 64-bit floating point.
- Exceptions
-
long PushTechnology.ClientInterface.IO.CBOR.CBORReader.GetInteger |
( |
| ) |
|
Returns the current CBORType value as a 64-bit signed integer.
- Returns
- The current CBORType value as a 64-bit signed integer.
- Exceptions
-
string PushTechnology.ClientInterface.IO.CBOR.CBORReader.GetString |
( |
| ) |
|
Returns the current CBORType value as a UTF-8 encoded string.
- Returns
- The current CBORType value as a UTF-8 encoded string.
- Exceptions
-
long PushTechnology.ClientInterface.IO.CBOR.CBORReader.GetTag |
( |
| ) |
|
Returns the tag value that is associated with the current CBORType.
- Returns
- The tag as a positive 64-bit signed integer value. -1 if the current CBORType has not been preceded by a tag.
Reads from a CBOR-encoded stream in a visitor-style fashion.
- Parameters
-
reader | The reader instance to use for reading operations. |
callback | The callback instance to report the results to. |
- Exceptions
-
ArgumentNullException | The given reader or callback are null . |
CBORType PushTechnology.ClientInterface.IO.CBOR.CBORReader.ReadNext |
( |
| ) |
|
Reads the next CBORType from the input stream.
- Returns
- The next CBORType or null if the reader has reached the end of the stream.
- Exceptions
-
Stream PushTechnology.ClientInterface.IO.CBOR.CBORReader.BaseStream => reader.BaseStream |
Returns the underlying stream.
CBORType PushTechnology.ClientInterface.IO.CBOR.CBORReader.CurrentType => currentType |
string PushTechnology.ClientInterface.IO.CBOR.CBORReader.Fieldname => fieldname |
Returns the fieldname asssociated with the current CBORType.
bool PushTechnology.ClientInterface.IO.CBOR.CBORReader.InArray => context.IsArray |
Returns true if the reader is currently within an array structure. Otherwise false.
bool PushTechnology.ClientInterface.IO.CBOR.CBORReader.InObject => context.IsObject |
Returns true if the reader is currently within an object structure. Otherwise false.
bool PushTechnology.ClientInterface.IO.CBOR.CBORReader.IsEndOfStream => reader.IsEndOfStream |
Returns true if the reader has reached the end of the stream. Otherwise false.
int PushTechnology.ClientInterface.IO.CBOR.CBORReader.SequenceLength => sequenceLength |
Returns the length of the current stream sequence.
int PushTechnology.ClientInterface.IO.CBOR.CBORReader.StructureDepth => context.Depth |
Returns the depth level of the current structure. A depth of 0 indicates the 'root' level.
The documentation for this class was generated from the following file:
- IO.Public/CBOR/CBORReader.cs