Ejemplo n.º 1
0
        public VoteService(IRepository <Vote> voteRepository, IUnitOfWork unitOfWork, ILogService logService, IVoteFactory voteFactory)
        {
            if (voteRepository == null)
            {
                throw new ArgumentNullException(nameof(voteRepository));
            }

            if (unitOfWork == null)
            {
                throw new ArgumentNullException(nameof(unitOfWork));
            }

            if (logService == null)
            {
                throw new ArgumentNullException(nameof(logService));
            }

            if (voteFactory == null)
            {
                throw new ArgumentNullException(nameof(voteFactory));
            }

            this.voteRepository = voteRepository;
            this.unitOfWork     = unitOfWork;
            this.logService     = logService;
            this.voteFactory    = voteFactory;
        }
Ejemplo n.º 2
0
        public VotingService(IRepository <Vote> voteRepository, IUnitOfWork unitOfWork, IVoteFactory voteFactory, IPostService postService)
        {
            if (voteRepository == null)
            {
                throw new ArgumentNullException("voteRepository");
            }

            if (unitOfWork == null)
            {
                throw new ArgumentNullException("unitOfWork");
            }

            if (postService == null)
            {
                throw new ArgumentNullException("postService");
            }

            if (voteFactory == null)
            {
                throw new ArgumentNullException("voteFactory");
            }

            this.voteRepository = voteRepository;
            this.unitOfWork     = unitOfWork;
            this.postService    = postService;
            this.voteFactory    = voteFactory;
        }
Ejemplo n.º 3
0
 public VoteService(IEventBus bus, IVoteFactory factory, IVoteRepo repo)
 {
     this.bus     = bus;
     this.factory = factory;
     this.repo    = repo;
 }
Ejemplo n.º 4
0
 public VoteRepo(IDatabase database, IVoteFactory factory) : base(database)
 {
     this.factory = factory;
 }