void PopulateFromXml(XElement element) { element.HydrateObject(XmlNamespaces.WindowsAzure, this); Slot = (DeploymentSlot)Enum.Parse(typeof(DeploymentSlot), (string)element.Element(XmlNamespaces.WindowsAzure + "DeploymentSlot"), true); if (!string.IsNullOrEmpty(Label)) Label = Label.FromBase64String(); Configuration = new ServiceConfiguration(XElement.Parse(element.Element(XmlNamespaces.WindowsAzure + "Configuration").Value.FromBase64String())); }
internal StorageAccount(XElement xml, Subscription subscription) : this() { var azureNamespace = XmlNamespaces.WindowsAzure; xml.HydrateObject(azureNamespace, this); Subscription = subscription; var storageServicePropertiesElement = xml.Element(azureNamespace + "StorageServiceProperties"); storageServicePropertiesElement.HydrateObject(azureNamespace, this); if (!string.IsNullOrEmpty(Label)) Label = Label.FromBase64String(); var extendedProperties = xml.Element(azureNamespace + "ExtendedProperties"); if (extendedProperties != null) { ExtendedProperties = extendedProperties.Elements() .ToDictionary( x => (string) x.Element(azureNamespace + "Name"), x => (string) x.Element(azureNamespace + "Value")); } Endpoints = GetEndpoints(storageServicePropertiesElement, azureNamespace, "Endpoints"); SecondaryEndpoints = GetEndpoints(storageServicePropertiesElement, azureNamespace, "SecondaryEndpoints"); }
internal TrafficManagerProfile(XElement xml, Subscription subscription) : this() { var ns = XmlNamespaces.WindowsAzure; xml.HydrateObject(ns, this); Enabled = (string) xml.Element(ns + "Status") != "Disabled"; Subscription = subscription; }
internal ExtensionImageVersion(XElement xml) { var azureNamespace = XmlNamespaces.WindowsAzure; xml.HydrateObject(azureNamespace, this); PublicConfigurationSchema = PublicConfigurationSchema.FromBase64String(); PrivateConfigurationSchema = PrivateConfigurationSchema.FromBase64String(); SampleConfig = SampleConfig.FromBase64String(); }
internal ReservedIp(XElement xml, Subscription subscription) { Contract.Requires(Subscription == null); Contract.Requires(subscription != null); var azureNamespace = XmlNamespaces.WindowsAzure; xml.HydrateObject(azureNamespace, this); Subscription = subscription; }
public Extension(XElement xml, CloudService parent) { Contract.Requires(parent != null); xml.HydrateObject(XmlNamespaces.WindowsAzure, this); PublicConfiguration = PublicConfiguration.FromBase64String(); PrivateConfiguration = PrivateConfiguration.FromBase64String(); Parent = parent; }
internal AvailableExtensionImage(XElement xml, Subscription subscription) { Subscription = subscription; var azureNamespace = XmlNamespaces.WindowsAzure; xml.HydrateObject(azureNamespace, this); PublicConfigurationSchema = PublicConfigurationSchema.FromBase64String(); PrivateConfigurationSchema = PrivateConfigurationSchema.FromBase64String(); SampleConfig = SampleConfig.FromBase64String(); Versions = new LatentSequence<ExtensionImageVersion>(GetExtensionImageVersionsAsync); }
internal FirewallRule(XElement xml, DatabaseServer parent) { Parent = parent; xml.HydrateObject(XmlNamespaces.WindowsAzure, this); var startIpAddressElement = xml.Element(XmlNamespaces.WindowsAzure + "StartIPAddress"); if (startIpAddressElement != null) { StartIpAddress = startIpAddressElement.Value; } var endIpAddressElement = xml.Element(XmlNamespaces.WindowsAzure + "EndIPAddress"); if (endIpAddressElement != null) { EndIpAddress = endIpAddressElement.Value; } }
internal Location(XElement xml, Subscription subscription) { Contract.Requires(Subscription == null); Contract.Requires(subscription != null); var azureNamespace = XmlNamespaces.WindowsAzure; xml.HydrateObject(azureNamespace, this); Subscription = subscription; var computeCapabilitiesElement = xml.Element(azureNamespace + "ComputeCapabilities"); AvailableServices = GetAvailableServices(xml, azureNamespace); WebWorkerRoleSizes = GetRoleSizes(computeCapabilitiesElement, azureNamespace, "WebWorkerRoleSizes"); VirtualMachinesRoleSizes = GetRoleSizes(computeCapabilitiesElement, azureNamespace, "VirtualMachinesRoleSizes"); }
internal AffinityGroup(XElement xml, Subscription subscription) { Contract.Requires(Subscription == null); Contract.Requires(subscription != null); var azureNamespace = XmlNamespaces.WindowsAzure; xml.HydrateObject(azureNamespace, this); Subscription = subscription; if (!string.IsNullOrEmpty(Label)) { Label = Label.FromBase64String(); } var computeCapabilitiesElement = xml.Element(azureNamespace + "ComputeCapabilities"); Capabilities = GetCapabilities(xml, azureNamespace); WebWorkerRoleSizes = GetRoleSizes(computeCapabilitiesElement, azureNamespace, "WebWorkerRoleSizes"); VirtualMachinesRoleSizes = GetRoleSizes(computeCapabilitiesElement, azureNamespace, "VirtualMachinesRoleSizes"); }
internal FirewallRule(XElement xml, DatabaseServer parent) { Parent = parent; xml.HydrateObject(XmlNamespaces.SqlAzure, this); }
internal Database(XElement xml, DatabaseServer databaseServer) { xml.HydrateObject(XmlNamespaces.WindowsAzure, this); DatabaseServer = databaseServer; }
internal DatabaseServer(XElement xml, Subscription subscription) : this() { xml.HydrateObject(XmlNamespaces.SqlAzure, this); Subscription = subscription; }
internal TrafficManagerHttpOptions(XElement xml) { xml.HydrateObject(XmlNamespaces.WindowsAzure, this); }
internal TrafficManagerMonitor(XElement xml) { var ns = XmlNamespaces.WindowsAzure; xml.HydrateObject(ns, this); HttpOptions = new TrafficManagerHttpOptions(xml.Element(ns + "HttpOptions")); }
internal RoleInstance(XElement element, Deployment parent) { element.HydrateObject(XmlNamespaces.WindowsAzure, this); Parent = parent; }
internal TrafficManagerPolicy(XElement xml) { var ns = XmlNamespaces.WindowsAzure; xml.HydrateObject(ns, this); EndPoints = xml.Element(ns + "Endpoints").Elements(ns + "Endpoint").Select(xe => new TrafficManagerEndpoint(xe)).ToList(); }