public async Task <ActionResult <SendInvitationResult> > SendInvitation( [FromQuery] string projectName, [FromBody] SendInvitationParams sendInvitationParams, [FromServices] SendInvitationHandler sendInvitationHandler) { var result = await sendInvitationHandler.Send( Request.GetUserName(), projectName, sendInvitationParams.InvitedUserName); return(result.Unwrap(new SendInvitationResult())); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='projectName'> /// </param> /// <param name='body'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> SendInvitationAsync(this IDidacticalEnigmaMem operations, string projectName = default(string), SendInvitationParams body = default(SendInvitationParams), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.SendInvitationWithHttpMessagesAsync(projectName, body, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='projectName'> /// </param> /// <param name='body'> /// </param> public static object SendInvitation(this IDidacticalEnigmaMem operations, string projectName = default(string), SendInvitationParams body = default(SendInvitationParams)) { return(operations.SendInvitationAsync(projectName, body).GetAwaiter().GetResult()); }