Table of Contents

Class AcronymFriendlyCamelCaseElementNameConvention

Namespace
Cratis.Applications.MongoDB
Assembly
Cratis.Applications.MongoDB.dll

A convention that sets the element name the same as the member name with the first character lower cased unless it starts with an acronym.

Based on https://github.com/mongodb/mongo-csharp-driver/blob/f41c21efa6061f92c955748caaca123dae8e51ac/src/MongoDB.Bson/Serialization/Conventions/CamelCaseElementNameConvention.cs.

public class AcronymFriendlyCamelCaseElementNameConvention : ConventionBase, IMemberMapConvention, IConvention
Inheritance
ConventionBase
AcronymFriendlyCamelCaseElementNameConvention
Implements
IMemberMapConvention
IConvention
Inherited Members
ConventionBase.Name

Constructors

AcronymFriendlyCamelCaseElementNameConvention()

public AcronymFriendlyCamelCaseElementNameConvention()

Fields

ConventionName

Gets the name of the convention.

public const string ConventionName = "Acronym-friendly camel case element name convention"

Field Value

string

Methods

Apply(BsonMemberMap)

Applies a modification to the member map, using the ToCamelCase method on the element name.

public void Apply(BsonMemberMap memberMap)

Parameters

memberMap BsonMemberMap

The member map.