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


C# WindowsAzureSubscription.CreateClient方法代码示例

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


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

示例1: WebsitesClient

 /// <summary>
 /// Creates new WebsitesClient
 /// </summary>
 /// <param name="subscription">Subscription containing websites to manipulate</param>
 /// <param name="logger">The logger action</param>
 public WebsitesClient(WindowsAzureSubscription subscription, Action<string> logger)
 {
     Logger = logger;
     cloudServiceClient = new CloudServiceClient(subscription, debugStream: logger);
     WebsiteManagementClient = subscription.CreateClient<WebSiteManagementClient>();
     this.subscription = subscription;
 }
开发者ID:kenazk,项目名称:azure-sdk-tools,代码行数:12,代码来源:WebsitesClient.cs

示例2: ResourcesClient

        /// <summary>
        /// Creates new ResourceManagementClient
        /// </summary>
        /// <param name="subscription">Subscription containing resources to manipulate</param>
        public ResourcesClient(WindowsAzureSubscription subscription)
            : this(
                subscription.CreateClientFromResourceManagerEndpoint<ResourceManagementClient>(),
                new StorageClientWrapper(subscription.CreateClient<StorageManagementClient>()),
                new GalleryTemplatesClient(subscription),
                subscription.CreateClientFromResourceManagerEndpoint<EventsClient>())
        {

        }
开发者ID:kangyangthu,项目名称:azure-sdk-tools,代码行数:13,代码来源:ResourceClient.cs

示例3: SchedulerMgmntClient

        /// <summary>
        /// Creates new Scheduler Management Convenience Client
        /// </summary>
        /// <param name="subscription">Subscription containing websites to manipulate</param>
        public SchedulerMgmntClient(WindowsAzureSubscription subscription)
        {
            currentSubscription = subscription;
            csmClient = subscription.CreateClient<CloudServiceManagementClient>();
            schedulerManagementClient = subscription.CreateClient<SchedulerManagementClient>();

            //Get RP properties
            IDictionary<string, string> dict = schedulerManagementClient.GetResourceProviderProperties().Properties;

            //Get available regions
            string val = string.Empty;
            if(dict.TryGetValue(SupportedRegionsKey, out val))
            {
                AvailableRegions = new List<string>();
                val.Split(',').ToList().ForEach(s => AvailableRegions.Add(s));
            }            

            //Store global counts for max jobs and min recurrence for each plan     
            if(dict.TryGetValue(FreeMaxJobCountKey, out val))
                FreeMaxJobCountValue = Convert.ToInt32(dict[FreeMaxJobCountKey]);

            if (dict.TryGetValue(FreeMinRecurrenceKey, out val))
                FreeMinRecurrenceValue = TimeSpan.Parse(dict[FreeMinRecurrenceKey]);

            if (dict.TryGetValue(StandardMaxJobCountKey, out val))
                StandardMaxJobCountValue = Convert.ToInt32(dict[StandardMaxJobCountKey]);

            if (dict.TryGetValue(StandardMinRecurrenceKey, out val))
                StandardMinRecurrenceValue = TimeSpan.Parse(dict[StandardMinRecurrenceKey]);

            if (dict.TryGetValue(PremiumMaxJobCountKey, out val))
                PremiumMaxJobCountValue = Convert.ToInt32(dict[PremiumMaxJobCountKey]);

            if (dict.TryGetValue(PremiumMinRecurrenceKey, out val))
                PremiumMinRecurrenceValue = TimeSpan.Parse(dict[PremiumMinRecurrenceKey]);
        }
开发者ID:NordPool,项目名称:azure-sdk-tools,代码行数:40,代码来源:SchedulerMgmntClient.cs

示例4: PSCacheClient

 public PSCacheClient(WindowsAzureSubscription currentSubscription)
 {
     client = currentSubscription.CreateClient<ManagedCacheClient>();
 }
开发者ID:NordPool,项目名称:azure-sdk-tools,代码行数:4,代码来源:PSCacheClient.cs

