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); }
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); }