Exemple #1
0
 public PartyService(IPartyRepository partyRepository, ISpotifyHttpClient spotifyHttpClient, ILogService logService)
 {
     _partyRepository   = partyRepository;
     _spotifyHttpClient = spotifyHttpClient;
     _random            = new Random();
     _logService        = logService;
 }
Exemple #2
0
 public EndorsementsService(IEndorsementRepository endorsementRepository, IPartyRepository partyRepository,
                            IBillOfExchangeRepository billOfExchangeRepository)
 {
     this.endorsementRepository    = endorsementRepository;
     this.partyRepository          = partyRepository;
     this.billOfExchangeRepository = billOfExchangeRepository;
 }
 public EndorsementConverter(IEndorsementRepository endorsementRepository = null, IEndorsementChecker endorsementChecker = null, IBillOfExchangeRepository billOfExchangeRepository = null, IPartyRepository partyRepository = null)
 {
     EndorsementRepository         = endorsementRepository ?? new EndorsementRepository();
     this.EndorsementChecker       = endorsementChecker ?? new EndorsementChecker();
     this.BillOfExchangeRepository = billOfExchangeRepository ?? new BillOfExchangeRepository();
     PartyRepository = partyRepository ?? new PartyRepository();
 }
 public FakeAccountRepository(IPartyRepository partyContext)
 {
     _winningTransactions = new List <WinningTransaction>();
     _winningEntries      = new List <WinningEntry>();
     _roundsScoreEntries  = new List <RoundsScoreEntry>();
     _partyContext        = partyContext;
 }
Exemple #5
0
 public PartyService(IPartyRepository partyRepository, ISpotifyHttpClient spotifyHttpClient, ILogService logService, IPartyGoerService partyGoerService)
 {
     _partyRepository   = partyRepository;
     _spotifyHttpClient = spotifyHttpClient;
     _partyGoerService  = partyGoerService;
     _logService        = logService;
 }
 //constructor
 public PartyController()
 {
     if (partyRepository == null)
     {
         this.partyRepository = new DPartyRepository(new JohanAgroFoodDBEntities());
     }
 }
Exemple #7
0
 public StatsMenuService(IStatsRepository statsRepository, IUserRepository userRepository, ISlackWebApi slack, IPartyRepository partyRepository)
 {
     _statsRepository = statsRepository;
     _userRepository  = userRepository;
     _slack           = slack;
     _partyRepository = partyRepository;
 }
Exemple #8
0
 public PartyMenuService(ISlackWebApi slack, IPartyService partyService, IUserRepository userRepository, IPartyRepository partyRepository, IUserService userService)
 {
     _slack           = slack;
     _partyService    = partyService;
     _userRepository  = userRepository;
     _partyRepository = partyRepository;
     _userService     = userService;
 }
Exemple #9
0
 public HomeController(IPartyRepository partyRepository, IModuleRepository moduleRepository,
                       IResultRepository resultRepository, IVoteRepository voteRepository)
 {
     _partyRepository  = partyRepository;
     _moduleRepository = moduleRepository;
     _resultRepository = resultRepository;
     _voteRepository   = voteRepository;
 }
Exemple #10
0
 public PartyService(CustomerService customerService,
                     IPartyRepository partyRepository,
                     ITextMessageClient textMessageClient)
 {
     _customerService   = customerService;
     _partyRepository   = partyRepository;
     _textMessageClient = textMessageClient;
 }
Exemple #11
0
        public PenaltyRepository(IPartyRepository partyRepository, IOptions <AppCodes> appCodes)
        {
            _appCodes            = appCodes.Value;
            _partyRepository     = partyRepository;
            _entityRefreshNeeded = false;

            // calling connect ensure that the _client and _database members are set
            Connect();
        }
Exemple #12
0
        public PartyController(IPartyRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.PartyRepository = repository;
        }
