Class ObjectSerializer
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
MongoDB.Bson.Serialization.Serializers
Assembly
MongoDB.Bson.dll
Represents a serializer for objects.
public sealed class ObjectSerializer : ClassSerializerBase<object>, IBsonSerializer<object>, IBsonSerializer, IHasDiscriminatorConvention
Inheritance
ObjectSerializer
Implements
Inherited Members
Extension Methods
Constructors
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
An allowed types function that returns true for all types.
Gets the AllowedDeserializationTypes filter;
Gets the AllowedSerializationTypes filter;
An allowed types function that returns true for framework types known to be safe.
Gets the discriminator convention.
Gets the GuidRepresentation.
Gets the standard instance.
An allowed types function that returns false for all types.
Methods
Deserialize(BsonDeserializationContext, BsonDeserializationArgs)
Deserializes a value.
Determines whether the specified object is equal to the current object.
Serves as the default hash function.
Serialize(BsonSerializationContext, BsonSerializationArgs, object)
Serializes a value.
WithAllowedTypes(Func<Type, bool>, Func<Type, bool>)
Returns a new ObjectSerializer configured the same but with the specified allowed types delegates.
WithDiscriminatorConvention(IDiscriminatorConvention)
Returns a new ObjectSerializer configured the same but with the specified discriminator convention.