Exemple #1
0
        IEnumerable <IValidatedElement> IValidatedType.GetValidatedFields()
        {
            MetadataValidatedElement iteratorVariable0 = new MetadataValidatedElement(this.Ruleset);

            foreach (FieldInfo iteratorVariable1 in this.TargetType.GetFields(BindingFlags.Public | BindingFlags.Instance))
            {
                iteratorVariable0.UpdateFlyweight(iteratorVariable1);
                yield return(iteratorVariable0);
            }
        }
Exemple #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);
                }
            }
        }