Esempio n. 1
0
 public VoteController(INewsRepository newsRepository, IVoteRepository voteRepository, IApiInputValidationChecks inputValidation, IApiBusinessLogicValidationChecks businessValidation)
 {
     this.newsRepository     = newsRepository;
     this.voteRepository     = voteRepository;
     this.inputValidation    = inputValidation;
     this.businessValidation = businessValidation;
 }
 public VoteManager(ICandidateRepository candidateRepository, IVoterRepository voterRepository, ICategoryRepository categoryRepository, IVoteRepository repository) : base(repository)
 {
     CandidateRepository = candidateRepository;
     CategoryRepository  = categoryRepository;
     VoterRepository     = voterRepository;
     VoteRepository      = repository;
 }
 public BaseApiController(IUserRepository userRepository, IPostRepository postRepository, IVoteRepository voteRepository, ICategoryRepository categoryRepository)
 {
     _UserRepository     = userRepository;
     _PostRepository     = postRepository;
     _VoteRepository     = voteRepository;
     _CategoryRepository = categoryRepository;
 }
Esempio n. 4
0
 public VotesController(
     IVoteRepository voteRepo,
     ILogger <VotesController> logger)
 {
     _voteRepo = voteRepo;
     _logger   = logger;
 }
Esempio n. 5
0
        public VotesController(IPollRepository PollRepository, IUserIdentityService UserIdentityService,
            IUserRepository UserRepository, IVoteRepository VoteRepository, ICategoryRepository CategoryRepository)
        {
            if (PollRepository == null)
            {
                throw new ArgumentNullException("CategoryRepository");
            }

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

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

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

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

            this.pollRepository = PollRepository;
            this.userService = UserIdentityService;
            this.userRepository = UserRepository;
            this.voteRepository = VoteRepository;
            this.categoryRepository = CategoryRepository;
        }
Esempio n. 6
0
        public StoryService(IConfigurationSettings settings, IDomainObjectFactory factory, ICategoryRepository categoryRepository, ITagRepository tagRepository, IStoryRepository storyRepository, IMarkAsSpamRepository markAsSpamRepository, IEventAggregator eventAggregator, ISpamProtection spamProtection, ISpamPostprocessor spamPostprocessor, IContentService contentService, IHtmlSanitizer htmlSanitizer, IThumbnail thumbnail, IStoryWeightCalculator[] storyWeightCalculators, IVoteRepository voteRepository)
        {
            Check.Argument.IsNotNull(settings, "settings");
            Check.Argument.IsNotNull(factory, "factory");
            Check.Argument.IsNotNull(categoryRepository, "categoryRepository");
            Check.Argument.IsNotNull(tagRepository, "tagRepository");
            Check.Argument.IsNotNull(storyRepository, "storyRepository");
            Check.Argument.IsNotNull(markAsSpamRepository, "markAsSpamRepository");
            Check.Argument.IsNotNull(eventAggregator, "eventAggregator");
            Check.Argument.IsNotNull(spamProtection, "spamProtection");
            Check.Argument.IsNotNull(spamPostprocessor, "spamPostprocessor");
            Check.Argument.IsNotNull(contentService, "contentService");
            Check.Argument.IsNotNull(htmlSanitizer, "htmlSanitizer");
            Check.Argument.IsNotNull(thumbnail, "thumbnail");
            Check.Argument.IsNotEmpty(storyWeightCalculators, "storyWeightCalculators");
            Check.Argument.IsNotNull(voteRepository, "voteRepository");

            _settings               = settings;
            _factory                = factory;
            _categoryRepository     = categoryRepository;
            _tagRepository          = tagRepository;
            _storyRepository        = storyRepository;
            _markAsSpamRepository   = markAsSpamRepository;
            _eventAggregator        = eventAggregator;
            _spamProtection         = spamProtection;
            _spamPostprocessor      = spamPostprocessor;
            _contentService         = contentService;
            _htmlSanitizer          = htmlSanitizer;
            _thumbnail              = thumbnail;
            _storyWeightCalculators = storyWeightCalculators;
            _voteRepository         = voteRepository;
        }
 public RequestService(IUnitOfWork unitOfWork, IRequestRepository requestRepository,
                       IProfileRepository profileRepository, IStudentRepository studentRepository,
                       IPersonRepository personRepository, IMemberMasterRepository memberMasterRepository,
                       ISignerRepository signerRepository, ICartableRepository cartableRepository,
                       IPostPersonRepository postPersonRepository, IArchiveRepository archiveRepository,
                       IUserPostRepository userPostRepository, ICommissionRepository commissionRepository,
                       ICouncilRepository councilRepository, IAttachmentRepository attachmentRepository,
                       IVoteRepository voteRepository, ICommissionSpecialEducationRepository commissionSpecialEducationRepository)
 {
     _unitOfWork             = unitOfWork;
     _requestRepository      = requestRepository;
     _profileRepository      = profileRepository;
     _studentRepository      = studentRepository;
     _personRepository       = personRepository;
     _memberMasterRepository = memberMasterRepository;
     _signerRepository       = signerRepository;
     _cartableRepository     = cartableRepository;
     _postPersonRepository   = postPersonRepository;
     _archiveRepository      = archiveRepository;
     _userPostRepository     = userPostRepository;
     _commissionRepository   = commissionRepository;
     _councilRepository      = councilRepository;
     _attachmentRepository   = attachmentRepository;
     _voteRepository         = voteRepository;
     _commissionSpecialEducationRepository = commissionSpecialEducationRepository;
 }
Esempio n. 8
0
 public PoolService(IPoolRepository poolRepository, IVoteRepository voteRepository, IRestaurantService restaurantAppService, IUserService userAppService)
 {
     this.poolRepository       = poolRepository;
     this.voteRepository       = voteRepository;
     this.restaurantAppService = restaurantAppService;
     this.userAppService       = userAppService;
 }
Esempio n. 9
0
 public VoteService(IVoteRepository voteRepository, IUserRepository userRepository, IRateChoiceRepository rateChoiceRepository, IUploadRepository uploadRepository)
 {
     VoteRepository       = voteRepository;
     UserRepository       = userRepository;
     RateChoiceRepository = rateChoiceRepository;
     _uploadRepository    = uploadRepository;
 }
 public CartableService(IUnitOfWork unitOfWork, IPostPersonRepository postPersonRepository,
                        IFieldofStudyRepository fieldofStudyRepository, ICartableRepository cartableRepository,
                        RequestRepository requestRepository, IVoteRepository voteRepository,
                        ISignerRepository signerRepository, ISettingsRepository settingsRepository,
                        IPersonelRepository personelRepository, ICommissionRepository commissionRepository,
                        ICouncilRepository councilRepository, IRequestService requestService,
                        IUserPostRepository userPostRepository, IPostRepository postRepository,
                        ICommissionService commissionService, ICouncilService councilService)
 {
     _unitOfWork             = unitOfWork;
     _postPersonRepository   = postPersonRepository;
     _fieldofStudyRepository = fieldofStudyRepository;
     _cartableRepository     = cartableRepository;
     _requestRepository      = requestRepository;
     _signerRepository       = signerRepository;
     _voteRepository         = voteRepository;
     _settingsRepository     = settingsRepository;
     _personelRepository     = personelRepository;
     _commissionRepository   = commissionRepository;
     _councilRepository      = councilRepository;
     _requestService         = requestService;
     _userPostRepository     = userPostRepository;
     _postRepository         = postRepository;
     _commissionService      = commissionService;
     _councilService         = councilService;
 }
Esempio n. 11
0
        public UpdateTests(TestHost testHost)
        {
            _generateUpdateStreamService = testHost.GetService <GenerateUpdateStreamService>();
            _testOptions = testHost.GetService <IOptions <TestOptions> >().Value;

            _spotifyClientFactory   = testHost.GetService <ISpotifyClientFactory>();
            _spotifyClientService   = testHost.GetService <ISpotifyClientService>();
            _trackRepository        = testHost.GetService <ITrackRepository>();
            _playlistRepository     = testHost.GetService <IPlaylistRepository>();
            _chatRepository         = testHost.GetService <IChatRepository>();
            _chatMemberRepository   = testHost.GetService <IChatMemberRepository>();
            _userRepository         = testHost.GetService <IUserRepository>();
            _voteRepository         = testHost.GetService <IVoteRepository>();
            _voteTextHelper         = testHost.GetService <IVoteTextHelper>();
            _loginRequestRepository = testHost.GetService <ILoginRequestRepository>();
            _sendMessageService     = testHost.GetService <ISendMessageService>();
            _spotifyLinkHelper      = testHost.GetService <ISpotifyLinkHelper>();

            var handleMessageService       = testHost.GetService <IHandleMessageService>();
            var handleCallbackQueryService = testHost.GetService <IHandleCallbackQueryService>();
            var handleInlineQueryService   = testHost.GetService <IHandleInlineQueryService>();
            var commandsService            = testHost.GetService <ICommandsService>();
            var updateDtoService           = testHost.GetService <IUpdateDtoService>();
            var sentryOptions = testHost.GetService <IOptions <SentryOptions> >();

            _sut = new Update(handleMessageService, handleCallbackQueryService, handleInlineQueryService, commandsService, updateDtoService, sentryOptions);
        }
Esempio n. 12
0
 public VoteController(IVoteRepository _voteRepository, IUserRepository _userRepository, IMediaRepository _mediaRepository, IConfiguration _config)
 {
     voteRepository  = _voteRepository;
     userRepository  = _userRepository;
     mediaRepository = _mediaRepository;
     config          = _config;
 }
 public RegistrationUserService(IContextRegistration contextRegistration, IVoteRepository voteRepository, IRegionRepository regionRepository, IUserRepository userRepository)
 {
     _voteRepos           = voteRepository;
     _regionRepos         = regionRepository;
     _userRepos           = userRepository;
     _contextRegistration = contextRegistration;
 }
Esempio n. 14
0
 public CatService(ILogger <CatService> logger, IMapper mapper, ICatPictureRepository catPictureRepository, IVoteRepository voteRepository)
 {
     _logger = logger;
     _mapper = mapper;
     _catPictureRepository = catPictureRepository;
     _voteRepository       = voteRepository;
 }
Esempio n. 15
0
 public VoteService(
     ICandidateRepository candidateRepository,
     IVoteRepository voteRepository)
 {
     _candidateRepository = candidateRepository;
     _voteRepository      = voteRepository;
 }
Esempio n. 16
0
 public ReviewsController(IBizInfoRepository bizInfoRepo, IVoteRepository VoteRepo)
 {
     ViewBag.TitleSortParam  = "BizTitle";
     ViewBag.NewestSortParam = "AddedDate desc";
     ViewBag.SortParam       = "BizTitle";
     BizInfoRepository       = bizInfoRepo;
     VoteRepository          = VoteRepo;
 }
Esempio n. 17
0
 public HomeController(IPartyRepository partyRepository, IModuleRepository moduleRepository,
                       IResultRepository resultRepository, IVoteRepository voteRepository)
 {
     _partyRepository  = partyRepository;
     _moduleRepository = moduleRepository;
     _resultRepository = resultRepository;
     _voteRepository   = voteRepository;
 }
Esempio n. 18
0
 public UnitOfWork()
 {
     _context     = new GalleryContext();
     Albums       = new AlbumRepository(_context);
     Photos       = new PhotoRepository(_context);
     UserProfiles = new UserProfileRepository(_context);
     Votes        = new VoteRepository(_context);
 }
 public QuestionsController(IRepositoryFactory repositoryFactory )
 {
     questionRepository = repositoryFactory.GetQuestionRepository();
     userRepository = repositoryFactory.GetUserRepository();
     tagRepository = repositoryFactory.GetTagRepository();
     answerRepository = repositoryFactory.GetAnswerRepository();
     voteRepository = repositoryFactory.GetVoteRepository();
 }
 public QuestionsController()
 {
     questionRepository = new QuestionRepository();
     userRepository = new UserRepository();
     tagRepository = new TagRepository();
     answerRepository = new AnswerRepository();
     voteRepository = new VoteRepository();
 }
Esempio n. 21
0
 public CountdownController(ICountdownRepository countdownRepository, IVoteRepository voteRepository, IContextService contextService, ISystemClock systemClock, INotificationService notificationService)
 {
     _countdownRepository = countdownRepository;
     _voteRepository      = voteRepository;
     _contextService      = contextService;
     _systemClock         = systemClock;
     _notificationService = notificationService;
 }
Esempio n. 22
0
 public HintController(IHintRepository _hintRepository, IUserRepository _userRepository, IMediaRepository _mediaRepository, IVoteRepository _voteRepository, IConfiguration _config)
 {
     hintRepository  = _hintRepository;
     userRepository  = _userRepository;
     mediaRepository = _mediaRepository;
     voteRepository  = _voteRepository;
     config          = _config;
 }
Esempio n. 23
0
 public PollRendererController(IPollRepository pollRepository, IPollOptionRepository pollOptionRepository,
                               IVoteRepository voteRepository, IRequestHeaderHandler requestHeaderHandler)
 {
     _pollRepository       = pollRepository;
     _pollOptionRepository = pollOptionRepository;
     _voteRepository       = voteRepository;
     _requestHeaderHandler = requestHeaderHandler;
 }
Esempio n. 24
0
 public CountingServices(IElectionRepository electionServices,
                         IVoteRepository voteRepository,
                         IPartyServices partyServices)
 {
     _electionServices = electionServices;
     _voteRepository   = voteRepository;
     _partyServices    = partyServices;
 }
Esempio n. 25
0
 public AddVoteHandlerTest()
 {
     _unitOfWorkManager   = Substitute.For <IUnitOfWorkManager>();
     _tasksRepository     = Substitute.For <ITaskRepository>();
     _employeeRepository  = Substitute.For <IEmployeeRepository>();
     _voteRepository      = Substitute.For <IVoteRepository>();
     _notificationHandler = ServiceProvider.GetRequiredService <INotificationHandler>();
 }
Esempio n. 26
0
 public VoteService(IVoteRepository voteRepository,
                    INotificationDispatcher notificationDispatcher,
                    IAccountRepository accountRepository,
                    ICountdownRepository countdownRepository) {
     _voteRepository = voteRepository;
     _notificationDispatcher = notificationDispatcher;
     _accountRepository = accountRepository;
     _countdownRepository = countdownRepository;
 }
Esempio n. 27
0
 public CommentService(IAsyncRepository <Comment> commentRepository, IVoteRepository voteRepository,
                       IAsyncRepository <Post> postRepository, UserManager <User> userManager, IMapper mapper)
 {
     _commentRepository = commentRepository;
     _voteRepository    = voteRepository;
     _postRepository    = postRepository;
     _userManager       = userManager;
     _mapper            = mapper;
 }
Esempio n. 28
0
        public UserScoreService(IConfigurationSettings settings, IUserScoreTable userScoreTable, IEventAggregator eventAggregator, IVoteRepository voteRepository) : base(eventAggregator)
        {
            Check.Argument.IsNotNull(settings, "settings");
            Check.Argument.IsNotNull(userScoreTable, "userScoreTable");

            _settings       = settings;
            _userScoreTable = userScoreTable;
            _voteRepository = voteRepository;
        }
Esempio n. 29
0
        public StatsViewModel(IEventAggregator eventAggregator, IMessageDialogService messageDialogService, IVoteRepository voteRepository, IWebContext webContext)
            : base(eventAggregator, messageDialogService)
        {
            this._voteRepository = voteRepository;
            this._webContext     = webContext;
            Title = "Stats";

            CandidatesVotes = new ObservableCollection <object>();
        }
