Class DowncastingSerializer<TBase, TDerived>
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
MongoDB.Bson.Serialization.Serializers
Assembly
MongoDB.Bson.dll
A serializer for TBase where the actual values are of type TDerived.
public sealed 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)
Initializes a new instance of DowncastingSerializer.
Properties
The base type that the serializer will downcast from.
The serializer for the derived type.
The derived type that the serializer will downcast to.
Methods
Deserialize(BsonDeserializationContext, BsonDeserializationArgs)
Deserializes a value.
Determines whether the specified object is equal to the current object.
Serves as the default hash function.
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.