/// <summary>
 /// Lists the metric definitions for the resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceUri'>
 /// The identifier of the resource.
 /// </param>
 /// <param name='metricnamespace'>
 /// Metric namespace to query metric definitions for.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task<IEnumerable<MetricDefinition>> ListAsync(this IMetricDefinitionsOperations operations, string resourceUri, string metricnamespace = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceUri, metricnamespace, null, cancellationToken).ConfigureAwait(false))
     {
         return _result.Body;
     }
 }
예제 #2
0
 /// <summary>
 /// Lists the metric definitions for the resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceUri'>
 /// The identifier of the resource.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IEnumerable <MetricDefinitionInner> > ListAsync(this IMetricDefinitionsOperations operations, string resourceUri, ODataQuery <MetricDefinitionInner> odataQuery = default(ODataQuery <MetricDefinitionInner>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceUri, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists the metric definitions for the resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceUri'>
 /// The identifier of the resource.
 /// </param>
 /// <param name='metricnamespace'>
 /// Metric namespace to query metric definitions for.
 /// </param>
 public static IEnumerable<MetricDefinition> List(this IMetricDefinitionsOperations operations, string resourceUri, string metricnamespace = default(string))
 {
     return operations.ListAsync(resourceUri, metricnamespace).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Lists the metric definitions for the resource. The **$filter** parameter is
 /// optional, and can be used to only retrieve certain metric definitions. For
 /// example, get just the definition for the CPU percentage counter:
 /// $filter=name.value eq '\Processor(_Total)\% Processor Time'. This $filter
 /// is very restricted and allows only these 'name eq &lt;value&gt;' clauses
 /// separated by or operators. No other syntax is allowed.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceUri'>
 /// The identifier of the resource.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <System.Collections.Generic.IEnumerable <MetricDefinition> > ListAsync(this IMetricDefinitionsOperations operations, string resourceUri, Microsoft.Rest.Azure.OData.ODataQuery <MetricDefinition> odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery <MetricDefinition>), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceUri, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists the metric definitions for the resource. The **$filter** parameter is
 /// optional, and can be used to only retrieve certain metric definitions. For
 /// example, get just the definition for the CPU percentage counter:
 /// $filter=name.value eq '\Processor(_Total)\% Processor Time'. This $filter
 /// is very restricted and allows only these 'name eq &lt;value&gt;' clauses
 /// separated by or operators. No other syntax is allowed.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceUri'>
 /// The identifier of the resource.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static System.Collections.Generic.IEnumerable <MetricDefinition> List(this IMetricDefinitionsOperations operations, string resourceUri, Microsoft.Rest.Azure.OData.ODataQuery <MetricDefinition> odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery <MetricDefinition>))
 {
     return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IMetricDefinitionsOperations)s).ListAsync(resourceUri, odataQuery), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }