コード例 #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);
        }
コード例 #2
0
        /// <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);
        }
コード例 #3
0
 //called when the subclass is used to serialize info to the server
 //to set the type
 protected ProvisioningConfigurationSet(ConfigurationSetType configurationSetType)
     : base(configurationSetType)
 {
 }
コード例 #4
0
 //called when the subclass is used to serialize info to the server
 //to set the type
 protected ConfigurationSet(ConfigurationSetType configurationSetType)
 {
     this.ConfigurationSetType = configurationSetType;
 }
コード例 #5
0
        /// <summary>
        /// Gets the Xml tree for the custom serialiser
        /// </summary>
        /// <returns>An XElement </returns>
        public XElement GetXmlTree()
        {
            var namer = new RandomAccountName();

            // if the timezone is set to null then set it GMT
            TimeZone = TimeZone ?? "GMT Standard Time";
            var element = new XElement(Namespaces.NsWindowsAzure + "ConfigurationSet",
                                       new XElement(Namespaces.NsWindowsAzure + "ConfigurationSetType", ConfigurationSetType.ToString()),
                                       new XElement(Namespaces.NsWindowsAzure + "ComputerName", namer.GetPureRandomValue().ToUpper()),
                                       new XElement(Namespaces.NsWindowsAzure + "AdminPassword", AdminPassword),
                                       new XElement(Namespaces.NsWindowsAzure + "ResetPasswordOnFirstLogon", ResetPasswordOnFirstLogon.ToString(CultureInfo.InvariantCulture).ToLower()),
                                       new XElement(Namespaces.NsWindowsAzure + "EnableAutomaticUpdates", EnableAutomaticUpdate.ToString(CultureInfo.InvariantCulture).ToLower()),
                                       new XElement(Namespaces.NsWindowsAzure + "TimeZone", TimeZone));

            //if (ComputerName != null)
            //    element.Add(new XElement(Namespaces.NsWindowsAzure + "ComputerName",
            //                             ComputerName.ToString(CultureInfo.InvariantCulture)));
            return(element);
        }