private ReplayService IntializeReplayService(SteuDbContext context) { var repository = new EfDeletableEntityRepository <Replay>(context); MapperInitializer.InitializeMapper(); var service = new ReplayService(repository); return(service); }
public async Task <ActionResult <DsGameResponse> > GetReplay(string hash) { var replay = await ReplayService.GetReplay(context, hash); if (replay == null) { return(NotFound()); } return(replay); }
public async Task <ActionResult <List <DsReplayResponse> > > ReplayRequest(DsReplayRequest request, CancellationToken cancellationToken) { if (!cancellationToken.IsCancellationRequested) { return(await ReplayService.GetReplays(context, request, cancellationToken)); } else { return(Ok()); } }
/// <summary> /// Update the InputSource manager /// </summary> public void update() { if (replSource != null && replSource.ReplayOver) { activeSource = defaultSource; replSource = null; } if (replSource != null) { replSource.update(); } }
public Replays(ManagedVersionsService localVersionsService, ReplayService replayService) { _localVersionsService = localVersionsService; _replayService = replayService; InitializeComponent(); ManagedVersionCollection versions = _localVersionsService.GetManagedVersions(); versions.CollectionChanged += ContentCollectionChanged; UpdateVersions(); versionPick.Visibility = Visibility.Hidden; warnNotAvailable.Visibility = Visibility.Hidden; _buttonTimer = new DispatcherTimer(); _buttonTimer.Interval = new TimeSpan(0, 0, 5); _buttonTimer.Tick += OnReplayLaunched; }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); IReplayService replayService = new ReplayService(); ILastPlayedReplayService lastPlayedReplayService = new LastPlayedReplayService(); var boardViewModel = new BoardViewModel(replayService); var mainWindowViewModel = new MainWindowViewModel(boardViewModel, replayService, lastPlayedReplayService); var mainWindow = new MainWindow { DataContext = mainWindowViewModel }; mainWindow.ShowDialog(); }
public Session() { AccountService = new Riot.Services.AccountService(this); ChampionTradeService = new Riot.Services.ChampionTradeService(this); ClientFacadeService = new Riot.Services.ClientFacadeService(this); GameInvitationService = new Riot.Services.GameInvitationService(this); GameService = new Riot.Services.GameService(this); InventoryService = new Riot.Services.InventoryService(this); LcdsProxyService = new Riot.Services.LcdsProxyService(this); LeaguesService = new Riot.Services.LeaguesService(this); LoginService = new Riot.Services.LoginService(this); MasteryBookService = new Riot.Services.MasteryBookService(this); MatchmakingService = new Riot.Services.MatchmakingService(this); PlayerStatsService = new Riot.Services.PlayerStatsService(this); RerollService = new Riot.Services.RerollService(this); SpellBookService = new Riot.Services.SpellBookService(this); SummonerIconService = new Riot.Services.SummonerIconService(this); SummonerRuneService = new Riot.Services.SummonerRuneService(this); SummonerService = new Riot.Services.SummonerService(this); SummonerTeamService = new Riot.Services.SummonerTeamService(this); LootService = new LootService(this, LcdsProxyService); ChampionMasteryService = new ChampionMasteryService(this, LcdsProxyService); TeambuilderDraftService = new TeambuilderDraftService(this, LcdsProxyService); PlayerPreferencesService = new PlayerPreferencesService(this); MatchHistoryService = new MatchHistoryService(this); var patcher = new PatcherService(this); this.chat = new ChatService(this); this.Maestro = new Maestro(chat, patcher); var settings = new SettingsService(this); var hextech = new HextechService(this); var champions = new ChampionsService(this); var masteries = new MasteriesService(this); var runes = new RunesService(this); var matches = new Server.Profile.MatchHistoryService(this); this.summoner = new SummonerService(this); this.Assets = new AssetsService(patcher); var rooms = new ChatRoomService(this, chat); var login = new AuthService(this); var game = new PlayLoopService(this, rooms); var invite = new InviteService(this, game); var meta = new MetaService(this); var debug = new DebugService(this); var replay = new ReplayService(this); patcher.FinishWAD(); var info = new InfoService(this, patcher); }
/// <summary> /// Ask the InputSource Manager to switch the input source to a replay service /// </summary> public void requestReplay() { replSource = new ReplayService(DefaultLogManager.Instance.getOldLogPath()); activeSource = replSource; GameManager.Instance.reset(); }
public async Task <ActionResult <int> > CountRequest(DsReplayRequest request) { return(await ReplayService.GetCount(context, request)); }