Exemple #1
0
        /// <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);
            }
        }
Exemple #2
0
 /// <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;
 }
Exemple #3
0
        /// <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"));
        }