/// <summary> /// You can retrieve historical usage metrics for a site by issuing an /// HTTP GET request. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/dn166964.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.WebSites.IWebHostingPlanOperations. /// </param> /// <param name='webSpaceName'> /// Required. The name of the web space. /// </param> /// <param name='webHostingPlanName'> /// Required. The name of the web hosting plan. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the Get Historical Usage Metrics /// Web hosting plan operation. /// </param> /// <returns> /// The Get Historical Usage Metrics Web hosting plan operation /// response. /// </returns> public static Task<WebHostingPlanGetHistoricalUsageMetricsResponse> GetHistoricalUsageMetricsAsync(this IWebHostingPlanOperations operations, string webSpaceName, string webHostingPlanName, WebHostingPlanGetHistoricalUsageMetricsParameters parameters) { return operations.GetHistoricalUsageMetricsAsync(webSpaceName, webHostingPlanName, parameters, CancellationToken.None); }
/// <summary> /// You can retrieve historical usage metrics for a site by issuing an /// HTTP GET request. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/dn166964.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.WebSites.IWebHostingPlanOperations. /// </param> /// <param name='webSpaceName'> /// Required. The name of the web space. /// </param> /// <param name='webHostingPlanName'> /// Required. The name of the web hosting plan. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the Get Historical Usage Metrics /// Web hosting plan operation. /// </param> /// <returns> /// The Get Historical Usage Metrics Web hosting plan operation /// response. /// </returns> public static WebHostingPlanGetHistoricalUsageMetricsResponse GetHistoricalUsageMetrics(this IWebHostingPlanOperations operations, string webSpaceName, string webHostingPlanName, WebHostingPlanGetHistoricalUsageMetricsParameters parameters) { return Task.Factory.StartNew((object s) => { return ((IWebHostingPlanOperations)s).GetHistoricalUsageMetricsAsync(webSpaceName, webHostingPlanName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }