Class EnumRepresentationConvention
- Namespace
- MongoDB.Bson.Serialization.Conventions
- Assembly
- MongoDB.Bson.dll
A convention that allows you to set the Enum serialization representation
public class EnumRepresentationConvention : ConventionBase, IMemberMapConvention, IConvention
- Inheritance
-
EnumRepresentationConvention
- Implements
- Inherited Members
- Extension Methods
Constructors
EnumRepresentationConvention(BsonType)
Initializes a new instance of the EnumRepresentationConvention class.
public EnumRepresentationConvention(BsonType representation)
Parameters
representation
BsonTypeThe serialization representation. 0 is used to detect representation from the enum itself.
Properties
Representation
Gets the representation.
public BsonType Representation { get; }
Property Value
Methods
Apply(BsonMemberMap)
Applies a modification to the member map.
public void Apply(BsonMemberMap memberMap)
Parameters
memberMap
BsonMemberMapThe member map.