public async Task <ICollection <AzureWebsite> > ListWebsites() { return((await _websiteInfoClient.ListAzureWebsites()).Select(_ => new AzureWebsite { Name = _.Name, Uri = GetWebsiteUri(_) } ).ToList()); }
public static string FindWebspace(MetricsEndpointConfiguration config, string websiteName) { var infoClient = new AzureWebsitesInfoApiClient(new AzureWebsiteApiClient(new AzureManagementRestClient(config.GetCertificateCloudCredentials()))); var website = infoClient.ListAzureWebsites().Result.FirstOrDefault(_=>_.Name == websiteName); if(website == null) { return null; } return website.Webspace; }
internal async Task <ICollection <UsageObject> > GetUsageCollection() { var websites = await _azureWebsitesInfoClient.ListAzureWebsites(); var result = await Task.WhenAll(websites.Select( w => new AzureWebsiteUsage(w, _metricsApiClient, _azureWebsitesMetricsClient).GetUsage() )); return(result.SelectMany(_ => _).ToList()); }
public static string FindWebspace(MetricsEndpointConfiguration config, string websiteName) { var infoClient = new AzureWebsitesInfoApiClient(new AzureWebsiteApiClient(new AzureManagementRestClient(config.GetCertificateCloudCredentials()))); var website = infoClient.ListAzureWebsites().Result.FirstOrDefault(_ => _.Name == websiteName); if (website == null) { return(null); } return(website.Webspace); }