/// <summary> /// Adds all the type checkers to the given scanner. /// They basically automatically find CSS properties, units etc in assemblies. /// </summary> public static void AddToScanner(Modular.AssemblyScanner scanner) { // CSS functions: scanner.FindAllSubTypes(typeof(CssFunction), delegate(Type type){ // Add it: CssFunctions.Add(type); }); // CSS at rules: scanner.FindAllSubTypes(typeof(CssAtRule), delegate(Type type){ // Add it: CssAtRules.Add(type); }); // CSS units: scanner.FindAllSubTypes(typeof(CssUnit), delegate(Type type){ // Add it: CssUnits.Add(type); }); // CSS keywords: scanner.FindAllSubTypes(typeof(CssKeyword), delegate(Type type){ // Add it: CssKeywords.Add(type); }); // CSS properties (secondary pass; requires default values which can be any of the above): scanner.FindAllSubTypes(1, typeof(CssProperty), delegate(Type type){ // Add it: CssProperties.Add(type); }); }
/// <summary> /// Adds all the type checkers to the given scanner. /// They basically automatically find elements etc in assemblies. /// </summary> public static void AddToScanner(Modular.AssemblyScanner scanner) { // Element: scanner.FindAllSubTypes(typeof(Dom.Element), delegate(Type type){ // Add it: TagHandlers.Add(type); }); // TextNode: scanner.FindAllSubTypes(typeof(Dom.TextNode), delegate(Type type){ // Add it: TagHandlers.Add(type); }); // ILangNode: scanner.FindAllSubTypes(typeof(Dom.ILangNode), delegate(Type type){ // Add it: TagHandlers.Add(type); }); }