public Task<ChartData> GetChartData(string uri){ //return AzureSubscriptions.GetChartData(uri); var facade = new ChartDataFacade(uri); facade.SqlCredentialsProvider = AzureSQLDatabases.GetCredentials; facade.SubscriptionCredentialsProvider = AzureSubscriptions.GetCredentials; return facade.FetchChartData(); }
internal void PrintData() { var facade = new ChartDataFacade(_uri); facade.SubscriptionCredentialsProvider = GetSubscriptionCredentials; facade.SqlCredentialsProvider = GetSqlCredentials; var usages = facade.FetchChartData().Result; Console.WriteLine(JsonConvert.SerializeObject(usages,Formatting.Indented)); }
internal static Task<ChartData> GetChartData(string forUri) { var fc = new ChartDataFacade(forUri); fc.SubscriptionCredentialsProvider = s => GetSubscriptionById(s).GetMetricsConfig(); return fc.FetchChartData(); }