MongoDB.Bson.Serialization.Conventions.ConventionProfile.SetIgnoreExtraElementsConvention C# (CSharp) 메소드

SetIgnoreExtraElementsConvention() 공개 메소드

Sets the ignore extra elements convention.
public SetIgnoreExtraElementsConvention ( IIgnoreExtraElementsConvention convention ) : ConventionProfile
convention IIgnoreExtraElementsConvention An ignore extra elements convention.
리턴 ConventionProfile
        public ConventionProfile SetIgnoreExtraElementsConvention(IIgnoreExtraElementsConvention convention)
        {
            IgnoreExtraElementsConvention = convention;
            return this;
        }

Usage Example

 public static void ConfigureMapping()
 {
     var conventionsProfile = new ConventionProfile();
     conventionsProfile.SetIgnoreExtraElementsConvention(new AlwaysIgnoreExtraElementsConvention());
     conventionsProfile.SetIdMemberConvention(new NamedIdMemberConvention("Id"));
     BsonClassMap.RegisterConventions(conventionsProfile, t => typeof(ISagaEntity).IsAssignableFrom(t));
 }
All Usage Examples Of MongoDB.Bson.Serialization.Conventions.ConventionProfile::SetIgnoreExtraElementsConvention