public ParticipantsForEditCommand(
     Organization organization,
     InvitedExternalEmailForEditCommand invitedExternalEmail,
     InvitedPersonForEditCommand invitedPerson,
     InvitedFunctionalRoleForEditCommand invitedFunctionalRole,
     int sortKey) : base(organization, invitedExternalEmail, invitedPerson, invitedFunctionalRole, sortKey)
 {
     InvitedExternalEmailToEdit  = invitedExternalEmail;
     InvitedPersonToEdit         = invitedPerson;
     InvitedFunctionalRoleToEdit = invitedFunctionalRole;
 }
        private async Task <List <BuilderParticipant> > AddSigner(
            Invitation invitation,
            List <BuilderParticipant> meetingParticipants,
            IList <Participant> existingParticipants,
            InvitedPersonForEditCommand person,
            int sortKey,
            Organization organization)
        {
            var personFromMain = await _personApiService.GetPersonByOidWithPrivilegesAsync(_plantProvider.Plant,
                                                                                           person.AzureOid.ToString(), _objectName, _signerPrivileges);

            if (personFromMain != null)
            {
                var existingParticipant = existingParticipants.SingleOrDefault(p => p.Id == person.Id);
                if (existingParticipant != null)
                {
                    invitation.UpdateParticipant(
                        existingParticipant.Id,
                        organization,
                        IpoParticipantType.Person,
                        null,
                        personFromMain.FirstName,
                        personFromMain.LastName,
                        personFromMain.Email,
                        new Guid(personFromMain.AzureOid),
                        sortKey,
                        person.RowVersion);
                }
                else
                {
                    invitation.AddParticipant(new Participant(
                                                  _plantProvider.Plant,
                                                  organization,
                                                  IpoParticipantType.Person,
                                                  null,
                                                  personFromMain.FirstName,
                                                  personFromMain.LastName,
                                                  personFromMain.UserName,
                                                  personFromMain.Email,
                                                  new Guid(personFromMain.AzureOid),
                                                  sortKey));
                }
                meetingParticipants = InvitationHelper.AddPersonToOutlookParticipantList(personFromMain, meetingParticipants);
            }
            else
            {
                throw new IpoValidationException($"Person does not have required privileges to be the {organization} participant.");
            }
            return(meetingParticipants);
        }