Esempio n. 30
0
 public VotesController(
     IVoteRepository voteRepository,
     IEventRepository eventRepository,
     IUserHelper userHelper)
 {
     this.voteRepository  = voteRepository;
     this.eventRepository = eventRepository;
     this.userHelper      = userHelper;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="VoteAppService"/> class.
 ///     Construtor padrão de <see cref="VoteAppService"/>.
 /// </summary>
 /// <param name="uow">
 ///     Contrato do Unit of Work. Veja <see cref="IUnitOfWork"/>.
 /// </param>
 /// <param name="mapper">
 ///     Contrato do AutoMapper. Veja <see cref="IMapper"/>.
 /// </param>
 /// <param name="repository">
 ///     O repositório da entidade Vote. Veja <see cref="IVoteRepository"/>.
 /// </param>
 public VoteAppService(
     IUnitOfWork uow,
     IMapper mapper,
     IVoteRepository repository,
     ITouristSpotRepository touristSpotRepository)
     : base(uow, mapper, repository)
 {
     this.touristSpotRepository = touristSpotRepository;
 }
Esempio n. 32
0
 public PostVoteController(
     IPostRepository postRepository,
     IUserRepository userRepository,
     IVoteRepository voteRepository)
 {
     _userRepository = userRepository;
     _postRepository = postRepository;
     _voteRepository = voteRepository;
 }
Esempio n. 33
0
 public VoteLogic(IVoteRepository voteRepository, IRestaurantRepository restaurantRepository, IUserRepository userRepository)
 {
     if (voteRepository == null) throw new ArgumentNullException("voteRepository");
     if (restaurantRepository == null) throw new ArgumentNullException("restaurantRepository");
     if (userRepository == null) throw new ArgumentNullException("userRepository");
     _voteRepository = voteRepository;
     _restaurantRepository = restaurantRepository;
     _userRepository = userRepository;
 }
Esempio n. 34
0
 public CartController(ICharacterRepository rep, ICartProvider cartProvider,
                       IWeekProvider weekProvider, IVoteRepository voteRepository, IUserProvider userProvider)
 {
     repository          = rep;
     this.cartProvider   = cartProvider;
     this.weekProvider   = weekProvider;
     this.voteRepository = voteRepository;
     this.userProvider   = userProvider;
 }
Esempio n. 35
0
 public HomeController(
     UserManager <User> userManager, IToastNotification toastNotification, ILinkRepository linkRepository,
     IVoteRepository voteRepository)
 {
     _userManager       = userManager;
     _toastNotification = toastNotification;
     _linkRepository    = linkRepository;
     _voteRepository    = voteRepository;
 }
Esempio n. 36
0
 public VoteController(IVoteRepository VoteRepository,
     IVoteUserRepository VoteUserRepository,
     IResponseImageTextRepository ResponseImageTextRepository,
     IUserProfileRepository UserProfileRepository)
 {
     this.ResponseImageTextRepository = ResponseImageTextRepository;
     this.UserProfileRepository = UserProfileRepository;
     this.VoteUserRepository = VoteUserRepository;
     this.VoteRepository = VoteRepository;
 }
        public void BeforeEachTest()
        {
            _voteRepository = Substitute.For<IVoteRepository>();
            _voteRepository.HasVotedFor(Arg.Any<int>(), Arg.Any<Guid>()).Returns(true);

            _conferenceLoader = Substitute.For<IConferenceLoader>();
            var conference = new Conference(1, "", "");
            _conferenceLoader.LoadConference(Arg.Is(SessionId)).Returns(conference);

            _handler = new DeleteVoteCommandHandler(_voteRepository, _conferenceLoader);
        }
        public void BeforeEachTest()
        {
            _voteRepository = Substitute.For<IVoteRepository>();
            _voteRepository.HasVotedFor(Arg.Any<int>(), Arg.Any<Guid>()).Returns(false);

            _conferenceLoader = Substitute.For<IConferenceLoader>();
            var conference = new Conference(1, "", "");
            //            conference.AddToCalendar(ConferenceHelper.GetOpenVotingPeriod());
            _conferenceLoader.LoadConference(Arg.Is(1)).Returns(conference);

            _handler = new DeleteVoteCommandHandler(_voteRepository, _conferenceLoader);
        }
Esempio n. 39
0
 public TestableVoteService(
     IVoteRepository voteRepository,
     Mock<INotificationDispatcher> mockNotificationDispatcher,
     Mock<IAccountRepository> mockAccountRepository,
     Mock<ICountdownRepository> mockCountdownRepository)
     : base(voteRepository,
            mockNotificationDispatcher.Object,
            mockAccountRepository.Object,
            mockCountdownRepository.Object) {
     FakeVoteRepository = voteRepository;
     MockNotificationDispatcher = mockNotificationDispatcher;
     MockAccountRepository = mockAccountRepository;
     MockCountdownRepository = mockCountdownRepository;
 }
        public SessionController(ISessionRepository sessionRepository, IVoteRepository voteRepository)
        {
            if (sessionRepository == null)
            {
                throw new ArgumentNullException("sessionRepository");
            }

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

            this.sessionRepository = sessionRepository;
            this.voteRepository = voteRepository;
        }
Esempio n. 41
0
 public VoteAPI(IVoteRepository voteRepository, IMembershipRepository membershipRepository)
 {
     _voteRepository = voteRepository;
     _membershipRepository = membershipRepository;
 }
Esempio n. 42
0
 public VoteService(IVoteRepository voteRepository, IMVCForumAPI api)
 {
     _voteRepository = voteRepository;
     _api = api;
 }
Esempio n. 43
0
 public VoteService(IVoteRepository voteRepository, IMembershipUserPointsService membershipUserPointsService)
 {
     _voteRepository = voteRepository;
     _membershipUserPointsService = membershipUserPointsService;
 }
Esempio n. 44
0
 public VoteService(IVoteRepository voteRepository)
 {
     _voteRepository = voteRepository;
 }
Esempio n. 45
0
 public VoteService(IPositionRepository positionRepository, ICandidateRepository candidateRepository, IVoteRepository voteRepository)
 {
     this.positionRepository = positionRepository;
     this.candidateRepository = candidateRepository;
     this.voteRepository = voteRepository;
 }
Esempio n. 46
0
 public PollController()
 {
     pollRepository = new PollRepository(new PollContext());
     voteRepository = new VoteRepository(pollRepository.Context());
     userRepository = new UserRepository(new UserContext());
 }
Esempio n. 47
0
 private readonly int voteValue = 1; // maybe give access to this in an options class that can be passed in via the constructor
 public VoteProvider(IVoteRepository voteRepo, ISnippetRepository snippetRepo)
 {
     _voteRepository = voteRepo;
     _snippetRepository = snippetRepo;
 }
 public SessionVoteModelQuery(IVoteRepository voteRepository, IConferenceLoader conferenceLoader)
 {
     this.voteRepository = voteRepository;
     this.conferenceLoader = conferenceLoader;
 }