Constructor ObjectSerializerAllowedTypesConvention

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Bson.Serialization.Conventions

Assembly

MongoDB.Bson.dll

ObjectSerializerAllowedTypesConvention(Func<Type, bool>)

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>)

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)

public ObjectSerializerAllowedTypesConvention(IEnumerable<Type> allowedTypes)

Parameters

allowedTypes IEnumerable<Type>

A collection of the allowed types for both serialization and deserialization.

ObjectSerializerAllowedTypesConvention(IEnumerable, IEnumerable)

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[])

public ObjectSerializerAllowedTypesConvention(params Assembly[] allowedAssemblies)

Parameters

allowedAssemblies Assembly[]

A collection of allowed assemblies whose types can be serialized and deserialized.

ObjectSerializerAllowedTypesConvention()

public ObjectSerializerAllowedTypesConvention()