Exemplo n.º 1
0
 // TODO: do I need Owin on this side too? -SKF 5/6/19
 public LoginServices(
     IElectionsRepository electionsRepo,
     IVotersRepository votersRepo)
 {
     _electionsRepo = electionsRepo ?? throw new ArgumentNullException(nameof(electionsRepo));
     _votersRepo    = votersRepo ?? throw new ArgumentNullException(nameof(votersRepo));
 }
Exemplo n.º 2
0
 public VoteForHandler(
     IDomainEvents domainEvents,
     IVotersRepository votersRepository,
     IIdentityService <VoterIdentity> identityService)
 {
     _domainEvents     = domainEvents;
     _votersRepository = votersRepository;
     _identityService  = identityService;
 }
 public CreateVoterHandler(
     IMapper mapper,
     IVotersRepository voters,
     IDomainEvents domainEvents)
 {
     _mapper       = mapper;
     _voters       = voters;
     _domainEvents = domainEvents;
 }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="VotesServices"/> class.
        /// </summary>
        /// <param name="votesRepository">The votes repository.</param>
        /// <param name="votersRepository">The voters repository.</param>
        /// <param name="candidatesRepository">
        /// An instance of any concrete class that implements the
        /// <see cref="ICandidatesRepository"/> interface. This is typically
        /// the <see cref="CandidatesRepository"/> class.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// votesRepository
        /// or
        /// votersRepository
        /// </exception>
        public VotesServices(
            IVotesRepository votesRepository,
            IVotersRepository votersRepository,
            ICandidatesRepository candidatesRepository)
        {
            _votesRepository      = votesRepository ?? throw new ArgumentNullException(nameof(votesRepository));
            _votersRepository     = votersRepository ?? throw new ArgumentNullException(nameof(votersRepository));
            _candidatesRepository =
                candidatesRepository ?? throw new ArgumentNullException(nameof(candidatesRepository));

            VoteEqualityComparer = new VoteEqualityComparer();
        }
Exemplo n.º 5
0
 public LogInHandler(IMapper mapper, IVotersRepository votersRepository)
 {
     _mapper           = mapper;
     _votersRepository = votersRepository;
 }
 public GiveAdminRightsOnFirstVoterCreated(IDomainEvents domainEvents, IVotersRepository votersRepository)
 {
     _domainEvents     = domainEvents;
     _votersRepository = votersRepository;
 }
Exemplo n.º 7
0
 public VotersServices(
     IVotersRepository votersRepository)
 {
     _votersRepository = votersRepository ?? throw new ArgumentNullException(nameof(votersRepository));
 }