示例#1
0
        private async Task HandleInitialGameStates()
        {
            // TODO: Only states of games that are actually used in the session (so progressively?)
            var context = _locator.GetReadOnlyGameContext();
            await context.LoadAll().ConfigureAwait(false);

            foreach (var g in context.Games)
            {
                Games[g.Id] =
                    new GameStateHandler(
                        new ConcurrentDictionary <Guid, ContentStatus>(
                            g.InstalledContent.Concat(g.IncompleteContent).GetStates()
                            .ToDictionary(x => x.Key, x => x.Value)));
            }
        }
 public IContentEngineGame Get(Guid gameId) => _contextLocator.GetReadOnlyGameContext().FindGame(gameId);