Method TryRegisterSerializer
- Namespace
- MongoDB.Bson.Serialization
- Assembly
- MongoDB.Bson.dll
TryRegisterSerializer(Type, IBsonSerializer)
Tries to register the serializer.
public bool TryRegisterSerializer(Type type, IBsonSerializer serializer)
Parameters
type
TypeThe type.
serializer
IBsonSerializerThe serializer.
Returns
- bool
True if the serializer was registered on this call, false if the same serializer was already registered on a previous call, throws an exception if a different serializer was already registered.