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
- discriminatorConventionIDiscriminatorConvention
- The discriminator convention. 
Exceptions
- ArgumentNullException
- discriminatorConvention 
ObjectSerializer(IDiscriminatorConvention, GuidRepresentation)
Initializes a new instance of the ObjectSerializer class.
public ObjectSerializer(IDiscriminatorConvention discriminatorConvention, GuidRepresentation guidRepresentation)Parameters
- discriminatorConventionIDiscriminatorConvention
- The discriminator convention. 
- guidRepresentationGuidRepresentation
- The 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
- discriminatorConventionIDiscriminatorConvention
- The discriminator convention. 
- allowedTypesFunc<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
- discriminatorConventionIDiscriminatorConvention
- The discriminator convention. 
- guidRepresentationGuidRepresentation
- The Guid representation. 
- allowedTypesFunc<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
- discriminatorConventionIDiscriminatorConvention
- The discriminator convention. 
- guidRepresentationGuidRepresentation
- The Guid representation. 
- allowedDeserializationTypesFunc<Type, bool>
- A delegate that determines what types are allowed to be deserialized. 
- allowedSerializationTypesFunc<Type, bool>
- A delegate that determines what types are allowed to be serialized.