Table of Contents

Class DowncastingSerializer<TBase, TDerived>

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

A serializer for TBase where the actual values are of type TDerived.

public class DowncastingSerializer<TBase, TDerived> : SerializerBase<TBase>, IBsonSerializer<TBase>, IBsonArraySerializer, IBsonDocumentSerializer, IBsonSerializer, IDowncastingSerializer where TDerived : TBase

Type Parameters

TBase

The base type.

TDerived

The derived type.

Inheritance
DowncastingSerializer<TBase, TDerived>
Implements
Inherited Members
Extension Methods

Constructors

DowncastingSerializer(IBsonSerializer<TDerived>)

Initializes a new instance of DowncastingSerializer.

Properties

BaseType

The base type that the serializer will downcast from.

DerivedSerializer

The serializer for the derived type.

DerivedType

The derived type that the serializer will downcast to.

Methods

Deserialize(BsonDeserializationContext, BsonDeserializationArgs)

Deserializes a value.

Equals(object)
GetHashCode()
Serialize(BsonSerializationContext, BsonSerializationArgs, TBase)

Serializes a value.

TryGetItemSerializationInfo(out BsonSerializationInfo)

Tries to get the serialization info for the individual items of the array.

TryGetMemberSerializationInfo(string, out BsonSerializationInfo)

Tries to get the serialization info for a member.