Ejemplo n.º 1
0
 internal static void RegisterValidationRule(System.Type type)
 {
     foreach (AssemblyValidationRule assemblyValidationRule in AssemblyValidation.ValidationRuleAttributesFor(type))
     {
         AssemblyValidation.RegisterValidationRuleForPlatform(assemblyValidationRule.Platform, type);
     }
 }
Ejemplo n.º 2
0
 private static int PriorityFor(System.Type type, RuntimePlatform platform)
 {
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: reference to a compiler-generated method
     return(AssemblyValidation.ValidationRuleAttributesFor(type).Where <AssemblyValidationRule>(new Func <AssemblyValidationRule, bool>(new AssemblyValidation.\u003CPriorityFor\u003Ec__AnonStorey6B()
     {
         platform = platform
     }.\u003C\u003Em__E4)).Select <AssemblyValidationRule, int>((Func <AssemblyValidationRule, int>)(attr => attr.Priority)).FirstOrDefault <int>());
 }
Ejemplo n.º 3
0
 private static bool IsValidationRule(Type type)
 {
     return(AssemblyValidation.ValidationRuleAttributesFor(type).Any <AssemblyValidationRule>());
 }