Table of Contents

Class SerializeAsNominalTypeSerializer<TActualType, TNominalType>

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

Represents a serializer for a class that will be serialized as if it were one of its base classes.

public class SerializeAsNominalTypeSerializer<TActualType, TNominalType> : SerializerBase<TActualType>, IBsonSerializer<TActualType>, IBsonSerializer where TActualType : class, TNominalType

Type Parameters

TActualType

The actual type.

TNominalType

The nominal type.

Inheritance
SerializerBase<TActualType>
SerializeAsNominalTypeSerializer<TActualType, TNominalType>
Implements
IBsonSerializer<TActualType>
Inherited Members
Extension Methods

Constructors

SerializeAsNominalTypeSerializer()

Initializes a new instance of the SerializeAsNominalTypeSerializer<TActualType, TNominalType> class.

SerializeAsNominalTypeSerializer(IBsonSerializerRegistry)

Initializes a new instance of the SerializeAsNominalTypeSerializer<TActualType, TNominalType> class.

SerializeAsNominalTypeSerializer(IBsonSerializer<TNominalType>)

Initializes a new instance of the SerializeAsNominalTypeSerializer<TActualType, TNominalType> class.

Methods

Serialize(BsonSerializationContext, BsonSerializationArgs, TActualType)

Serializes a value.