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;
        }
Example #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;
 }
 public VoteController()
 {
     _votingService = new VotingService();
     _eventManagementService = new EventManagementService();
     _eventDetailsService = new EventDetailsService();
     _placeService = new PlaceService();
 }
Example #6
0
 public VoteController()
 {
     _votingService          = new VotingService();
     _eventManagementService = new EventManagementService();
     _eventDetailsService    = new EventDetailsService();
     _placeService           = new PlaceService();
 }
Example #7
0
 public RateController(IOrchardServices orchardServices, IContentManager contentManager, IVotingService votingService,
     IRepository<ReviewRecord> reviewRecordRepository) {
     _orchardServices = orchardServices;
     _reviewRecordRepository = reviewRecordRepository;
     _contentManager = contentManager;
     _votingService = votingService;
 }
Example #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();
 }
Example #10
0
        public ReviewController(IOrchardServices orchardServices, IVotingService votingService, IRepository<ReviewRecord> reviewRepository, IClock clock) {
            _orchardServices = orchardServices;
            _votingService = votingService;
            _reviewRepository = reviewRepository;
            _clock = clock;

            T = NullLocalizer.Instance;
        }
Example #11
0
 public RateController(IOrchardServices orchardServices, IContentManager contentManager, IVotingService votingService,
                       IRepository <ReviewRecord> reviewRecordRepository)
 {
     _orchardServices        = orchardServices;
     _reviewRecordRepository = reviewRecordRepository;
     _contentManager         = contentManager;
     _votingService          = votingService;
 }
 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;
        }
 public CompanyReportService(
     EndowmentHandlers handlers, 
     EndowmentRepositories repositories,
     IVotingService votingService)
 {
     _handlers = handlers;
     _repositories = repositories;
     _votingService = votingService;
 }
Example #15
0
 public CardViewComponent(
     IVotingService votingService,
     UserManager <ApplicationUser> userManager,
     IConnectionManager connectionManager
     )
 {
     _votingService     = votingService;
     _userManager       = userManager;
     _connectionManager = connectionManager;
 }
Example #16
0
 public VoteController(IOrchardServices orchardServices, 
     IContentManager contentManager, 
     IVotingService votingService,
     IHttpContextAccessor httpContextAccessor) {
     _orchardServices = orchardServices;
     _contentManager = contentManager;
     _votingService = votingService;
     _httpContextAccessor = httpContextAccessor;
     T = NullLocalizer.Instance;
 }
Example #17
0
 public VoteController(IOrchardServices orchardServices,
                       IContentManager contentManager,
                       IVotingService votingService,
                       IHttpContextAccessor httpContextAccessor)
 {
     _orchardServices     = orchardServices;
     _contentManager      = contentManager;
     _votingService       = votingService;
     _httpContextAccessor = httpContextAccessor;
     T = NullLocalizer.Instance;
 }
 public AccountController(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     VoteDbContext context,
     IVotingService votingService
     )
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _context       = context;
     _votingService = votingService;
 }
Example #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);
            });

        }
 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;
 }
Example #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;
        }
Example #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;
        }
Example #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;
 }
Example #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
                });
            }
        }
Example #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;
 }
Example #28
0
 public VotingController(IVotingService votingService, IWebSocketPublisher wsPublisher, IOptions <VotingOptions> options)
 {
     _votingService = votingService;
     _wsPublisher   = wsPublisher;
     _votingStep    = options?.Value?.VotingStep ?? 1;
 }
Example #29
0
 public VotingController(IServiceLocator serviceLocator)
 {
     _votingService = serviceLocator.Get<IVotingService>();
     _contentTypeRepository = serviceLocator.Get<IContentTypesRepository>();
 }
Example #30
0
 public PollController(IVotingService votingservice)
 {
     _votingService = votingservice;
 }
Example #31
0
 public VotingController(ILogger <VotingController> logger, IVotingService votingService)
 {
     _logger        = logger;
     _votingService = votingService;
 }
Example #32
0
 public FavoritePartDriver(IAuthenticationService authenticationService, IVotingService votingService)
 {
     _authenticationService = authenticationService;
     _votingService         = votingService;
 }
Example #33
0
 public VoteHandler(IVotingService service)
 {
     votingService = service;
 }
Example #34
0
 public UpVoteCommandHandler(IVotingService votingService)
 {
     _votingService = votingService;
 }
Example #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;
 }
 public OwinCommunicationListener(StatefulServiceContext serviceContext, IVotingService svc, ServiceEventSource eventSource, string endpointName)
     : this(serviceContext, svc, eventSource, endpointName, null)
 {
 }
Example #39
0
 public ApiVotingController(IVotingService service)
 {
     _service = service;
 }
 public StackOverflowPopularityService(IPostService postService,
                                       IVotingService votingService)
 {
     _postService = postService;
     _votingService = votingService;
 }
Example #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;
 }
Example #42
0
 public LoginModel(IVotingService votingService)
 {
     _votingService = votingService;
 }
 public InternalVotingService(IVotingService votingService,
     IHttpContextAccessor httpContextAccessor) {
     _votingService = votingService;
     _httpContextAccessor = httpContextAccessor;
 }