Class ObjectSerializerAllowedTypesConvention
- Namespace
 - MongoDB.Bson.Serialization.Conventions
 
- Assembly
 - MongoDB.Bson.dll
 
A convention that allows to set the types that can be safely serialized and deserialized with the ObjectSerializer.
public sealed class ObjectSerializerAllowedTypesConvention : ConventionBase, IMemberMapConvention, IConvention
  - Inheritance
 - 
      
      
      ObjectSerializerAllowedTypesConvention
 
- Implements
 
- Inherited Members
 
- Extension Methods
 
Constructors
- ObjectSerializerAllowedTypesConvention()
 Initializes a new instance of the ObjectSerializerAllowedTypesConvention class.
- ObjectSerializerAllowedTypesConvention(IEnumerable<Type>)
 Initializes a new instance of the ObjectSerializerAllowedTypesConvention class.
- ObjectSerializerAllowedTypesConvention(IEnumerable<Type>, IEnumerable<Type>)
 Initializes a new instance of the ObjectSerializerAllowedTypesConvention class.
- ObjectSerializerAllowedTypesConvention(Func<Type, bool>)
 Initializes a new instance of the ObjectSerializerAllowedTypesConvention class.
- ObjectSerializerAllowedTypesConvention(Func<Type, bool>, Func<Type, bool>)
 Initializes a new instance of the ObjectSerializerAllowedTypesConvention class.
- ObjectSerializerAllowedTypesConvention(params Assembly[])
 Initializes a new instance of the ObjectSerializerAllowedTypesConvention class.
Properties
- AllowAllTypes
 A predefined ObjectSerializerAllowedTypesConvention where all types are allowed for both serialization and deserialization.
- AllowDefaultFrameworkTypes
 Indicates whether default framework types are included for serialization and deserialization. Defaults to true.
- AllowNoTypes
 A predefined ObjectSerializerAllowedTypesConvention where no types are allowed for both serialization and deserialization.
- AllowOnlyDefaultFrameworkTypes
 A predefined ObjectSerializerAllowedTypesConvention where only default framework types are allowed for both serialization and deserialization.
Methods
- Apply(BsonMemberMap)
 Applies a modification to the member map.
- GetAllowAllCallingAssemblyAndDefaultFrameworkTypesConvention()
 Builds a predefined ObjectSerializerAllowedTypesConvention where all calling assembly types and default framework types are allowed for both serialization and deserialization.