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