/// <summary> /// Loads the configuration from the XML node. /// </summary> public void LoadFromXml(XmlElement xmlElem) { if (xmlElem == null) { throw new ArgumentNullException("xmlElem"); } if (xmlElem.SelectSingleNode("GeneralOptions") is XmlNode generalOptionsNode) { GeneralOptions.LoadFromXml(generalOptionsNode); } if (xmlElem.SelectSingleNode("ConnectionOptions") is XmlNode connectionOptionsNode) { ConnectionOptions.LoadFromXml(connectionOptionsNode); } if (xmlElem.SelectSingleNode("Triggers") is XmlNode triggersNode) { Triggers.LoadFromXml(triggersNode); } if (xmlElem.SelectSingleNode("ArcUploadOptions") is XmlElement arcUploadOptionsElem) { ArcUploadOptions.LoadFromXml(arcUploadOptionsElem); } }
/// <summary> /// Initializes a new instance of the class. /// </summary> public ExportTargetConfig() { GeneralOptions = new GeneralOptions(); ConnectionOptions = new DbConnectionOptions(); Triggers = new TriggerOptionList { Parent = this }; ArcUploadOptions = new ArcUploadOptions(); Parent = null; }
/// <summary> /// Saves the configuration into the XML node. /// </summary> public void SaveToXml(XmlElement xmlElem) { if (xmlElem == null) { throw new ArgumentNullException("xmlElem"); } GeneralOptions.SaveToXml(xmlElem.AppendElem("GeneralOptions")); ConnectionOptions.SaveToXml(xmlElem.AppendElem("ConnectionOptions")); Triggers.SaveToXml(xmlElem.AppendElem("Triggers")); ArcUploadOptions.SaveToXml(xmlElem.AppendElem("ArcUploadOptions")); }