private static async Task <bool> CheckGroupInviteExistsByIdentifierAsync( string groupInviteIdentifier, IGroupInviteRepository groupInviteRepository) { var groupInvite = await groupInviteRepository.GetByIdentifierAsync(groupInviteIdentifier); return(groupInvite != null); }
public GroupInviteService(IGroupInviteRepository inviteRepository, IGroupInviteCommand inviteCommand, IRegistrationEmailService emailService) { _inviteRepository = inviteRepository ?? throw new ArgumentNullException(nameof(inviteRepository)); _inviteCommand = inviteCommand ?? throw new ArgumentNullException(nameof(inviteCommand)); _emailService = emailService ?? throw new ArgumentNullException(nameof(emailService)); }
private static async Task <string> GenerateNewGroupInviteIdentifierAsync( Guid groupId, IGroupInviteRepository groupRepository) { var newGroupInviteIdentifier = ModelHelpers.GenerateUniqueIdentifier(IdentifierConsts.GroupIdentifierLength); var groupInviteExistsForGroupWithIdentifier = await CheckGroupInviteExistsByIdentifierAsync( newGroupInviteIdentifier, groupRepository).ConfigureAwait(false); if (groupInviteExistsForGroupWithIdentifier) { return(await GenerateNewGroupInviteIdentifierAsync( groupId, groupRepository).ConfigureAwait(false)); } else { return(newGroupInviteIdentifier); } }
public DeleteGroupInviteCommandHandler(IGroupInviteRepository groupInviteRepository, IUnitOfWork unitOfWork) => (_groupInviteRepository, _unitOfWork)
public AddGroupInviteCommandHandler(IGroupInviteRepository groupInviteRepository, IUnitOfWork unitOfWork, IGroupRepository groupRepository) { _groupInviteRepository = groupInviteRepository; _unitOfWork = unitOfWork; _groupRepository = groupRepository; }
public GetGroupInviteQueryHandler(IGroupInviteRepository repository) => _repository = repository;
public UpdateGroupInviteCommandHandler(IGroupInviteRepository grouInviteRepository, IGroupRepository groupRepository, IUnitOfWork unitOfWork) => (_groupInviteRepository, _groupRepository, _unitOfWork)