コード例 #1
0
        private static Profile2018ResourceManager.ResourceManagementClient GetResourceManagementClient(Uri baseUri, CustomLoginCredentials customCredential, string subscriptionId)
        {
            var client = new Profile2018ResourceManager.ResourceManagementClient(baseUri: baseUri, credentials: customCredential)
            {
                SubscriptionId = subscriptionId
            };

            client.SetUserAgent(ComponentName);

            return(client);
        }
コード例 #2
0
 private void GetResourceGroupClient()
 {
     if (client != null)
     {
         return;
     }
     if (customCredential != null)
     {
         client = new Profile2018ResourceManager.ResourceManagementClient(baseUri: baseUri, credentials: customCredential)
         {
             SubscriptionId = this.subscriotionId
         };
     }
     else
     {
         client = new Profile2018ResourceManager.ResourceManagementClient(baseUri: baseUri, credentials: azureCredential)
         {
             SubscriptionId = this.azureCredential.DefaultSubscriptionId
         };
     }
     client.SetUserAgent(ComponentName);
 }