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
discriminatorConventionIDiscriminatorConventionThe discriminator convention.
Exceptions
- ArgumentNullException
discriminatorConvention
ObjectSerializer(IDiscriminatorConvention, GuidRepresentation)
Initializes a new instance of the ObjectSerializer class.
public ObjectSerializer(IDiscriminatorConvention discriminatorConvention, GuidRepresentation guidRepresentation)
Parameters
discriminatorConventionIDiscriminatorConventionThe discriminator convention.
guidRepresentationGuidRepresentationThe 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
discriminatorConventionIDiscriminatorConventionThe 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
discriminatorConventionIDiscriminatorConventionThe discriminator convention.
guidRepresentationGuidRepresentationThe 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
discriminatorConventionIDiscriminatorConventionThe discriminator convention.
guidRepresentationGuidRepresentationThe 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.