public SetMemberFinderConvention ( IMemberFinderConvention convention ) : |
||
convention | IMemberFinderConvention | A member finder convention. |
return |
public virtual void Init() { var profile = new ConventionProfile(); profile.SetMemberFinderConvention(new LoggingMemberFinderConvention()); BsonClassMap.RegisterClassMap(new ExceptionMap()); BsonClassMap.RegisterClassMap(new LocationInformationMap()); BsonClassMap.RegisterConventions(profile, t => true); }
public void AfterPropertiesSet() { var defaultProfile = ConventionProfile.GetDefault(); _profile = new ConventionProfile(); _filter = new ConventionFilterHelper(IncludeFilters, ExcludeFilters); _profile.SetDefaultValueConvention(DefaultValueConvention ?? defaultProfile.DefaultValueConvention); _profile.SetElementNameConvention(ElementNameConvention ?? defaultProfile.ElementNameConvention); _profile.SetExtraElementsMemberConvention(ExtraElementsMemberConvention ?? defaultProfile.ExtraElementsMemberConvention); _profile.SetIdGeneratorConvention(IdGeneratorConvention ?? defaultProfile.IdGeneratorConvention); _profile.SetIdMemberConvention(IdMemberConvention ?? defaultProfile.IdMemberConvention); _profile.SetIgnoreExtraElementsConvention(IgnoreExtraElementsConvention ?? defaultProfile.IgnoreExtraElementsConvention); _profile.SetIgnoreIfDefaultConvention(IgnoreIfDefaultConvention ?? defaultProfile.IgnoreIfDefaultConvention); _profile.SetIgnoreIfNullConvention(IgnoreIfNullConvention ?? defaultProfile.IgnoreIfNullConvention); _profile.SetMemberFinderConvention(MemberFinderConvention ?? defaultProfile.MemberFinderConvention); _profile.SetSerializationOptionsConvention(SerializationOptionsConvention ?? defaultProfile.SerializationOptionsConvention); BsonClassMap.RegisterConventions(_profile, _filter.Filter); }