Constructor ObjectSerializer
- Namespace
- MongoDB.Bson.Serialization.Serializers
- Assembly
- MongoDB.Bson.dll
ObjectSerializer()
Initializes a new instance of the ObjectSerializer class.
public ObjectSerializer()
ObjectSerializer(IDiscriminatorConvention)
Initializes a new instance of the ObjectSerializer class.
public ObjectSerializer(IDiscriminatorConvention discriminatorConvention)
Parameters
discriminatorConvention
IDiscriminatorConventionThe discriminator convention.
Exceptions
- ArgumentNullException
discriminatorConvention
ObjectSerializer(IDiscriminatorConvention, GuidRepresentation)
Initializes a new instance of the ObjectSerializer class.
public ObjectSerializer(IDiscriminatorConvention discriminatorConvention, GuidRepresentation guidRepresentation)
Parameters
discriminatorConvention
IDiscriminatorConventionThe discriminator convention.
guidRepresentation
GuidRepresentationThe Guid representation.
ObjectSerializer(Func<Type, bool>)
Initializes a new instance of the ObjectSerializer class.
public ObjectSerializer(Func<Type, bool> allowedTypes)
Parameters
ObjectSerializer(IDiscriminatorConvention, Func<Type, bool>)
Initializes a new instance of the ObjectSerializer class.
public ObjectSerializer(IDiscriminatorConvention discriminatorConvention, Func<Type, bool> allowedTypes)
Parameters
discriminatorConvention
IDiscriminatorConventionThe discriminator convention.
allowedTypes
Func<Type, bool>A delegate that determines what types are allowed.
ObjectSerializer(IDiscriminatorConvention, GuidRepresentation, Func<Type, bool>)
Initializes a new instance of the ObjectSerializer class.
public ObjectSerializer(IDiscriminatorConvention discriminatorConvention, GuidRepresentation guidRepresentation, Func<Type, bool> allowedTypes)
Parameters
discriminatorConvention
IDiscriminatorConventionThe discriminator convention.
guidRepresentation
GuidRepresentationThe Guid representation.
allowedTypes
Func<Type, bool>A delegate that determines what types are allowed.
ObjectSerializer(IDiscriminatorConvention, GuidRepresentation, Func<Type, bool>, Func<Type, bool>)
Initializes a new instance of the ObjectSerializer class.
public ObjectSerializer(IDiscriminatorConvention discriminatorConvention, GuidRepresentation guidRepresentation, Func<Type, bool> allowedDeserializationTypes, Func<Type, bool> allowedSerializationTypes)
Parameters
discriminatorConvention
IDiscriminatorConventionThe discriminator convention.
guidRepresentation
GuidRepresentationThe Guid representation.
allowedDeserializationTypes
Func<Type, bool>A delegate that determines what types are allowed to be deserialized.
allowedSerializationTypes
Func<Type, bool>A delegate that determines what types are allowed to be serialized.