Table of Contents

Class SerializerBase<TValue>

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

Represents an abstract base class for serializers.

public abstract class SerializerBase<TValue> : IBsonSerializer<TValue>, IBsonSerializer

Type Parameters

TValue

The type of the value.

Inheritance
SerializerBase<TValue>
Implements
Derived
Inherited Members
Extension Methods

Properties

ValueType

Gets the type of the values.

Methods

CreateCannotBeDeserializedException()

Creates an exception to throw when a type cannot be deserialized.

CreateCannotBeSerializedException()

Creates an exception to throw when a type cannot be deserialized.

CreateCannotDeserializeFromBsonTypeException(BsonType)

Creates an exception to throw when a type cannot be deserialized from a BsonType.

Deserialize(BsonDeserializationContext, BsonDeserializationArgs)

Deserializes a value.

EnsureBsonTypeEquals(IBsonReader, BsonType)

Ensures that the BsonType equals the expected type.

Serialize(BsonSerializationContext, BsonSerializationArgs, TValue)

Serializes a value.