Exemplo n.º 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;
     }
 }
Exemplo n.º 2
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);
            }
        }
Exemplo n.º 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;
         }
     }
 }
Exemplo n.º 4
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);
                }
            }
        }
Exemplo n.º 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
            {
            }
        }
Exemplo n.º 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;
        }
Exemplo n.º 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
            {
            }
        }
Exemplo n.º 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
            {
            }
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }