Constructor ObjectSerializerAllowedTypesConvention
- Namespace
- MongoDB.Bson.Serialization.Conventions
- Assembly
- MongoDB.Bson.dll
ObjectSerializerAllowedTypesConvention(Func<Type, bool>)
Initializes a new instance of the ObjectSerializerAllowedTypesConvention class.
public ObjectSerializerAllowedTypesConvention(Func<Type, bool> allowedTypes)
Parameters
allowedTypes
Func<Type, bool>A delegate that determines what types are allowed to be serialized and deserialized.
ObjectSerializerAllowedTypesConvention(Func<Type, bool>, Func<Type, bool>)
Initializes a new instance of the ObjectSerializerAllowedTypesConvention class.
public ObjectSerializerAllowedTypesConvention(Func<Type, bool> allowedDeserializationTypes, Func<Type, bool> allowedSerializationTypes)
Parameters
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.
ObjectSerializerAllowedTypesConvention(IEnumerable<Type>)
Initializes a new instance of the ObjectSerializerAllowedTypesConvention class.
public ObjectSerializerAllowedTypesConvention(IEnumerable<Type> allowedTypes)
Parameters
allowedTypes
IEnumerable<Type>A collection of the allowed types for both serialization and deserialization.
ObjectSerializerAllowedTypesConvention(IEnumerable<Type>, IEnumerable<Type>)
Initializes a new instance of the ObjectSerializerAllowedTypesConvention class.
public ObjectSerializerAllowedTypesConvention(IEnumerable<Type> allowedDeserializationTypes, IEnumerable<Type> allowedSerializationTypes)
Parameters
allowedDeserializationTypes
IEnumerable<Type>A collection of the allowed types for deserialization.
allowedSerializationTypes
IEnumerable<Type>A collection of the allowed types for serialization.
ObjectSerializerAllowedTypesConvention(params Assembly[])
Initializes a new instance of the ObjectSerializerAllowedTypesConvention class.
public ObjectSerializerAllowedTypesConvention(params Assembly[] allowedAssemblies)
Parameters
allowedAssemblies
Assembly[]A collection of allowed assemblies whose types can be serialized and deserialized.
ObjectSerializerAllowedTypesConvention()
Initializes a new instance of the ObjectSerializerAllowedTypesConvention class.
public ObjectSerializerAllowedTypesConvention()