コード例 #1
0
 /// <summary>
 /// Accepts a pending organization invitation for the specified user
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='invitationToken'>
 /// The app invitation token that was sent to the user
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task AcceptAsync(this IOrgInvitations operations, string invitationToken, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.AcceptWithHttpMessagesAsync(invitationToken, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
コード例 #2
0
 /// <summary>
 /// Removes a user's invitation to an organization
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='orgName'>
 /// The organization's name
 /// </param>
 /// <param name='email'>
 /// The email address of the user to send the password reset mail to.
 /// </param>
 public static void UnnamedMethod(this IOrgInvitations operations, string orgName, string email)
 {
     operations.UnnamedMethodAsync(orgName, email).GetAwaiter().GetResult();
 }
コード例 #3
0
 /// <summary>
 /// Gets the pending invitations for the organization
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='orgName'>
 /// The organization's name
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <OrganizationInvitationSimpleDetailResponse> > ListPendingAsync(this IOrgInvitations operations, string orgName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListPendingWithHttpMessagesAsync(orgName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #4
0
 /// <summary>
 /// Accepts a pending organization invitation for the specified user
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='invitationToken'>
 /// The app invitation token that was sent to the user
 /// </param>
 public static void Accept(this IOrgInvitations operations, string invitationToken)
 {
     operations.AcceptAsync(invitationToken).GetAwaiter().GetResult();
 }
コード例 #5
0
 /// <summary>
 /// Removes a user's invitation to an organization
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='orgName'>
 /// The organization's name
 /// </param>
 /// <param name='userEmail'>
 /// The email of the user whose invitation should be removed
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IOrgInvitations operations, string orgName, UserEmailRequest userEmail = default(UserEmailRequest), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(orgName, userEmail, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
コード例 #6
0
 /// <summary>
 /// Gets the pending invitations for the organization
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='orgName'>
 /// The organization's name
 /// </param>
 public static IList <OrganizationInvitationSimpleDetailResponse> ListPending(this IOrgInvitations operations, string orgName)
 {
     return(operations.ListPendingAsync(orgName).GetAwaiter().GetResult());
 }
コード例 #7
0
 /// <summary>
 /// Removes a user's invitation to an organization
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='orgName'>
 /// The organization's name
 /// </param>
 /// <param name='userEmail'>
 /// The email of the user whose invitation should be removed
 /// </param>
 public static void Delete(this IOrgInvitations operations, string orgName, UserEmailRequest userEmail = default(UserEmailRequest))
 {
     operations.DeleteAsync(orgName, userEmail).GetAwaiter().GetResult();
 }
コード例 #8
0
 /// <summary>
 /// Allows the role of an invited user to be changed
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='orgName'>
 /// The organization's name
 /// </param>
 /// <param name='email'>
 /// The email address of the user to send the password reset mail to.
 /// </param>
 /// <param name='userRole'>
 /// The new role of the user
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task UpdateAsync(this IOrgInvitations operations, string orgName, string email, OrganizationUserPatchRequest userRole, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.UpdateWithHttpMessagesAsync(orgName, email, userRole, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
コード例 #9
0
 /// <summary>
 /// Allows the role of an invited user to be changed
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='orgName'>
 /// The organization's name
 /// </param>
 /// <param name='email'>
 /// The email address of the user to send the password reset mail to.
 /// </param>
 /// <param name='userRole'>
 /// The new role of the user
 /// </param>
 public static void Update(this IOrgInvitations operations, string orgName, string email, OrganizationUserPatchRequest userRole)
 {
     operations.UpdateAsync(orgName, email, userRole).GetAwaiter().GetResult();
 }
コード例 #10
0
 /// <summary>
 /// Cancels an existing organization invitation for the user and sends a new
 /// one
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='orgName'>
 /// The organization's name
 /// </param>
 /// <param name='email'>
 /// The email address of the user to send the password reset mail to.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task SendNewInvitationAsync(this IOrgInvitations operations, string orgName, string email, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.SendNewInvitationWithHttpMessagesAsync(orgName, email, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
コード例 #11
0
 /// <summary>
 /// Cancels an existing organization invitation for the user and sends a new
 /// one
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='orgName'>
 /// The organization's name
 /// </param>
 /// <param name='email'>
 /// The email address of the user to send the password reset mail to.
 /// </param>
 public static void SendNewInvitation(this IOrgInvitations operations, string orgName, string email)
 {
     operations.SendNewInvitationAsync(orgName, email).GetAwaiter().GetResult();
 }