/// <summary> /// The List Metric Settings operation lists the metric settings for /// the resource. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Monitoring.Metrics.IMetricSettingOperations. /// </param> /// <param name='resourceId'> /// The id of the resource. /// </param> /// <param name='metricNamespace'> /// The namespace of the metrics. /// </param> /// <returns> /// The list metric settings operation response. /// </returns> public static MetricSettingListResponse List(this IMetricSettingOperations operations, string resourceId, string metricNamespace) { try { return(operations.ListAsync(resourceId, metricNamespace).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// The List Metric Settings operation lists the metric settings for /// the resource. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Monitoring.Metrics.IMetricSettingOperations. /// </param> /// <param name='resourceId'> /// Required. The id of the resource. /// </param> /// <param name='metricNamespace'> /// Required. The namespace of the metrics. /// </param> /// <returns> /// The list metric settings operation response. /// </returns> public static Task <MetricSettingListResponse> ListAsync(this IMetricSettingOperations operations, string resourceId, string metricNamespace) { return(operations.ListAsync(resourceId, metricNamespace, CancellationToken.None)); }