Table of Contents

Class BsonSerializerRegistry

Namespace
MongoDB.Bson.Serialization
Assembly
MongoDB.Bson.dll

Default, global implementation of an IBsonSerializerRegistry.

public sealed class BsonSerializerRegistry : IBsonSerializerRegistry
Inheritance
BsonSerializerRegistry
Implements
Inherited Members
Extension Methods

Constructors

BsonSerializerRegistry()

Initializes a new instance of the BsonSerializerRegistry class.

Methods

GetSerializer(Type)

Gets the serializer for the specified type. If none is already registered, the serialization providers will be used to create a serializer and it will be automatically registered.

GetSerializer<T>()

Gets the serializer for the specified T. If none is already registered, the serialization providers will be used to create a serializer and it will be automatically registered.

RegisterSerializationProvider(IBsonSerializationProvider)

Registers the serialization provider. This behaves like a stack, so the last provider registered is the first provider consulted.

RegisterSerializer(Type, IBsonSerializer)

Registers the serializer.

TryRegisterSerializer(Type, IBsonSerializer)

Tries to register the serializer.