public AzureManagementAPIWrapper(IAzureManagementAPIWrapperConfiguration configuration) { if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } if (string.IsNullOrEmpty(configuration.ClientId)) { throw new ArgumentException(nameof(configuration.ClientId)); } if (string.IsNullOrEmpty(configuration.ClientSecret)) { throw new ArgumentException(nameof(configuration.ClientSecret)); } if (string.IsNullOrEmpty(configuration.AadTenant)) { throw new ArgumentException(nameof(configuration.AadTenant)); } _clientCredential = new ClientCredential(configuration.ClientId, configuration.ClientSecret); _authority = string.Format(CultureInfo.InvariantCulture, AuthorityTemplate, configuration.AadTenant); }
public AzureManagementAPIWrapper(IAzureManagementAPIWrapperConfiguration configuration) { if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } if (string.IsNullOrEmpty(configuration.ClientId)) { throw new ArgumentException(nameof(configuration.ClientId)); } if (string.IsNullOrEmpty(configuration.ClientSecret)) { throw new ArgumentException(nameof(configuration.ClientSecret)); } _clientCredential = new ClientCredential(configuration.ClientId, configuration.ClientSecret); }