/// <summary> /// Extract information for a class. /// </summary> /// <param name="assembly"></param> /// <param name="className"></param> /// <param name="defaultLang"></param> /// <param name="element"></param> private static void ProcessClass(Assembly resources, string assembly, string className, string defaultLang, XElement element) { MasterObjectTable mot = Locator.Current.GetService <MasterObjectTable>(); // Get the descriptions IEnumerable <XElement> nodes = from node in element.Descendants(DescriptionTag) select node; if (nodes.Count() > 0) { // Process the description LogHost.Default.Debug("Loading description definition for class '{0}'", className); ObjectDescription description = ProcessDescription(defaultLang, nodes.First()); if ((description.Icon != null) && (description.Icon.Length > 0)) { description.Icon = CopyIconImage(resources, assembly, description.Icon); } mot.AddDescription(className, description); } // Get the configurations nodes = from node in element.Descendants(ConfigurationTag) select node; if (nodes.Count() > 0) { // Process the configuration LogHost.Default.Debug("Loading configuration definition for class '{0}'", className); IConfigurationDescription config = ProcessConfiguration(defaultLang, nodes.First()); if (config != null) { mot.AddConfigurationDescription(className, config); } } }