示例5: StoreClient

 /// <summary>
 /// Creates new instance from the store client.
 /// </summary>
 /// <param name="subscriptionId">The Windows Azure subscription id</param>
 /// <param name="storeEndpointUri">The service management endpoint uri</param>
 /// <param name="cert">The authentication certificate</param>
 /// <param name="logger">The logger for http request/response</param>
 /// <param name="serviceManagementChannel">The service management channel</param>
 public StoreClient(WindowsAzureSubscription subscription)
     : this(
         subscription,
         subscription.CreateClient<ComputeManagementClient>(),
         subscription.CreateClient<StoreManagementClient>(),
         new MarketplaceClient(),
         subscription.CreateClient<ManagementClient>()) { }
开发者ID:EmmaZhu,项目名称:azure-sdk-tools,代码行数:15,代码来源:StoreClient.cs

示例6: AutomationClient

 public AutomationClient(WindowsAzureSubscription subscription)
     : this(
         subscription,
         subscription.CreateClient<AutomationManagementClient>())
 {
 }
开发者ID:NordPool,项目名称:azure-sdk-tools,代码行数:6,代码来源:AutomationClient.cs

示例7: ServiceBusClientExtensions

 /// <summary>
 /// Creates new instance from ServiceBusClientExtensions
 /// </summary>
 /// <param name="subscription"></param>
 /// <param name="logger">The logger action</param>
 public ServiceBusClientExtensions(WindowsAzureSubscription subscription)
 {
     subscriptionId = subscription.SubscriptionId;
     Subscription = subscription;
     ServiceBusClient = Subscription.CreateClient<ServiceBusManagementClient>();
 }
开发者ID:kangyangthu,项目名称:azure-sdk-tools,代码行数:11,代码来源:ServiceBusClientExtensions.cs

示例8: CloudServiceClient

        /// <summary>
        /// Creates new instance from CloudServiceClient.
        /// </summary>
        /// <param name="subscription">The subscription data</param>
        /// <param name="currentLocation">Directory to do operations in</param>
        /// <param name="debugStream">Action used to log http requests/responses</param>
        /// <param name="verboseStream">Action used to log detailed client progress</param>
        /// <param name="warningStream">Action used to log warning messages</param>
        public CloudServiceClient(
            WindowsAzureSubscription subscription,
            string currentLocation = null,
            Action<string> debugStream = null,
            Action<string> verboseStream = null,
            Action<string> warningStream = null)
            : this(currentLocation, debugStream, warningStream, verboseStream)
        {
            Subscription = subscription;
            CloudBlobUtility = new CloudBlobUtility();

            ManagementClient = subscription.CreateClient<ManagementClient>();
            StorageClient = subscription.CreateClient<StorageManagementClient>();
            ComputeClient = subscription.CreateClient<ComputeManagementClient>();
        }
开发者ID:ranjitk9,项目名称:azure-sdk-tools,代码行数:23,代码来源:CloudServiceClient.cs

示例9: TrafficManagerClient

 public TrafficManagerClient(WindowsAzureSubscription subscription)
 {
     this.Client = subscription.CreateClient<TrafficManagerManagementClient>();
 }
开发者ID:EmmaZhu,项目名称:azure-sdk-tools,代码行数:4,代码来源:TrafficManagerClient.cs

示例10: SchedulerMgmntClient

 /// <summary>
 /// Creates new Scheduler Management Convenience Client
 /// </summary>
 /// <param name="subscription">Subscription containing websites to manipulate</param>
 public SchedulerMgmntClient(WindowsAzureSubscription subscription)
 {
     csmClient = subscription.CreateClient<CloudServiceManagementClient>();
     schedulerManagementClient = subscription.CreateClient<SchedulerManagementClient>();
 }
开发者ID:B-Rich,项目名称:azure-sdk-tools,代码行数:9,代码来源:SchedulerMgmntClient.cs

示例11: ExpressRouteClient

 /// <summary>
 /// Creates new ExpressRouteClient
 /// </summary>
 /// <param name="subscription">Subscription containing websites to manipulate</param>
 /// <param name="logger">The logger action</param>
 public ExpressRouteClient(WindowsAzureSubscription subscription)
 {
     Client = subscription.CreateClient<ExpressRouteManagementClient>();
 }
开发者ID:NordPool,项目名称:azure-sdk-tools,代码行数:9,代码来源:ExpressRouteClient.cs


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