Constructor EnumRepresentationConvention
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
MongoDB.Bson.Serialization.Conventions
Assembly
MongoDB.Bson.dll
EnumRepresentationConvention(BsonType)
public EnumRepresentationConvention(BsonType representation)
Parameters
representation
BsonType
The serialization representation. 0 is used to detect representation from the enum itself.
EnumRepresentationConvention(BsonType, bool)
public EnumRepresentationConvention(BsonType representation, bool topLevelOnly)
Parameters
representation
BsonType
The serialization representation. 0 is used to detect representation from the enum itself.
topLevelOnly
bool
If set to true, the convention will be applied only to top level enum properties, and not collections of enums, for example.