public AdminApplicationService(
     MiscRepository miscRepository,
     MatchApplicationService matchApplicationService,
     IHubContext <LiveScoreHub, ITypedHubClient> liveScoreHubContext)
 {
     _miscRepository          = miscRepository;
     _matchApplicationService = matchApplicationService;
     _liveScoreHubContext     = liveScoreHubContext;
 }
        public void ProcessAction(AdminAction action)
        {
            var repository   = new MiscRepository();
            var matchService = new MatchService();

            switch (action)
            {
            case AdminAction.ResetDb:
                repository.ResetDb();
                matchService.ProcessAction("WP0001", EventType.Created, "Frogs", "Sharks");
                matchService.ProcessAction("WP0002", EventType.Created, "Sharks", "Eels");
                break;
            }
            LiveScoreHub.Refresh();
        }
Beispiel #3
0
        /// <summary>
        /// Client used to access the Guild Wars 2 REST API.
        /// </summary>
        /// <param name="apiKey">Official API key provided from ArenaNet.</param>
        public GW2Client(string apiKey = null)
        {
            Achievements = new AchievementRepository();
            Items        = new ItemRepository();
            Misc         = new MiscRepository();
            PvE          = new PvERepository();
            PvP          = new PvPRepository();
            Skills       = new SkillRepository();

            ApiKey     = apiKey;
            Account    = new AccountRepository(ApiKey);
            Characters = new CharacterRepository(ApiKey);
            Commerce   = new CommerceRepository(ApiKey);
            Guilds     = new GuildRepository(ApiKey);
        }
Beispiel #4
0
 public MasterRepository(ProjectDbContext context)
 {
     dbContext                  = context;
     ServisRepository           = new ServisRepository(context);
     ServiserRacunaraRepository = new ServiserRacunaraRepository(context, ServisRepository);
     RacunarRepository          = new RacunarRepository(context);
     VlasnikRacunaraRepository  = new VlasnikRacunaraRepository(context);
     KomponentaRepository       = new KomponentaRepository(context);
     GarantniListRepository     = new GarantniListRepository(context);
     PosjedujeRepository        = new PosjedujeRepository(context);
     SastojiSeRepository        = new SastojiSeRepository(context);
     RadiRepository             = new RadiRepository(context);
     DonosiRepository           = new DonosiRepository(context);
     ServisiraRepository        = new ServisiraRepository(context);
     RacunarskiServisRepository = new RacunarskiServisRepository(context);
     KorisnikRepository         = new KorisnikRepository(context, VlasnikRacunaraRepository, ServiserRacunaraRepository);
     MiscRepository             = new MiscRepository(context, PosjedujeRepository, KorisnikRepository, RacunarRepository, VlasnikRacunaraRepository);
 }