コード例 #1
0
 private void UpdateFlyweight(MemberInfo memberInfo, Type targetType)
 {
     this.memberInfo = memberInfo;
     this.targetType = targetType;
     this.ignoreNullsAttribute
         = ValidationReflectionHelper.ExtractValidationAttribute<IgnoreNullsAttribute>(memberInfo, this.ruleset);
     this.validatorCompositionAttribute
         = ValidationReflectionHelper.ExtractValidationAttribute<ValidatorCompositionAttribute>(memberInfo, this.ruleset);
 }
コード例 #2
0
 /// <summary>
 /// Updates the flyweight for a parameter.
 /// </summary>
 /// <param name="parameterInfo">The parameter.</param>
 public void UpdateFlyweight(ParameterInfo parameterInfo)
 {
     this.parameterInfo = parameterInfo;
     this.ignoreNullsAttribute
         = ValidationReflectionHelper.ExtractValidationAttribute<IgnoreNullsAttribute>(parameterInfo, string.Empty);
     this.validatorCompositionAttribute
         = ValidationReflectionHelper.ExtractValidationAttribute<ValidatorCompositionAttribute>(parameterInfo, string.Empty);
 }