Exemplo n.º 1
0
 /// <summary>
 /// Add existing user to existing group
 /// </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='groupId'>
 /// Group identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='userId'>
 /// User identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <UserContract> CreateAsync(this IGroupUserOperations operations, string resourceGroupName, string serviceName, string groupId, string userId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, serviceName, groupId, userId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Lists a collection of user entities associated with the group.
 /// </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='groupId'>
 /// Group 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 <UserContract> > ListAsync(this IGroupUserOperations operations, string resourceGroupName, string serviceName, string groupId, ODataQuery <UserContract> odataQuery = default(ODataQuery <UserContract>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, serviceName, groupId, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Lists a collection of user entities associated with the group.
 /// </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 <UserContract> > ListNextAsync(this IGroupUserOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Checks that user entity specified by identifier is associated with the
 /// group entity.
 /// </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='groupId'>
 /// Group identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='uid'>
 /// User identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <bool> CheckEntityExistsAsync(this IGroupUserOperations operations, string resourceGroupName, string serviceName, string groupId, string uid, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CheckEntityExistsWithHttpMessagesAsync(resourceGroupName, serviceName, groupId, uid, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// Checks that user entity specified by identifier is associated with the
 /// group entity.
 /// </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='groupId'>
 /// Group identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='userId'>
 /// User identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 public static bool CheckEntityExists(this IGroupUserOperations operations, string resourceGroupName, string serviceName, string groupId, string userId)
 {
     return(operations.CheckEntityExistsAsync(resourceGroupName, serviceName, groupId, userId).GetAwaiter().GetResult());
 }
Exemplo n.º 6
0
 /// <summary>
 /// Lists a collection of user entities associated with the group.
 /// </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='groupId'>
 /// Group 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 <UserContract> List(this IGroupUserOperations operations, string resourceGroupName, string serviceName, string groupId, ODataQuery <UserContract> odataQuery = default(ODataQuery <UserContract>))
 {
     return(operations.ListAsync(resourceGroupName, serviceName, groupId, odataQuery).GetAwaiter().GetResult());
 }
Exemplo n.º 7
0
 /// <summary>
 /// Lists a collection of user entities associated with the group.
 /// </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 <UserContract> ListNext(this IGroupUserOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Exemplo n.º 8
0
 /// <summary>
 /// Remove existing user from existing group.
 /// </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='groupId'>
 /// Group identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='userId'>
 /// User identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IGroupUserOperations operations, string resourceGroupName, string serviceName, string groupId, string userId, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, groupId, userId, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemplo n.º 9
0
 /// <summary>
 /// Remove existing user from existing group.
 /// </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='groupId'>
 /// Group identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='userId'>
 /// User identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 public static void Delete(this IGroupUserOperations operations, string resourceGroupName, string serviceName, string groupId, string userId)
 {
     operations.DeleteAsync(resourceGroupName, serviceName, groupId, userId).GetAwaiter().GetResult();
 }
Exemplo n.º 10
0
 /// <summary>
 /// Add existing user to existing group
 /// </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='groupId'>
 /// Group identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='userId'>
 /// User identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 public static UserContract Create(this IGroupUserOperations operations, string resourceGroupName, string serviceName, string groupId, string userId)
 {
     return(operations.CreateAsync(resourceGroupName, serviceName, groupId, userId).GetAwaiter().GetResult());
 }