Exemple #13
0
 public BillOfExchangeService(IBillOfExchangeRepositoryWithCount billOfExchangeRepository, IMapper mapper,
                              IPartyRepository partyRepository,
                              IEndorsementRepository endorsementRepository)
 {
     this.billOfExchangeRepository = billOfExchangeRepository;
     this.mapper                = mapper;
     this.partyRepository       = partyRepository;
     this.endorsementRepository = endorsementRepository;
 }
        public PartyController(IPartyRepository repository, string catalog, LoginView view)
        {
            this._LoginId = view.LoginId.ToLong();
            this._UserId = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog = catalog;

            this.PartyRepository = repository;
        }
Exemple #15
0
 public RMAMobileController(IPartyRepository partyRepository, IModuleRepository moduleRepository,
                            IResultRepository resultRepository, IVoteRepository voteRepository)
 {
     _partyRepository  = partyRepository;
     _moduleRepository = moduleRepository;
     _resultRepository = resultRepository;
     _voteRepository   = voteRepository;
     //UserManager = userManager;
     //SignInManager = signInManager;
 }
        public void SetUpPartyService()
        {
            _spotifyHttpClient = new Mock <ISpotifyHttpClient>();
            _partyRepository   = new PartyRepository();
            _logService        = new Mock <ILogService>();

            _spotifyHttpClient.Setup(p => p.RequestAccessAndRefreshTokenFromSpotifyAsync(It.IsAny <string>())).Returns(Task.FromResult(It.IsAny <string>()));

            _partyService = new PartyService(_partyRepository, _spotifyHttpClient.Object, _logService.Object);
        }
 public PresenceController(
     ISessionRepository sessionRepository,
     IPartyRepository partyRepository,
     IPartyMemberRepository partyMemberRepository,
     IUserPresenceRepository userPresenceRepository)
 {
     _sessionRepository      = sessionRepository;
     _partyRepository        = partyRepository;
     _partyMemberRepository  = partyMemberRepository;
     _userPresenceRepository = userPresenceRepository;
 }
 public PresenceController(
     ISessionRepository sessionRepository,
     IPartyRepository partyRepository,
     IPartyMemberRepository partyMemberRepository,
     IUserPresenceRepository userPresenceRepository)
 {
     _sessionRepository = sessionRepository;
     _partyRepository = partyRepository;
     _partyMemberRepository = partyMemberRepository;
     _userPresenceRepository = userPresenceRepository;
 }
Exemple #19
0
        public BowlingSystem(
            IPartyRepository partyContext,
            IAccountabilityRepository accountabilityContext,
            IAccountRepository accountContext)
        {
            _partyContext          = partyContext;
            _accountabilityContext = accountabilityContext;
            _accountContext        = accountContext;

            PrepareGameObjects();
        }
 public BillOfExchangeConverter(
     IBillOfExchangeRepository billOfExchangeRepository = null,
     IPartyRepository partyRepository             = null,
     IBillOfExchangeChecker billOfExchangeChecker = null,
     IEndorsementRepository endorsementRepository = null)
 {
     BillOfExchangeRepository = billOfExchangeRepository ?? new BillOfExchangeRepository();
     PartyRepository          = partyRepository ?? new PartyRepository();
     BillOfExchangeChecker    = billOfExchangeChecker ?? new BillOfExchangeChecker();
     EndorsementRepository    = endorsementRepository ?? new EndorsementRepository();
 }
Exemple #21
0
 public MonsterService(ISpawnedMonsterRepository spawnedMonsterRepository, ISlackWebApi slack, IUserService userService, IInventoryRepository inventoryRepository, IRandomService randomService, IMonsterRepository monsterRepository, IChannelRepository channelRepository, IPartyRepository partyRepository, IItemRepository itemRepository)
 {
     _spawnedMonsterRepository = spawnedMonsterRepository;
     _slack               = slack;
     _userService         = userService;
     _inventoryRepository = inventoryRepository;
     _randomService       = randomService;
     _monsterRepository   = monsterRepository;
     _channelRepository   = channelRepository;
     _partyRepository     = partyRepository;
     _itemRepository      = itemRepository;
 }
