internal static void RegisterValidationRule(System.Type type) { foreach (AssemblyValidationRule assemblyValidationRule in AssemblyValidation.ValidationRuleAttributesFor(type)) { AssemblyValidation.RegisterValidationRuleForPlatform(assemblyValidationRule.Platform, type); } }
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>()); }
private static bool IsValidationRule(Type type) { return(AssemblyValidation.ValidationRuleAttributesFor(type).Any <AssemblyValidationRule>()); }