Beispiel #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;
     }
 }
        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);
            }
        }
Beispiel #3
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;
         }
     }
 }
        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);
                }
            }
        }
Beispiel #5
0
        IEnumerable <IValidatedElement> IValidatedType.GetValidatedFields()
        {
            MetadataValidatedElement flyweight = new MetadataValidatedElement(base.Ruleset);

            try
            {
                FieldInfo[] fields = base.TargetType.GetFields(BindingFlags.Instance | BindingFlags.Public);
                foreach (FieldInfo fieldInfo in fields)
                {
                    flyweight.UpdateFlyweight(fieldInfo);
                    yield return((IValidatedElement)flyweight);
                }
            }
            finally
            {
            }
        }
Beispiel #6
0
        IEnumerable <IValidatedElement> IValidatedType.GetValidatedFields()
        {
            MetadataValidatedElement metadataValidatedElement = new MetadataValidatedElement(base.Ruleset);

            try
            {
                FieldInfo[] fields = base.TargetType.GetFields(BindingFlags.Instance | BindingFlags.Public);
                for (int i = 0; i < fields.Length; i++)
                {
                    FieldInfo fieldInfo = fields[i];
                    metadataValidatedElement.UpdateFlyweight(fieldInfo);
                    yield return(metadataValidatedElement);
                }
            }
            finally
            {
            }
            yield break;
        }
Beispiel #7
0
        IEnumerable <IValidatedElement> IValidatedType.GetValidatedProperties()
        {
            MetadataValidatedElement flyweight = new MetadataValidatedElement(base.Ruleset);

            try
            {
                PropertyInfo[] properties = base.TargetType.GetProperties(BindingFlags.Instance | BindingFlags.Public);
                foreach (PropertyInfo propertyInfo in properties)
                {
                    if (ValidationReflectionHelper.IsValidProperty(propertyInfo))
                    {
                        flyweight.UpdateFlyweight(propertyInfo);
                        yield return((IValidatedElement)flyweight);
                    }
                }
            }
            finally
            {
            }
        }
Beispiel #8
0
        IEnumerable <IValidatedElement> IValidatedType.GetValidatedMethods()
        {
            MetadataValidatedElement flyweight = new MetadataValidatedElement(base.Ruleset);

            try
            {
                MethodInfo[] methods = base.TargetType.GetMethods(BindingFlags.Instance | BindingFlags.Public);
                foreach (MethodInfo methodInfo in methods)
                {
                    methodInfo.GetParameters();
                    if (ValidationReflectionHelper.IsValidMethod(methodInfo))
                    {
                        flyweight.UpdateFlyweight(methodInfo);
                        yield return((IValidatedElement)flyweight);
                    }
                }
            }
            finally
            {
            }
        }
Beispiel #9
0
        IEnumerable <IValidatedElement> IValidatedType.GetValidatedProperties()
        {
            MetadataValidatedElement metadataValidatedElement = new MetadataValidatedElement(base.Ruleset);

            try
            {
                PropertyInfo[] properties = base.TargetType.GetProperties(BindingFlags.Instance | BindingFlags.Public);
                for (int i = 0; i < properties.Length; i++)
                {
                    PropertyInfo propertyInfo = properties[i];
                    if (ValidationReflectionHelper.IsValidProperty(propertyInfo))
                    {
                        metadataValidatedElement.UpdateFlyweight(propertyInfo);
                        yield return(metadataValidatedElement);
                    }
                }
            }
            finally
            {
            }
            yield break;
        }
Beispiel #10
0
        IEnumerable <IValidatedElement> IValidatedType.GetValidatedMethods()
        {
            MetadataValidatedElement metadataValidatedElement = new MetadataValidatedElement(base.Ruleset);

            try
            {
                MethodInfo[] methods = base.TargetType.GetMethods(BindingFlags.Instance | BindingFlags.Public);
                for (int i = 0; i < methods.Length; i++)
                {
                    MethodInfo methodInfo = methods[i];
                    methodInfo.GetParameters();
                    if (ValidationReflectionHelper.IsValidMethod(methodInfo))
                    {
                        metadataValidatedElement.UpdateFlyweight(methodInfo);
                        yield return(metadataValidatedElement);
                    }
                }
            }
            finally
            {
            }
            yield break;
        }