Table of Contents

Class EnumSerializer<TEnum>

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

Represents a serializer for enums.

public class EnumSerializer<TEnum> : StructSerializerBase<TEnum>, IBsonSerializer<TEnum>, IBsonSerializer, IRepresentationConfigurable<EnumSerializer<TEnum>>, IRepresentationConfigurable, IHasRepresentationSerializer where TEnum : struct, Enum

Type Parameters

TEnum

The type of the enum.

Inheritance
EnumSerializer<TEnum>
Implements
Inherited Members
Extension Methods

Constructors

EnumSerializer()

Initializes a new instance of the EnumSerializer<TEnum> class.

EnumSerializer(BsonType)

Initializes a new instance of the EnumSerializer<TEnum> class.

Properties

Representation

Gets the representation.

Methods

Deserialize(BsonDeserializationContext, BsonDeserializationArgs)

Deserializes a value.

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

Serializes a value.

WithRepresentation(BsonType)

Returns a serializer that has been reconfigured with the specified representation.