Пример #1
0
		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();
			
		}
Пример #2
0
        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));
        }
Пример #3
0
		internal static Task<ChartData> GetChartData(string forUri) {
            var fc = new ChartDataFacade(forUri);

            fc.SubscriptionCredentialsProvider = s => GetSubscriptionById(s).GetMetricsConfig();

            return fc.FetchChartData();

			
		}