public OwinCommunicationListener(StatefulServiceContext serviceContext,
                                         IVotingService svc, ServiceEventSource eventSource, string endpointName, string appRoot)
        {
            if (serviceContext == null)
            {
                throw new ArgumentNullException(nameof(serviceContext));
            }
            if (endpointName == null)
            {
                throw new ArgumentNullException(nameof(endpointName));
            }
            if (eventSource == null)
            {
                throw new ArgumentNullException(nameof(eventSource));
            }
            if (null == svc)
            {
                throw new ArgumentNullException(nameof(svc));
            }

            this.serviceInstance = svc;
            this.serviceContext  = serviceContext;
            this.endpointName    = endpointName;
            this.eventSource     = eventSource;
            this.appRoot         = appRoot;
        }
Пример #2
0
 public HomeController(ILog logger, ICompaniesService companiesService, IVotingService votingService, IUserService userService)
 {
     _logger         = logger;
     _votingService  = votingService;
     _companyService = companiesService;
     _userService    = userService;
 }
 public TransactionService_should()
 {
     _repositories = CommonHelper.GetService<EndowmentRepositories>();
     _handlers = CommonHelper.GetService<EndowmentHandlers>();
     _transactionService = CommonHelper.GetService<ITransactionService>();
     _votingService = CommonHelper.GetService<IVotingService>();
 }
 public PhotoController(ICategoryPhotoService service, IPhotoService phService, IUserService usrService, IVotingService voteService)
 {
     categoryService = service;
     photoService    = phService;
     userService     = usrService;
     votingService   = voteService;
 }
Пример #5
0
 public VoteController()
 {
     _votingService = new VotingService();
     _eventManagementService = new EventManagementService();
     _eventDetailsService = new EventDetailsService();
     _placeService = new PlaceService();
 }
Пример #6
0
 public VoteController()
 {
     _votingService          = new VotingService();
     _eventManagementService = new EventManagementService();
     _eventDetailsService    = new EventDetailsService();
     _placeService           = new PlaceService();
 }
Пример #7
0
 public RateController(IOrchardServices orchardServices, IContentManager contentManager, IVotingService votingService,
     IRepository<ReviewRecord> reviewRecordRepository) {
     _orchardServices = orchardServices;
     _reviewRecordRepository = reviewRecordRepository;
     _contentManager = contentManager;
     _votingService = votingService;
 }
Пример #8
0
 public RateController(IOrchardServices orchardServices, IContentManager contentManager, IVotingService votingService)
 {
     _orchardServices = orchardServices;
     _contentManager = contentManager;
     _votingService = votingService;
     T = NullLocalizer.Instance;
 }
 public PresidentLoginWindow(IElectionConfigurationService electionConfigurationService, IVotingService votingService)
 {
     _electionConfigurationService = electionConfigurationService;
     _votingService = votingService;
     InitializeComponent();
     BtnLogin.Click += BtnLogin_Click;
     //Username.Focus();
 }
Пример #10
0
        public ReviewController(IOrchardServices orchardServices, IVotingService votingService, IRepository<ReviewRecord> reviewRepository, IClock clock) {
            _orchardServices = orchardServices;
            _votingService = votingService;
            _reviewRepository = reviewRepository;
            _clock = clock;

            T = NullLocalizer.Instance;
        }
Пример #11
0
 public RateController(IOrchardServices orchardServices, IContentManager contentManager, IVotingService votingService,
                       IRepository <ReviewRecord> reviewRecordRepository)
 {
     _orchardServices        = orchardServices;
     _reviewRecordRepository = reviewRecordRepository;
     _contentManager         = contentManager;
     _votingService          = votingService;
 }
Пример #12
0
 public ThreadService(IContentManager contentManager, 
     IPostService postService,
     IVotingService votingService)
 {
     _contentManager = contentManager;
     _postService = postService;
     _votingService = votingService;
 }
        public ReviewController(IOrchardServices orchardServices, IVotingService votingService, IRepository <ReviewRecord> reviewRepository, IClock clock)
        {
            _orchardServices  = orchardServices;
            _votingService    = votingService;
            _reviewRepository = reviewRepository;
            _clock            = clock;

            T = NullLocalizer.Instance;
        }
Пример #14
0
 public CompanyReportService(
     EndowmentHandlers handlers, 
     EndowmentRepositories repositories,
     IVotingService votingService)
 {
     _handlers = handlers;
     _repositories = repositories;
     _votingService = votingService;
 }
