MongoDB.Bson.Serialization.Conventions.ConventionProfile.GetDefault C# (CSharp) Method

GetDefault() public static method

Gets the default convention profile.
public static GetDefault ( ) : ConventionProfile
return ConventionProfile
        public static ConventionProfile GetDefault()
        {
            return new ConventionProfile() // The default profile always matches...
                .SetDefaultValueConvention(new NullDefaultValueConvention())
                .SetElementNameConvention(new MemberNameElementNameConvention())
                .SetExtraElementsMemberConvention(new NamedExtraElementsMemberConvention("ExtraElements"))
                .SetIdGeneratorConvention(new LookupIdGeneratorConvention())
                .SetIdMemberConvention(new NamedIdMemberConvention("Id", "id", "_id"))
                .SetIgnoreExtraElementsConvention(new NeverIgnoreExtraElementsConvention())
                .SetIgnoreIfDefaultConvention(new NeverIgnoreIfDefaultConvention())
                .SetIgnoreIfNullConvention(new NeverIgnoreIfNullConvention())
                .SetMemberFinderConvention(new PublicMemberFinderConvention())
                .SetSerializationOptionsConvention(new NullSerializationOptionsConvention());
        }