Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Waher.Persistence.MongoDB.Serialization.ReferenceTypes.ByteArraySerializer Class Reference

Serializes a byte array. More...

Inheritance diagram for Waher.Persistence.MongoDB.Serialization.ReferenceTypes.ByteArraySerializer:
Waher.Persistence.MongoDB.Serialization.IObjectSerializer

Public Member Functions

 ByteArraySerializer ()
 Serializes a byte array. More...
 
object Deserialize (IBsonReader Reader, BsonType? DataType, bool Embedded)
 Deserializes an object from a binary source. More...
 
void Serialize (IBsonWriter Writer, bool WriteTypeCode, bool Embedded, object Value)
 Serializes an object to a binary destination. More...
 
bool TryGetFieldValue (string FieldName, object Object, out object Value)
 Gets the value of a field or property of an object, given its name. More...
 
virtual bool TryGetFieldType (string FieldName, object Object, out Type FieldType)
 Gets the type of a field or property of an object, given its name. More...
 

Properties

Type ValueType [get]
 What type of object is being serialized. More...
 
bool IsNullable [get]
 If the value being serialized, can be null. More...
 

Detailed Description

Serializes a byte array.

Definition at line 14 of file ByteArraySerializer.cs.

Constructor & Destructor Documentation

◆ ByteArraySerializer()

Waher.Persistence.MongoDB.Serialization.ReferenceTypes.ByteArraySerializer.ByteArraySerializer ( )

Serializes a byte array.

Definition at line 19 of file ByteArraySerializer.cs.

Member Function Documentation

◆ Deserialize()

object Waher.Persistence.MongoDB.Serialization.ReferenceTypes.ByteArraySerializer.Deserialize ( IBsonReader  Reader,
BsonType?  DataType,
bool  Embedded 
)

Deserializes an object from a binary source.

Parameters
ReaderBinary deserializer.
DataTypeOptional datatype. If not provided, will be read from the binary source.
EmbeddedIf the object is embedded into another.
Returns
Deserialized object.

Implements Waher.Persistence.MongoDB.Serialization.IObjectSerializer.

Definition at line 49 of file ByteArraySerializer.cs.

◆ Serialize()

void Waher.Persistence.MongoDB.Serialization.ReferenceTypes.ByteArraySerializer.Serialize ( IBsonWriter  Writer,
bool  WriteTypeCode,
bool  Embedded,
object  Value 
)

Serializes an object to a binary destination.

Parameters
WriterBinary destination.
WriteTypeCodeIf a type code is to be output.
EmbeddedIf the object is embedded into another.
ValueThe actual object to serialize.

Implements Waher.Persistence.MongoDB.Serialization.IObjectSerializer.

Definition at line 69 of file ByteArraySerializer.cs.

◆ TryGetFieldType()

virtual bool Waher.Persistence.MongoDB.Serialization.ReferenceTypes.ByteArraySerializer.TryGetFieldType ( string  FieldName,
object  Object,
out Type  FieldType 
)
virtual

Gets the type of a field or property of an object, given its name.

Parameters
FieldNameName of field or property.
ObjectObject.
FieldTypeCorresponding field or property type, if found, or null otherwise.
Returns
If the corresponding field or property was found.

Implements Waher.Persistence.MongoDB.Serialization.IObjectSerializer.

Definition at line 97 of file ByteArraySerializer.cs.

◆ TryGetFieldValue()

bool Waher.Persistence.MongoDB.Serialization.ReferenceTypes.ByteArraySerializer.TryGetFieldValue ( string  FieldName,
object  Object,
out object  Value 
)

Gets the value of a field or property of an object, given its name.

Parameters
FieldNameName of field or property.
ObjectObject.
ValueCorresponding field or property value, if found, or null otherwise.
Returns
If the corresponding field or property was found.

Implements Waher.Persistence.MongoDB.Serialization.IObjectSerializer.

Definition at line 84 of file ByteArraySerializer.cs.

Property Documentation

◆ IsNullable

bool Waher.Persistence.MongoDB.Serialization.ReferenceTypes.ByteArraySerializer.IsNullable
get

If the value being serialized, can be null.

Implements Waher.Persistence.MongoDB.Serialization.IObjectSerializer.

Definition at line 37 of file ByteArraySerializer.cs.

◆ ValueType

Type Waher.Persistence.MongoDB.Serialization.ReferenceTypes.ByteArraySerializer.ValueType
get

What type of object is being serialized.

Implements Waher.Persistence.MongoDB.Serialization.IObjectSerializer.

Definition at line 26 of file ByteArraySerializer.cs.


The documentation for this class was generated from the following file: