コード例 #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
        IEnumerable <IValidatedElement> IValidatedType.GetValidatedProperties()
        {
            MetadataValidatedElement iteratorVariable0 = new MetadataValidatedElement(this.Ruleset);

            foreach (PropertyInfo iteratorVariable1 in this.TargetType.GetProperties(BindingFlags.Public | BindingFlags.Instance))
            {
                if (ValidationReflectionHelper.IsValidProperty(iteratorVariable1))
                {
                    iteratorVariable0.UpdateFlyweight(iteratorVariable1);
                    yield return(iteratorVariable0);
                }
            }
        }
コード例 #3
0
 public void UpdateFlyweight(ParameterInfo parameterInfo)
 {
     this.parameterInfo                 = parameterInfo;
     this.ignoreNullsAttribute          = ValidationReflectionHelper.ExtractValidationAttribute <IgnoreNullsAttribute>(parameterInfo, string.Empty);
     this.validatorCompositionAttribute = ValidationReflectionHelper.ExtractValidationAttribute <ValidatorCompositionAttribute>(parameterInfo, string.Empty);
 }