A binary serialiser to convert values to byte arrays.
Converts the given bytes to the type T.
- T - The expected type that should be returned from the given byte array.
| Name | Description |
|---|---|
| value | System.Byte[] The byte data that should be decoded as an instance of an object of type T. |
Returns the de-serialised value.
Reads bytes from the inputStream and converts the data to an object of type T.
- T - The expected type that should be read from the input stream.
| Name | Description |
|---|---|
| inputStream | System.IO.Stream The stream from where the source of bytes should be read. |
Returns the de-serialised value.
Converts the given object instance into a byte array.
- T - The type of object that has been given.
| Name | Description |
|---|---|
| value | T The object instance that should be encoded in a byte array. |
Returns the serialised value as a byte array.
Converts the given object instance into a byte array and writes the output to the given stream.
- T - The type of object that has been given.
| Name | Description |
|---|---|
| value | T The object instance that should be encoded and written to the outputStream. |
| outputStream | System.IO.Stream The stream into which the output should be written. |
An implementation of a binary serialiser which uses Newtonsoft to create BSON data.
Converts the given bytes to a value of type T (assuming that the data is BSON compatible).
- T - The expected type that should be returned from the given byte data.
| Name | Description |
|---|---|
| value | System.Byte[] The byte data that should be decoded as BSON into an instance of type T. |
Returns the de-serialised value.
Reads bytes from the inputStream and converts the data to an object of type T.
- T - The expected type that should be read from the input stream.
| Name | Description |
|---|---|
| inputStream | System.IO.Stream The stream from where the source of bytes should be read. |
Returns the de-serialised value.
Converts the given value to a value that can be serialised to BSON.
- T - The type of the value that is being serialised.
| Name | Description |
|---|---|
| value | T The value which will be serialised. |
Returns an object that can be serialised to BSON.
Converts the given object instance into a BSON compatible byte array.
- T - The object type that has been given.
| Name | Description |
|---|---|
| value | T The object instance that should be encoded as BSON data. |
Returns the serialised value as a byte array.
Converts the given object instance into a byte array and writes the output to the given stream.
- T - The type of object that has been given.
| Name | Description |
|---|---|
| value | T The object instance that should be encoded and written to the outputStream. |
| outputStream | System.IO.Stream The stream into which the output should be written. |
A class used to wrap simple struct values as BSON-compatible objects.
- T - The simple type that is being wrapped.
Initialises a new instance of the BsonWrappedType<T> class with the given value.
| Name | Description |
|---|---|
| value | T The value being wrapped. |
Gets or sets the value being wrapped.
This class has not been implemented because NetStandard 1.6 does not support this operation.
Converts the given bytes to the type T.
- T - The expected type that should be returned from the given byte array.
| Name | Description |
|---|---|
| value | System.Byte[] The byte data that should be decoded as an instance of an object of type T. |
Returns the de-serialised value.
System.NotImplementedException: This exception is always returned.
Reads bytes from the inputStream and converts the data to an object of type T.
- T - The expected type that should be read from the input stream.
| Name | Description |
|---|---|
| inputStream | System.IO.Stream The stream from where the source of bytes should be read. |
Returns the de-serialised value.
System.NotImplementedException: This exception is always returned.
Converts the given object instance into a byte array.
- T - The type of object that has been given.
| Name | Description |
|---|---|
| value | T The object instance that should be encoded in a byte array. |
Returns the serialised value as a byte array.
System.NotImplementedException: This exception is always returned.
Converts the given object instance into a byte array and writes the output to the given stream.
- T - The type of object that has been given.
| Name | Description |
|---|---|
| value | T The object instance that should be encoded and written to the outputStream. |
| outputStream | System.IO.Stream The stream into which the output should be written. |
System.NotImplementedException: This exception is always returned.