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.
- EnumRepresentationConvention(BsonType, bool)
 Initializes a new instance of the EnumRepresentationConvention class.
Properties
- Representation
 Gets the representation.
- TopLevelOnly
 Gets a boolean indicating if this convention should be also applied only to the top level enum properties and not to others, collections of enums for example. True by default.
Methods
- Apply(BsonMemberMap)
 Applies a modification to the member map.