示例#1
0
 /// <summary>
 /// Lists the collection of subscriptions of the specified user.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='userId'>
 /// User identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <SubscriptionContract> > ListAsync(this IUserSubscriptionOperations operations, string resourceGroupName, string serviceName, string userId, ODataQuery <SubscriptionContract> odataQuery = default(ODataQuery <SubscriptionContract>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, serviceName, userId, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#2
0
 /// <summary>
 /// Lists the collection of subscriptions of the specified user.
 /// </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 <SubscriptionContract> > ListNextAsync(this IUserSubscriptionOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#3
0
 /// <summary>
 /// Gets the specified Subscription entity associated with a particular user.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='userId'>
 /// User identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='sid'>
 /// Subscription entity Identifier. The entity represents the association
 /// between a user and a product in API Management.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SubscriptionContract> GetAsync(this IUserSubscriptionOperations operations, string resourceGroupName, string serviceName, string userId, string sid, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, userId, sid, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#4
0
 /// <summary>
 /// Gets the specified Subscription entity associated with a particular user.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='userId'>
 /// User identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='sid'>
 /// Subscription entity Identifier. The entity represents the association
 /// between a user and a product in API Management.
 /// </param>
 public static SubscriptionContract Get(this IUserSubscriptionOperations operations, string resourceGroupName, string serviceName, string userId, string sid)
 {
     return(operations.GetAsync(resourceGroupName, serviceName, userId, sid).GetAwaiter().GetResult());
 }
示例#5
0
 /// <summary>
 /// Lists the collection of subscriptions of the specified user.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='userId'>
 /// User identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <SubscriptionContract> List(this IUserSubscriptionOperations operations, string resourceGroupName, string serviceName, string userId, ODataQuery <SubscriptionContract> odataQuery = default(ODataQuery <SubscriptionContract>))
 {
     return(operations.ListAsync(resourceGroupName, serviceName, userId, odataQuery).GetAwaiter().GetResult());
 }
示例#6
0
 /// <summary>
 /// Lists the collection of subscriptions of the specified user.
 /// </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 <SubscriptionContract> ListNext(this IUserSubscriptionOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }