Class BsonSerializer
- Namespace
- MongoDB.Bson.Serialization
- Assembly
- MongoDB.Bson.dll
A static class that represents the BSON serialization functionality.
public static class BsonSerializer
- Inheritance
-
BsonSerializer
- Inherited Members
Properties
- SerializerRegistry
Gets the serializer registry.
- UseNullIdChecker
Gets or sets whether to use the NullIdChecker on reference Id types that don't have an IdGenerator registered.
- UseZeroIdChecker
Gets or sets whether to use the ZeroIdChecker on value Id types that don't have an IdGenerator registered.
Methods
- Deserialize(BsonDocument, Type, Action<Builder>)
Deserializes an object from a BsonDocument.
- Deserialize(IBsonReader, Type, Action<Builder>)
Deserializes a value.
- Deserialize(byte[], Type, Action<Builder>)
Deserializes an object from a BSON byte array.
- Deserialize(Stream, Type, Action<Builder>)
Deserializes an object from a BSON Stream.
- Deserialize(TextReader, Type, Action<Builder>)
Deserializes an object from a JSON TextReader.
- Deserialize(string, Type, Action<Builder>)
Deserializes an object from a JSON string.
- Deserialize<TNominalType>(BsonDocument, Action<Builder>)
Deserializes an object from a BsonDocument.
- Deserialize<TNominalType>(IBsonReader, Action<Builder>)
Deserializes a value.
- Deserialize<TNominalType>(byte[], Action<Builder>)
Deserializes an object from a BSON byte array.
- Deserialize<TNominalType>(Stream, Action<Builder>)
Deserializes an object from a BSON Stream.
- Deserialize<TNominalType>(TextReader, Action<Builder>)
Deserializes an object from a JSON TextReader.
- Deserialize<TNominalType>(string, Action<Builder>)
Deserializes an object from a JSON string.
- IsTypeDiscriminated(Type)
Returns whether the given type has any discriminators registered for any of its subclasses.
- LookupActualType(Type, BsonValue)
Looks up the actual type of an object to be deserialized.
- LookupDiscriminatorConvention(Type)
Looks up the discriminator convention for a type.
- LookupIdGenerator(Type)
Looks up an IdGenerator.
- LookupSerializer(Type)
Looks up a serializer for a Type.
- LookupSerializer<T>()
Looks up a serializer for a Type.
- RegisterDiscriminator(Type, BsonValue)
Registers the discriminator for a type.
- RegisterDiscriminatorConvention(Type, IDiscriminatorConvention)
Registers the discriminator convention for a type.
- RegisterGenericSerializerDefinition(Type, Type)
Registers a generic serializer definition for a generic type.
- RegisterIdGenerator(Type, IIdGenerator)
Registers an IdGenerator for an Id Type.
- RegisterSerializationProvider(IBsonSerializationProvider)
Registers a serialization provider.
- RegisterSerializer(Type, IBsonSerializer)
Registers a serializer for a type.
- RegisterSerializer<T>(IBsonSerializer<T>)
Registers a serializer for a type.
- Serialize(IBsonWriter, Type, object, Action<Builder>, BsonSerializationArgs)
Serializes a value.
- Serialize<TNominalType>(IBsonWriter, TNominalType, Action<Builder>, BsonSerializationArgs)
Serializes a value.
- TryRegisterSerializer(Type, IBsonSerializer)
Tries to register a serializer for a type.
- TryRegisterSerializer<T>(IBsonSerializer<T>)
Tries to register a serializer for a type.