Пример #1
0
        /// <summary>
        /// Outputs the data for this output object as an XMLSection.
        /// </summary>
        /// <returns>An XML representation of this object.</returns>
        public XMLSection ToXML()
        {
            XMLSection section = new XMLSection("output");

            section.AddChild("type", "file");
            section.AddChild("location", OutputLocation);
            return(section);
        }
Пример #2
0
        /// <summary>
        /// Outputs the data for this query object as an XMLSection.
        /// </summary>
        /// <returns>An XML representation of this object.</returns>
        public XMLSection ToXML()
        {
            XMLSection section = new XMLSection("query");

            section.AddChild("name", Name);
            section.AddChild("database", Database);
            section.AddChild("dataview", DataView);
            section.AddChild("interval", Interval.ToString());
            section.AddChild("time", Time.ToString());
            if (Delimiter != ",")
            {
                section.AddChild("delimiter", Delimiter);
            }
            if (Transpose)
            {
                section.AddChild("transpose", Transpose);
            }
            if (PrintHeaders)
            {
                section.AddChild("printHeaders", PrintHeaders);
            }
            if (Paused)
            {
                section.AddChild("paused", Paused);
            }

            section.AddSection(Output.ToXML());

            return(section);
        }
Пример #3
0
        /// <summary>
        /// Overwrites the config to include a new value for the specified key. If the specified key is not found, it will be appended to the config.
        /// </summary>
        /// <param name="property">The property whose value will be overwritten</param>
        /// <param name="value">The value to assign to the specified key</param>
        public override void Set(string property, object value)
        {
            XMLSection section = file.FindSection(parentNode);

            if (section == null)
            {
                throw new InvalidConfigException("Parent node \"" + parentNode + "\" not found.");
            }
            XMLNode node = section.FindNode(property);

            if (node == null)
            {
                section.AddChild(property, value.ToString());
            }
            else
            {
                node.Value = value.ToString();
            }
        }
Пример #4
0
        /// <summary>
        /// Outputs the data for this output object as an XMLSection.
        /// </summary>
        /// <returns>An XML representation of this object.</returns>
        public XMLSection ToXML()
        {
            XMLSection section = new XMLSection("output");

            section.AddChild("type", "email");
            section.AddChild("from", From);
            section.AddChild("to", To.Join());
            section.AddChild("subject", Subject);
            section.AddChild("body", Body);
            if (AttachmentInfo != null)
            {
                section.AddChild("attachmentFilepath", AttachmentInfo.OutputLocation);
            }
            return(section);
        }
Пример #5
0
        /// <summary>
        /// Outputs the data for this output object as an XMLSection.
        /// </summary>
        /// <returns>An XML representation of this object.</returns>
        public XMLSection ToXML()
        {
            XMLSection section = new XMLSection("output");

            section.AddChild("type", "ftp");
            section.AddChild("filename", FileName);
            section.AddChild("address", Address);
            section.AddChild("remotepath", RemotePath);
            if (Username.Length > 0)
            {
                section.AddChild("username", Username);
            }
            if (Password.Length > 0)
            {
                section.AddChild("password", Password);
            }
            return(section);
        }