Class TypeSerialiser
A MongoDB.Bson.Serialization.IBsonSerializer that stores System.Type information as well.
Inheritance
System.Object
TypeSerialiser
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Cqrs.Mongo.Serialisers
Assembly: Cqrs.Mongo.dll
Syntax
public class TypeSerialiser : IBsonSerializer
Methods
Deserialize(BsonReader, Type, IBsonSerializationOptions)
Deserialises a System.Type value, first reading the System.Type information from the provide reader
.
Declaration
public object Deserialize(BsonReader reader, Type nominalType, IBsonSerializationOptions options)
Parameters
Type | Name | Description |
---|---|---|
MongoDB.Bson.IO.BsonReader | reader | |
System.Type | nominalType | |
MongoDB.Bson.Serialization.IBsonSerializationOptions | options |
Returns
Type | Description |
---|---|
System.Object |
Implements
MongoDB.Bson.Serialization.IBsonSerializer.Deserialize(MongoDB.Bson.IO.BsonReader, System.Type, MongoDB.Bson.Serialization.IBsonSerializationOptions)
Deserialize(BsonReader, Type, Type, IBsonSerializationOptions)
Deserialises a System.Type value, first reading the System.Type information from the provide reader
.
Declaration
public object Deserialize(BsonReader reader, Type nominalType, Type actualType, IBsonSerializationOptions options)
Parameters
Type | Name | Description |
---|---|---|
MongoDB.Bson.IO.BsonReader | reader | |
System.Type | nominalType | |
System.Type | actualType | |
MongoDB.Bson.Serialization.IBsonSerializationOptions | options |
Returns
Type | Description |
---|---|
System.Object |
Implements
MongoDB.Bson.Serialization.IBsonSerializer.Deserialize(MongoDB.Bson.IO.BsonReader, System.Type, System.Type, MongoDB.Bson.Serialization.IBsonSerializationOptions)
GetDefaultSerializationOptions()
Gets the default serialization options for this serializer.
Declaration
public IBsonSerializationOptions GetDefaultSerializationOptions()
Returns
Type | Description |
---|---|
MongoDB.Bson.Serialization.IBsonSerializationOptions | The default serialization options for this serializer. |
Implements
MongoDB.Bson.Serialization.IBsonSerializer.GetDefaultSerializationOptions()
Serialize(BsonWriter, Type, Object, IBsonSerializationOptions)
Serialises a System.Type value.
Declaration
public void Serialize(BsonWriter writer, Type nominalType, object value, IBsonSerializationOptions options)
Parameters
Type | Name | Description |
---|---|---|
MongoDB.Bson.IO.BsonWriter | writer | |
System.Type | nominalType | |
System.Object | value | |
MongoDB.Bson.Serialization.IBsonSerializationOptions | options |
Implements
MongoDB.Bson.Serialization.IBsonSerializer.Serialize(MongoDB.Bson.IO.BsonWriter, System.Type, System.Object, MongoDB.Bson.Serialization.IBsonSerializationOptions)