Пример #15
0
 public CardViewComponent(
     IVotingService votingService,
     UserManager <ApplicationUser> userManager,
     IConnectionManager connectionManager
     )
 {
     _votingService     = votingService;
     _userManager       = userManager;
     _connectionManager = connectionManager;
 }
Пример #16
0
 public VoteController(IOrchardServices orchardServices, 
     IContentManager contentManager, 
     IVotingService votingService,
     IHttpContextAccessor httpContextAccessor) {
     _orchardServices = orchardServices;
     _contentManager = contentManager;
     _votingService = votingService;
     _httpContextAccessor = httpContextAccessor;
     T = NullLocalizer.Instance;
 }
Пример #17
0
 public VoteController(IOrchardServices orchardServices,
                       IContentManager contentManager,
                       IVotingService votingService,
                       IHttpContextAccessor httpContextAccessor)
 {
     _orchardServices     = orchardServices;
     _contentManager      = contentManager;
     _votingService       = votingService;
     _httpContextAccessor = httpContextAccessor;
     T = NullLocalizer.Instance;
 }
Пример #18
0
 public AccountController(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     VoteDbContext context,
     IVotingService votingService
     )
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _context       = context;
     _votingService = votingService;
 }
Пример #19
0
        public OptionService(
            IMapper mapper,
            IOptionRepository optionRepository,
            IVotingHubClient votingHubClient,
            IVotingService votingService)
        {
            DependencyHelper.ThrowIfNull(mapper, optionRepository, votingHubClient, votingService);

            _mapper           = mapper;
            _optionRepository = optionRepository;
            _votingHub        = votingHubClient;
            _votingService    = votingService;
        }
        public UserViewPartHandler(IVotingService votingService,
            IOrchardServices orchardServices) {
            _votingService = votingService;
            _orchardServices = orchardServices;

            OnGetDisplayShape<UserViewPart>((context, part) => {
                var settings = part.Settings.GetModel<UserViewTypePartSettings>();
                if (!context.DisplayType.Equals(settings.DisplayType, StringComparison.InvariantCultureIgnoreCase))
                    return;

                RecordView(part, settings);
            });

        }
Пример #21
0
 public AdminAddVotersPage()
 {
     _container = new BootStrapper().BootStrap();
     _electionConfigurationService = _container.Resolve <IElectionConfigurationService>();
     _votingService = _container.Resolve <IVotingService>();
     InitializeComponent();
     _dataSet                      = new DataSet();
     voters                        = new List <Voter>();
     BtnSearch.Click              += BtnSearch_Click;
     BtnImportFile.Click          += BtnImportFile_Click;
     BtnSave.Click                += BtnSave_Click;
     TextBoxIndexNumber.LostFocus += TextBoxIndexNumber_LostFocus;
     Loaded                       += AdminAddVotersPage_Loaded;
 }
Пример #22
0
        public VoteController(IVotingService voteService, IAuthenticationProvider authenticationProvider)
        {
            if (voteService == null)
            {
                throw new ArgumentNullException(nameof(voteService));
            }

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

            this.voteService            = voteService;
            this.authenticationProvider = authenticationProvider;
        }
Пример #23
0
        public UserViewPartHandler(IVotingService votingService,
                                   IOrchardServices orchardServices)
        {
            _votingService   = votingService;
            _orchardServices = orchardServices;

            OnGetDisplayShape <UserViewPart>((context, part) => {
                var settings = part.Settings.GetModel <UserViewTypePartSettings>();
                if (!context.DisplayType.Equals(settings.DisplayType, StringComparison.InvariantCultureIgnoreCase))
                {
                    return;
                }

                RecordView(part, settings);
            });
        }
        public ReviewController(IOrchardServices orchardServices,
                                IVotingService votingService,
                                IRepository <ReviewRecord> reviewRepository,
                                IClock clock,
                                ICacheService cacheService,
                                IContentManager contentManager)
        {
            _orchardServices  = orchardServices;
            _votingService    = votingService;
            _reviewRepository = reviewRepository;
            _clock            = clock;
            _cacheService     = cacheService;
            _contentManager   = contentManager;

            T = NullLocalizer.Instance;
        }
