예제 #1
0
 /// <summary>
 /// Gets a subscription usage metric.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='locationName'>
 /// The name of the region where the resource is located.
 /// </param>
 /// <param name='usageName'>
 /// Name of usage metric to return.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SubscriptionUsageInner> GetAsync(this ISubscriptionUsagesOperations operations, string locationName, string usageName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(locationName, usageName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets a subscription usage metric.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='locationName'>
 /// The name of the region where the resource is located.
 /// </param>
 /// <param name='usageName'>
 /// Name of usage metric to return.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SubscriptionUsage> GetAsync(this ISubscriptionUsagesOperations operations, string locationName, string usageName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(locationName, usageName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets a subscription usage metric.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='locationName'>
 /// The name of the region where the resource is located.
 /// </param>
 /// <param name='usageName'>
 /// Name of usage metric to return.
 /// </param>
 public static SubscriptionUsage Get(this ISubscriptionUsagesOperations operations, string locationName, string usageName)
 {
     return(operations.GetAsync(locationName, usageName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets all subscription usage metrics in a given location.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='locationName'>
 /// The name of the region where the resource is located.
 /// </param>
 public static IPage <SubscriptionUsage> ListByLocation(this ISubscriptionUsagesOperations operations, string locationName)
 {
     return(operations.ListByLocationAsync(locationName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets all subscription usage metrics in a given location.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <SubscriptionUsage> > ListByLocationNextAsync(this ISubscriptionUsagesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByLocationNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets all subscription usage metrics in a given location.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <SubscriptionUsage> ListByLocationNext(this ISubscriptionUsagesOperations operations, string nextPageLink)
 {
     return(operations.ListByLocationNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
예제 #7
0
 /// <summary>
 /// Gets all subscription usage metrics in a given location.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <SubscriptionUsageInner> > ListByLocationNextAsync(this ISubscriptionUsagesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByLocationNextWithHttpMessagesAsync(nextPageLink, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }