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; }
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; }
public VoteService(IEventBus bus, IVoteFactory factory, IVoteRepo repo) { this.bus = bus; this.factory = factory; this.repo = repo; }
public VoteRepo(IDatabase database, IVoteFactory factory) : base(database) { this.factory = factory; }