Exemple #22
0
        public void SetUpPartyService()
        {
            _spotifyHttpClient = new Mock <ISpotifyHttpClient>();
            _partyRepository   = new PartyRepository();
            _logService        = new Mock <ILogService>();
            _partyGoerService  = new Mock <IPartyGoerService>();

            _spotifyHttpClient.Setup(p => p.RequestAccessAndRefreshTokenFromSpotifyAsync(It.IsAny <string>())).Returns(Task.FromResult(new PartyGoerDetails {
                Id = It.IsAny <string>(), ShouldFilterExplicitSongs = It.IsAny <bool>()
            }));

            _partyService = new PartyService(_partyRepository, _spotifyHttpClient.Object, _logService.Object, _partyGoerService.Object);
        }
Exemple #23
0
 public PartyService(IPartyRepository partyRepository, IEntityService entityService, ICitizenRepository citizenRepository,
                     ICongressCandidateVotingRepository congressCandidateVotingRepository, IPartyInviteRepository partyInviteRepository,
                     IPartyJoinRequestRepository partyJoinRequestRepository, IWarningService warningService, IPopupService popupService)
 {
     this.partyRepository   = partyRepository;
     this.entityService     = entityService;
     this.citizenRepository = citizenRepository;
     this.congressCandidateVotingRepository = congressCandidateVotingRepository;
     this.partyInviteRepository             = partyInviteRepository;
     this.partyJoinRequestRepository        = partyJoinRequestRepository;
     this.warningService = Attach(warningService);
     this.popupService   = popupService;
 }
        public PartyController()
        {
            this._LoginId = AppUsers.GetCurrent().View.LoginId.ToLong();
            this._UserId = AppUsers.GetCurrent().View.UserId.ToInt();
            this._OfficeId = AppUsers.GetCurrent().View.OfficeId.ToInt();
            this._Catalog = AppUsers.GetCurrentUserDB();

            this.PartyRepository = new MixERP.Net.Schemas.Core.Data.Party
            {
                _Catalog = this._Catalog,
                _LoginId = this._LoginId,
                _UserId = this._UserId
            };
        }
Exemple #25
0
        public PartyController()
        {
            this._LoginId  = AppUsers.GetCurrent().View.LoginId.ToLong();
            this._UserId   = AppUsers.GetCurrent().View.UserId.ToInt();
            this._OfficeId = AppUsers.GetCurrent().View.OfficeId.ToInt();
            this._Catalog  = AppUsers.GetCurrentUserDB();

            this.PartyRepository = new MixERP.Net.Schemas.Core.Data.Party
            {
                _Catalog = this._Catalog,
                _LoginId = this._LoginId,
                _UserId  = this._UserId
            };
        }
 public CongressController(ICongressVotingRepository congressVotingRepository, ICongressVotingService congressVotingService, ICountryRepository countryRepository
                           , IRegionRepository regionRepository, ICongressCandidateVotingRepository congressCandidateVotingRepository,
                           ICongressCandidateService congressCandidateService, IPartyRepository partyRepository, IEntityRepository entityRepository
                           , IPopupService popupService, ICompanyRepository companyRepository) : base(popupService)
 {
     this.congressVotingRepository          = congressVotingRepository;
     this.congressVotingService             = congressVotingService;
     this.countryRepository                 = countryRepository;
     this.regionRepository                  = regionRepository;
     this.congressCandidateVotingRepository = congressCandidateVotingRepository;
     this.congressCandidateService          = congressCandidateService;
     this.partyRepository   = partyRepository;
     this.entityRepository  = entityRepository;
     this.companyRepository = companyRepository;
 }
Exemple #27
0
        public TouristInformationController(
            IAttractionRepository attractionRepository,
            IPartyRepository partyRepository,
            IShelterRepository shelterRepository,
            ITrailRepository trailRepository,
            IRegionRepository regionRepository,
            IConverter converter
            )
        {
            _attractionRepository = attractionRepository;
            _partyRepository      = partyRepository;
            _regionRepository     = regionRepository;
            _shelterRepository    = shelterRepository;
            _trailRepository      = trailRepository;

            _converter = converter;
        }
Exemple #28
0
 public MatchmakingJob(IPartyRepository partyRepository, IPartyMemberRepository partyMemberRepository, ISessionRepository sessionRepository)
 {
     if (partyRepository == null)
     {
         throw new ArgumentNullException("partyRepository");
     }
     if (partyMemberRepository == null)
     {
         throw new ArgumentNullException("partyMemberRepository");
     }
     if (sessionRepository == null)
     {
         throw new ArgumentNullException("sessionRepository");
     }
     _partyRepository       = partyRepository;
     _partyMemberRepository = partyMemberRepository;
     _sessionRepository     = sessionRepository;
 }
 public PartyController(IPartyRepository partyRepository, IPartyService partyService, ITransactionsService transactionService,
                        IUploadService uploadService, ICongressCandidateVotingRepository congressCandidateVotingRepository, IWarningService warningService,
                        ICountryRepository countryRepository, IEntityService entityService, ICongressCandidateService congressCandidateService
                        , IPopupService popupService, ICitizenRepository citizenRepository, IPartyInviteRepository partyInviteRepository,
                        IPartyJoinRequestRepository partyJoinRequestRepository) : base(popupService)
 {
     this.partyRepository    = partyRepository;
     this.partyService       = partyService;
     this.transactionService = transactionService;
     this.uploadService      = uploadService;
     this.congressCandidateVotingRepository = congressCandidateVotingRepository;
     this.warningService             = warningService;
     this.countryRepository          = countryRepository;
     this.entityService              = entityService;
     this.congressCandidateService   = congressCandidateService;
     this.citizenRepository          = citizenRepository;
     this.partyInviteRepository      = partyInviteRepository;
     this.partyJoinRequestRepository = partyJoinRequestRepository;
 }
Exemple #30
0
        public BowlingSystem(
            IPartyRepository partyContext,
            IAccountabilityRepository accountabilityContext,
            IAccountRepository accountContext,
            BowlingContext bowlingContext)
        {
            _partyContext          = partyContext;
            _accountabilityContext = accountabilityContext;
            _accountContext        = accountContext;

            PrepareGameObjects();

            _bowlingContext = bowlingContext;

            _bowlingContext.AccountabilityTypes.Add(_gameType);
            _bowlingContext.Units.Add(_scoreUnit);
            _bowlingContext.PhenomenonTypes.Add(_phenomenonType);
            _bowlingContext.OakLanes.AddRange(_oakLanes);
            _bowlingContext.Lanes.AddRange(_lanes);

            _bowlingContext.SaveChanges();
        }
Exemple #31
0
        public async Task InvokeAsync(HttpContext context, IPartyRepository partyRepository, IParticipantRepository participantRepository)
        {
            var path = context.Request.Path;

            if (path.StartsWithSegments("/export/users"))
            {
                var id           = GetIdFromPath(path);
                var participants = id != -1
                    ? participantRepository.GetAll().Where(x => x.PartyId == id)
                    : participantRepository.GetAll();

                var sb = new StringBuilder();
                sb.Append("Id, Name, IsAttend, Avatar, Reason, PartyId\n");
                foreach (var participant in participants)
                {
                    sb.Append(participant.Id);
                    sb.Append("," + participant.Name);
                    sb.Append("," + participant.IsAttend);
                    sb.Append("," + participant.Avatar);
                    sb.Append("," + participant.Reason);
                    sb.Append("," + participant.PartyId);

                    sb.Append("\n");
                }

                var bytes = Encoding.UTF8.GetBytes(sb.ToString());

                context.Response.StatusCode  = 200;
                context.Response.ContentType = "text/csv";
                context.Response.Headers.Add("Content-Disposition", "Attachment; filename=\"participants.csv\"");
                context.Response.ContentLength = bytes.Length;
                await context.Response.WriteAsync(sb.ToString());
            }
            else
            {
                await _next(context);
            }
        }
Exemple #32
0
 public PartyApiService(string apiURL, IPartyRepository partyRepository)
 {
     this.partyRepository = partyRepository;
     this.URL             = apiURL;
     httpClient           = new HttpClient();
 }
Exemple #33
0
 public PartyService(IParticipantsRepository participantsRepository, IPartyRepository partyRepository)
 {
     this.participantsRepository = participantsRepository;
     this.partyRepository        = partyRepository;
 }
Exemple #34
0
 public DataManager(IDistrictRepository districtRepository,
     ILocalityRepository localityRepository,
     IStreetRepository streetRepository,
     IHouseRepository houseRepository,
     IMunicipalityRepository municipalityRepository,
     IPersonRepository personRepository,
     INationalityRepository nationalityRepository,
     IEducationRepository educationRepository,
     IOrganizationRepository organizationRepository,
     IMunicipalityHouseRelationRepository municipalityHouseRelationRepository,
     IRegistrationRepository registrationRepository,
     IPartyRepository partyRepository,
     IPrecinctRepository precinctRepository,
     IUserRepository userRepository,
     IWorkerRepository workerRepository,
     IVoterPartyRelationRepository voterPartyRelationRepository,
     IVoterRepository voterRepository,
     IUserLogRepository userLogRepository,
     IRelationshipRepository relationshipRepository,
     IPersonRelationRepository personRelationRepository,
     ICandidateRepository candidateRepository,
     IAgitatorRepository agitatorRepository,
     IWorkerHouseRelationRepository workerHouseRelationRepository,
     IAgitatorHouseRelationRepository agitatorHouseRelationRepository,
     IAgitatorPrecinctRelationRepository agitatorPrecinctRelationRepository,
     ICandidatePrecinctRelationRepository candidatePrecinctRelationRepository,
     ICandidateMunicipalityRelationRepository candidateMunicipalityRelationRepository,
     ITempPersonRepository tempPersonRepository,
     IGEORepository geoRepository,
     IPartyMemberRepository partyMemberRepository,
     IPartySupporterRepository partySupporterRepository)
 {
     this.districtRepository = districtRepository;
     this.municipalityRepository = municipalityRepository;
     this.personRepository = personRepository;
     this.localityRepository = localityRepository;
     this.nationalityRepository = nationalityRepository;
     this.streetRepository = streetRepository;
     this.houseRepository = houseRepository;
     this.educationRepository = educationRepository;
     this.organizationRepository = organizationRepository;
     this.municipalityHouseRelationRepository = municipalityHouseRelationRepository;
     this.registrationRepository = registrationRepository;
     this.partyRepository = partyRepository;
     this.precinctRepository = precinctRepository;
     this.userRepository = userRepository;
     this.workerRepository = workerRepository;
     this.voterPartyRelationRepository = voterPartyRelationRepository;
     this.voterRepository = voterRepository;
     this.userLogRepository = userLogRepository;
     this.relationshipRepository = relationshipRepository;
     this.personRelationRepository = personRelationRepository;
     this.candidateRepository = candidateRepository;
     this.agitatorRepository = agitatorRepository;
     this.workerHouseRelationRepository = workerHouseRelationRepository;
     this.agitatorHouseRelationRepository = agitatorHouseRelationRepository;
     this.agitatorPrecinctRelationRepository = agitatorPrecinctRelationRepository;
     this.candidatePrecinctRelationRepository = candidatePrecinctRelationRepository;
     this.candidateMunicipalityRelationRepository = candidateMunicipalityRelationRepository;
     this.tempPersonRepository = tempPersonRepository;
     this.geoRepository = geoRepository;
     this.partyMemberRepository = partyMemberRepository;
     this.partySupporterRepository = partySupporterRepository;
 }
 public UmbrellaService(IUmbrellaRepository umbrellaRepository, IPartyRepository partyRepository, IReferenceRepository referenceRepository)
 {
     this._umbrellaRepository = umbrellaRepository;
     this._partyRepository = partyRepository;
     this._referenceRepository = referenceRepository;
 }