本文整理汇总了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;
}
示例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>())
{
}
示例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]);
}
示例4: PSCacheClient
public PSCacheClient(WindowsAzureSubscription currentSubscription)
{
client = currentSubscription.CreateClient<ManagedCacheClient>();
}
示例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>()) { }
示例6: AutomationClient
public AutomationClient(WindowsAzureSubscription subscription)
: this(
subscription,
subscription.CreateClient<AutomationManagementClient>())
{
}
示例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>();
}
示例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>();
}
示例9: TrafficManagerClient
public TrafficManagerClient(WindowsAzureSubscription subscription)
{
this.Client = subscription.CreateClient<TrafficManagerManagementClient>();
}
示例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>();
}
示例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>();
}