Class ObjectSerializer
- Namespace
- MongoDB.Bson.Serialization.Serializers
- Assembly
- MongoDB.Bson.dll
Represents a serializer for objects.
public class ObjectSerializer : ClassSerializerBase<object>, IBsonSerializer<object>, IBsonSerializer
- Inheritance
-
ObjectSerializer
- Implements
- Inherited Members
- Extension Methods
Constructors
- ObjectSerializer()
Initializes a new instance of the ObjectSerializer class.
- ObjectSerializer(IDiscriminatorConvention)
Initializes a new instance of the ObjectSerializer class.
- ObjectSerializer(IDiscriminatorConvention, GuidRepresentation)
Initializes a new instance of the ObjectSerializer class.
- ObjectSerializer(IDiscriminatorConvention, GuidRepresentation, Func<Type, bool>)
Initializes a new instance of the ObjectSerializer class.
- ObjectSerializer(IDiscriminatorConvention, GuidRepresentation, Func<Type, bool>, Func<Type, bool>)
Initializes a new instance of the ObjectSerializer class.
- ObjectSerializer(IDiscriminatorConvention, Func<Type, bool>)
Initializes a new instance of the ObjectSerializer class.
- ObjectSerializer(Func<Type, bool>)
Initializes a new instance of the ObjectSerializer class.
Properties
- AllAllowedTypes
An allowed types function that returns true for all types.
- AllowedDeserializationTypes
Gets the AllowedDeserializationTypes filter;
- AllowedSerializationTypes
Gets the AllowedSerializationTypes filter;
- DefaultAllowedTypes
An allowed types function that returns true for framework types known to be safe.
- DiscriminatorConvention
Gets the discriminator convention.
- GuidRepresentation
Gets the GuidRepresentation.
- Instance
Gets the standard instance.
- NoAllowedTypes
An allowed types function that returns false for all types.
Methods
- Deserialize(BsonDeserializationContext, BsonDeserializationArgs)
Deserializes a value.
- Serialize(BsonSerializationContext, BsonSerializationArgs, object)
Serializes a value.
- WithDiscriminatorConvention(IDiscriminatorConvention)
Returns a new ObjectSerializer configured the same but with the specified discriminator convention.