Ejemplo n.º 1
0
 public PartyService(IPartyRepository partyRepository, ISpotifyHttpClient spotifyHttpClient, ILogService logService)
 {
     _partyRepository   = partyRepository;
     _spotifyHttpClient = spotifyHttpClient;
     _random            = new Random();
     _logService        = logService;
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 4
0
 public FakeAccountRepository(IPartyRepository partyContext)
 {
     _winningTransactions = new List <WinningTransaction>();
     _winningEntries      = new List <WinningEntry>();
     _roundsScoreEntries  = new List <RoundsScoreEntry>();
     _partyContext        = partyContext;
 }
Ejemplo n.º 5
0
 public PartyService(IPartyRepository partyRepository, ISpotifyHttpClient spotifyHttpClient, ILogService logService, IPartyGoerService partyGoerService)
 {
     _partyRepository   = partyRepository;
     _spotifyHttpClient = spotifyHttpClient;
     _partyGoerService  = partyGoerService;
     _logService        = logService;
 }
Ejemplo n.º 6
0
 //constructor
 public PartyController()
 {
     if (partyRepository == null)
     {
         this.partyRepository = new DPartyRepository(new JohanAgroFoodDBEntities());
     }
 }
Ejemplo n.º 7
0
 public StatsMenuService(IStatsRepository statsRepository, IUserRepository userRepository, ISlackWebApi slack, IPartyRepository partyRepository)
 {
     _statsRepository = statsRepository;
     _userRepository  = userRepository;
     _slack           = slack;
     _partyRepository = partyRepository;
 }
Ejemplo n.º 8
0
 public PartyMenuService(ISlackWebApi slack, IPartyService partyService, IUserRepository userRepository, IPartyRepository partyRepository, IUserService userService)
 {
     _slack           = slack;
     _partyService    = partyService;
     _userRepository  = userRepository;
     _partyRepository = partyRepository;
     _userService     = userService;
 }
Ejemplo n.º 9
0
 public HomeController(IPartyRepository partyRepository, IModuleRepository moduleRepository,
                       IResultRepository resultRepository, IVoteRepository voteRepository)
 {
     _partyRepository  = partyRepository;
     _moduleRepository = moduleRepository;
     _resultRepository = resultRepository;
     _voteRepository   = voteRepository;
 }
Ejemplo n.º 10
0
 public PartyService(CustomerService customerService,
                     IPartyRepository partyRepository,
                     ITextMessageClient textMessageClient)
 {
     _customerService   = customerService;
     _partyRepository   = partyRepository;
     _textMessageClient = textMessageClient;
 }
Ejemplo n.º 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();
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 13
0
 public BillOfExchangeService(IBillOfExchangeRepositoryWithCount billOfExchangeRepository, IMapper mapper,
                              IPartyRepository partyRepository,
                              IEndorsementRepository endorsementRepository)
 {
     this.billOfExchangeRepository = billOfExchangeRepository;
     this.mapper                = mapper;
     this.partyRepository       = partyRepository;
     this.endorsementRepository = endorsementRepository;
 }
Ejemplo n.º 14
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;
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 18
0
 public PresenceController(
     ISessionRepository sessionRepository,
     IPartyRepository partyRepository,
     IPartyMemberRepository partyMemberRepository,
     IUserPresenceRepository userPresenceRepository)
 {
     _sessionRepository = sessionRepository;
     _partyRepository = partyRepository;
     _partyMemberRepository = partyMemberRepository;
     _userPresenceRepository = userPresenceRepository;
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 24
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
            };
        }
Ejemplo n.º 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
            };
        }
Ejemplo n.º 26
0
 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;
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 29
0
 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;
 }
Ejemplo n.º 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();
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 32
0
 public PartyApiService(string apiURL, IPartyRepository partyRepository)
 {
     this.partyRepository = partyRepository;
     this.URL             = apiURL;
     httpClient           = new HttpClient();
 }
Ejemplo n.º 33
0
 public PartyService(IParticipantsRepository participantsRepository, IPartyRepository partyRepository)
 {
     this.participantsRepository = participantsRepository;
     this.partyRepository        = partyRepository;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 35
0
 public UmbrellaService(IUmbrellaRepository umbrellaRepository, IPartyRepository partyRepository, IReferenceRepository referenceRepository)
 {
     this._umbrellaRepository = umbrellaRepository;
     this._partyRepository = partyRepository;
     this._referenceRepository = referenceRepository;
 }