Interface IBsonSerializerManager
Provides an interface for managing BSON serializers.
Namespace: Primitively.MongoDB.Bson.Serialization
Assembly: Primitively.MongoDB.Bson.dll
Syntax
public interface IBsonSerializerManager
Methods
LookupSerializer(Type)
Looks up a BSON serializer for the specified type.
Declaration
IBsonSerializer LookupSerializer(Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | type | The type for which to find a serializer. |
Returns
| Type | Description |
|---|---|
| IBsonSerializer | The BSON serializer for the specified type. |
TryRegisterSerializer(Type, IBsonSerializer)
Attempts to register a BSON serializer for the specified type.
Declaration
bool TryRegisterSerializer(Type type, IBsonSerializer serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | type | The type for which to register a serializer. |
| IBsonSerializer | serializer | The serializer to register. |
Returns
| Type | Description |
|---|---|
| bool | true if the serializer was registered successfully; otherwise, false. |