Exemple #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 + "InputEndpoint",
                                       new XElement(Namespaces.NsWindowsAzure + "LocalPort", LocalPort.ToString(CultureInfo.InvariantCulture)),
                                       new XElement(Namespaces.NsWindowsAzure + "Name", EndpointName.ToString(CultureInfo.InvariantCulture)));

            if (Port.HasValue)
            {
                element.Add(new XElement(Namespaces.NsWindowsAzure + "Port", Port.Value.ToString(CultureInfo.InvariantCulture)));
            }
            element.Add(new XElement(Namespaces.NsWindowsAzure + "Protocol", content: Protocol.ToString().ToLower()));
            return(element);
        }