Ejemplo n.º 1
0
        private void ConfigureMemberConfiguration(Type modelType, MemberConfiguration configuration)
        {
            // Run predicate configurators
            var configurator = new MemberConfigurator(configuration);

            foreach (var memberPredicateConfigurator in _memberPredicateConfigurators)
            {
                if (memberPredicateConfigurator.Predicate(modelType))
                {
                    memberPredicateConfigurator.ConfigurationAction(configuration.MemberInfo, configurator);
                }
            }
        }
 internal void MergeWith(MemberConfiguration member)
 {
     DefaultValue               = member.DefaultValue ?? DefaultValue;
     HasDefaultValue            = member.HasDefaultValue || HasDefaultValue;
     SerializeFunction          = member.SerializeFunction ?? SerializeFunction;
     ShouldSerializePredicate   = member.ShouldSerializePredicate ?? ShouldSerializePredicate;
     ShouldDeserializePredicate = member.ShouldDeserializePredicate ?? ShouldDeserializePredicate;
     Ignored     = member.Ignored ?? Ignored;
     Deserialize = member.Deserialize ?? Deserialize;
     Serialize   = member.Serialize ?? Serialize;
     MaxLength   = member.MaxLength ?? MaxLength;
     IsNullable  = member.IsNullable ?? IsNullable;
     Custom      = member.Custom ?? Custom;
 }
Ejemplo n.º 3
0
 public MemberConfigurator(MemberConfiguration configuration)
 {
     Configuration = configuration;
 }