Пример #25
0
 public MainWindow(Stack <Position> positionsStack, Voter voter, IVotingService votingService)
 {
     InitializeComponent();
     IgnoreTaskbarOnMaximize = true;
     _positionsStack         = positionsStack;
     _voter                            = voter;
     _votingService                    = votingService;
     _skippedVotes                     = new ConcurrentBag <SkippedVote>();
     _votes                            = new ConcurrentBag <Vote>();
     Loaded                           += MainWindow_Loaded;
     PageHolder.Navigated             += PageHolder_Navigated;
     CandidateControl.VoteCast        += CandidateControl_VoteCast;
     YesOrNoCandidateControl.VoteCast += YesOrNoCandidateControl_VoteCast;
     YesOrNoCandidateControl.VoteNo   += YesOrNoCandidateControl_VoteNo;
     Loaded                           += MainWindow_Loaded1;
     currentDomain.UnhandledException += CurrentDomain_UnhandledException;
 }
Пример #26
0
        public ConstituencyModel(IVotingService votingservice, ISession session)
        {
            _candidateResults = new List <CandidateResults>();
            _votingService    = votingservice;
            _session          = session;

            var candidates = votingservice.GetConstituencyCandidates(_session.ConstituencyId);

            foreach (var candidate in candidates)
            {
                ((List <CandidateResults>)_candidateResults).Add(new CandidateResults()
                {
                    CandidateId   = candidate.Id,
                    Name          = candidate.DisplayName,
                    NumberOfVotes = 0
                });
            }
        }
Пример #27
0
 public VoteController(
     IPollService pollService,
     IOrchardServices orchardServices,
     IVotingService votingService,
     ISongService songService,
     IOrchardServices services,
     IShapeFactory shapeFactory,
     IArtistUserService artistService)
 {
     _pollService     = pollService;
     _orchardServices = orchardServices;
     _votingService   = votingService;
     _songService     = songService;
     Services         = services;
     T              = NullLocalizer.Instance;
     Shape          = shapeFactory;
     _artistService = artistService;
 }
Пример #28
0
 public VotingController(IVotingService votingService, IWebSocketPublisher wsPublisher, IOptions <VotingOptions> options)
 {
     _votingService = votingService;
     _wsPublisher   = wsPublisher;
     _votingStep    = options?.Value?.VotingStep ?? 1;
 }
Пример #29
0
 public VotingController(IServiceLocator serviceLocator)
 {
     _votingService = serviceLocator.Get<IVotingService>();
     _contentTypeRepository = serviceLocator.Get<IContentTypesRepository>();
 }
Пример #30
0
 public PollController(IVotingService votingservice)
 {
     _votingService = votingservice;
 }
Пример #31
0
 public VotingController(ILogger <VotingController> logger, IVotingService votingService)
 {
     _logger        = logger;
     _votingService = votingService;
 }
Пример #32
0
 public FavoritePartDriver(IAuthenticationService authenticationService, IVotingService votingService)
 {
     _authenticationService = authenticationService;
     _votingService         = votingService;
 }
Пример #33
0
 public VoteHandler(IVotingService service)
 {
     votingService = service;
 }
Пример #34
0
 public UpVoteCommandHandler(IVotingService votingService)
 {
     _votingService = votingService;
 }
Пример #35
0
 public ResetController(IHubContext <VotingHub> context, IVotingService votingService)
 {
     this.context       = context;
     this.votingService = votingService;
 }
 public ReviewsPartDriver(IOrchardServices orchardServices, IVotingService votingService, IRepository <ReviewRecord> reviewRepository)
 {
     _orchardServices  = orchardServices;
     _votingService    = votingService;
     _reviewRepository = reviewRepository;
 }
 public VotingController(IPhotoService phService, IUserService usrService, IVotingService voteService)
 {
     photoService  = phService;
     userService   = usrService;
     votingService = voteService;
 }
Пример #38
0
 public OwinCommunicationListener(StatefulServiceContext serviceContext, IVotingService svc, ServiceEventSource eventSource, string endpointName)
     : this(serviceContext, svc, eventSource, endpointName, null)
 {
 }
Пример #39
0
 public ApiVotingController(IVotingService service)
 {
     _service = service;
 }
 public StackOverflowPopularityService(IPostService postService,
                                       IVotingService votingService)
 {
     _postService = postService;
     _votingService = votingService;
 }
Пример #41
0
 // Controller constructor taking a IVotingService instance. // This is cheap dependency injection done in the listener. // You can also use your favorite DI framework.
 public StatefulVoteController(IVotingService vs)
 {
     _service = vs;
 }
Пример #42
0
 public LoginModel(IVotingService votingService)
 {
     _votingService = votingService;
 }
Пример #43
0
 public InternalVotingService(IVotingService votingService,
     IHttpContextAccessor httpContextAccessor) {
     _votingService = votingService;
     _httpContextAccessor = httpContextAccessor;
 }