Пример #1
0
 /// <summary>
 /// Get soft-deleted Api Management Service by name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='location'>
 /// The location of the deleted API Management service.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DeletedServiceContract> GetByNameAsync(this IDeletedServicesOperations operations, string serviceName, string location, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetByNameWithHttpMessagesAsync(serviceName, location, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #2
0
 /// <summary>
 /// Get soft-deleted Api Management Service by name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='location'>
 /// The location of the deleted API Management service.
 /// </param>
 public static DeletedServiceContract GetByName(this IDeletedServicesOperations operations, string serviceName, string location)
 {
     return(operations.GetByNameAsync(serviceName, location).GetAwaiter().GetResult());
 }
Пример #3
0
 /// <summary>
 /// Lists all soft-deleted services available for undelete for the given
 /// subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <DeletedServiceContract> ListBySubscription(this IDeletedServicesOperations operations)
 {
     return(operations.ListBySubscriptionAsync().GetAwaiter().GetResult());
 }
Пример #4
0
 /// <summary>
 /// Lists all soft-deleted services available for undelete for the given
 /// subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <DeletedServiceContract> > ListBySubscriptionAsync(this IDeletedServicesOperations operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #5
0
 /// <summary>
 /// Lists all soft-deleted services available for undelete for the given
 /// subscription.
 /// </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 <DeletedServiceContract> ListBySubscriptionNext(this IDeletedServicesOperations operations, string nextPageLink)
 {
     return(operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult());
 }