Method WithAllowedTypes
- Namespace
 - MongoDB.Bson.Serialization.Serializers
 
- Assembly
 - MongoDB.Bson.dll
 
WithAllowedTypes(Func<Type, bool>, Func<Type, bool>)
Returns a new ObjectSerializer configured the same but with the specified allowed types delegates.
public ObjectSerializer WithAllowedTypes(Func<Type, bool> allowedDeserializationTypes, Func<Type, bool> allowedSerializationTypes)
Parameters
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.