private static void WarmUpRulesCache() { if (AssemblyValidation._rulesByPlatform != null) { return; } AssemblyValidation._rulesByPlatform = new Dictionary <RuntimePlatform, List <System.Type> >(); foreach (System.Type type in ((IEnumerable <System.Type>) typeof(AssemblyValidation).Assembly.GetTypes()).Where <System.Type>(new Func <System.Type, bool>(AssemblyValidation.IsValidationRule))) { AssemblyValidation.RegisterValidationRule(type); } }
private static void WarmUpRulesCache() { if (AssemblyValidation._rulesByPlatform != null) { return; } AssemblyValidation._rulesByPlatform = new Dictionary <RuntimePlatform, List <Type> >(); Assembly assembly = typeof(AssemblyValidation).Assembly; foreach (Type current in assembly.GetTypes().Where(new Func <Type, bool>(AssemblyValidation.IsValidationRule))) { AssemblyValidation.RegisterValidationRule(current); } }
private static void WarmUpRulesCache() { if (AssemblyValidation._rulesByPlatform == null) { AssemblyValidation._rulesByPlatform = new Dictionary <RuntimePlatform, List <Type> >(); Assembly assembly = typeof(AssemblyValidation).Assembly; IEnumerable <Type> arg_4E_0 = assembly.GetTypes(); if (AssemblyValidation.< > f__mg$cache0 == null) { AssemblyValidation.< > f__mg$cache0 = new Func <Type, bool>(AssemblyValidation.IsValidationRule); } foreach (Type current in arg_4E_0.Where(AssemblyValidation.< > f__mg$cache0)) { AssemblyValidation.RegisterValidationRule(current); } } }