private void AddXmlConfigXml(ToolkitConfig config, XmlConfigInfo configInfo) { string path = Path.GetFileName(config.FullPath); foreach (XmlPlugInItemInfo configItem in configInfo.ConfigItems) { object value = ObjectUtil.GetValue(configItem.PropertyInfo, config); if (value != null) { switch (configItem.Type) { case XmlPlugInItemType.Single: AddPlugInXmlItem(value as IXmlPlugInItem, path); break; case XmlPlugInItemType.Enumerable: AddPlugInXmlItems(value as IEnumerable, path); break; case XmlPlugInItemType.Enumerator: AddPlugInXmlItems(value as IEnumerator, path); break; } } } }
public XmlPlugInAttribute(string xmlPath, Type xmlConfigType) { XmlConfigType = xmlConfigType; XmlPath = xmlPath; ConfigInfo = new XmlConfigInfo(xmlConfigType, true); }