GetXmlTree() public method

Gets the Xml tree for the custom serialiser
public GetXmlTree ( ) : System.Xml.Linq.XElement
return System.Xml.Linq.XElement
Example #1
0
        /// <summary>
        /// Gets the Xml tree for the custom serialiser
        /// </summary>
        /// <returns>An XElement </returns>
        public XElement GetXmlTree()
        {
            var element = new XElement(Namespaces.NsWindowsAzure + "ConfigurationSet", InputEndpoints.GetXmlTree());

            element.Add(new XElement(Namespaces.NsWindowsAzure + "ConfigurationSetType", ConfigurationSetType.ToString()));
            return(element);
        }
        /// <summary>
        /// Gets the Xml tree for the custom serialiser
        /// </summary>
        /// <returns>An XElement </returns>
        public override XElement GetXmlTree()
        {
            var element = new XElement(Namespaces.NsWindowsAzure + "ConfigurationSet", InputEndpoints.GetXmlTree());

            element.Add(new XElement(Namespaces.NsWindowsAzure + "ConfigurationSetType", ConfigurationSetType.ToString()));
            if (SubnetName != null)
            {
                element.Add(new XElement(Namespaces.NsWindowsAzure + "SubnetNames", new XElement(Namespaces.NsWindowsAzure + "SubnetName", SubnetName)));
            }
            if (EndpointAcl != null)
            {
                element.Add(EndpointAcl.GetXmlTree());
            }
            return(element);
        }