当前位置: 首页>>代码示例>>C#>>正文


C# XElement.HydrateObject方法代码示例

本文整理汇总了C#中System.Xml.Linq.XElement.HydrateObject方法的典型用法代码示例。如果您正苦于以下问题:C# XElement.HydrateObject方法的具体用法?C# XElement.HydrateObject怎么用?C# XElement.HydrateObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Xml.Linq.XElement的用法示例。


在下文中一共展示了XElement.HydrateObject方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PopulateFromXml

 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()));
 }
开发者ID:jamesmiles,项目名称:API,代码行数:7,代码来源:Deployment.cs

示例2: StorageAccount

        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");
        }
开发者ID:mortizzle,项目名称:API,代码行数:25,代码来源:StorageAccount.cs

示例3: TrafficManagerProfile

 internal TrafficManagerProfile(XElement xml, Subscription subscription) : this()
 {
     var ns = XmlNamespaces.WindowsAzure;
     xml.HydrateObject(ns, this);
     Enabled = (string) xml.Element(ns + "Status") != "Disabled";
     Subscription = subscription;
 }
开发者ID:mortizzle,项目名称:API,代码行数:7,代码来源:TrafficManagerProfile.cs

示例4: ExtensionImageVersion

        internal ExtensionImageVersion(XElement xml)
        {
            var azureNamespace = XmlNamespaces.WindowsAzure;

            xml.HydrateObject(azureNamespace, this);

            PublicConfigurationSchema = PublicConfigurationSchema.FromBase64String();
            PrivateConfigurationSchema = PrivateConfigurationSchema.FromBase64String();
            SampleConfig = SampleConfig.FromBase64String();
        }
开发者ID:mortizzle,项目名称:API,代码行数:10,代码来源:ExtensionImageVersion.cs

示例5: ReservedIp

        internal ReservedIp(XElement xml, Subscription subscription)
        {
            Contract.Requires(Subscription == null);
            Contract.Requires(subscription != null);

            var azureNamespace = XmlNamespaces.WindowsAzure;

            xml.HydrateObject(azureNamespace, this);
            Subscription = subscription;
        }
开发者ID:mortizzle,项目名称:API,代码行数:10,代码来源:ReservedIp.cs

示例6: Extension

        public Extension(XElement xml, CloudService parent)
        {
            Contract.Requires(parent != null);

            xml.HydrateObject(XmlNamespaces.WindowsAzure, this);

            PublicConfiguration = PublicConfiguration.FromBase64String();
            PrivateConfiguration = PrivateConfiguration.FromBase64String();
            
            Parent = parent;
        }
开发者ID:mortizzle,项目名称:API,代码行数:11,代码来源:Extension.cs

示例7: AvailableExtensionImage

        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);
        }
开发者ID:mortizzle,项目名称:API,代码行数:13,代码来源:AvailableExtensionImage.cs

示例8: FirewallRule

 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;
     }
 }
开发者ID:mortizzle,项目名称:API,代码行数:15,代码来源:FirewallRule.cs

示例9: Location

        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");
        }
开发者ID:mortizzle,项目名称:API,代码行数:16,代码来源:Location.cs

示例10: AffinityGroup

        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");
        }
开发者ID:mortizzle,项目名称:API,代码行数:21,代码来源:AffinityGroup.cs

示例11: FirewallRule

 internal FirewallRule(XElement xml, DatabaseServer parent)
 {
     Parent = parent;
     xml.HydrateObject(XmlNamespaces.SqlAzure, this);
 }
开发者ID:RhysC,项目名称:API,代码行数:5,代码来源:FirewallRule.cs

示例12: Database

 internal Database(XElement xml, DatabaseServer databaseServer)
 {
     xml.HydrateObject(XmlNamespaces.WindowsAzure, this);
     DatabaseServer = databaseServer;
 }
开发者ID:RhysC,项目名称:API,代码行数:5,代码来源:Database.cs

示例13: DatabaseServer

 internal DatabaseServer(XElement xml, Subscription subscription) : this()
 {
     xml.HydrateObject(XmlNamespaces.SqlAzure, this);
     Subscription = subscription;
 }
开发者ID:mortizzle,项目名称:API,代码行数:5,代码来源:DatabaseServer.cs

示例14: TrafficManagerHttpOptions

 internal TrafficManagerHttpOptions(XElement xml)
 {
     xml.HydrateObject(XmlNamespaces.WindowsAzure, this);
 }
开发者ID:jamesmiles,项目名称:API,代码行数:4,代码来源:TrafficManagerMonitor.cs

示例15: TrafficManagerMonitor

 internal TrafficManagerMonitor(XElement xml)
 {
     var ns = XmlNamespaces.WindowsAzure;
     xml.HydrateObject(ns, this);
     HttpOptions = new TrafficManagerHttpOptions(xml.Element(ns + "HttpOptions"));
 }
开发者ID:jamesmiles,项目名称:API,代码行数:6,代码来源:TrafficManagerMonitor.cs


注:本文中的System.Xml.Linq.XElement.HydrateObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。