public SetupGameStuff(IDbContextLocator locator, IDbContextFactory factory,
                       INetworkContentSyncer networkContentSyncer, /* ICacheManager cacheMan, */
                       IGameLocker gameLocker, IStateHandler stateHandler, IAssemblyService ass)
 {
     _locator = locator;
     _factory = factory;
     _networkContentSyncer = networkContentSyncer;
     //_cacheMan = cacheMan;
     _gameLocker   = gameLocker;
     _stateHandler = stateHandler;
     _timer        = new TimerWithElapsedCancellationAsync(TimeSpan.FromMinutes(30), onElapsedNonBool: OnElapsed);
     _gameFactory  = new GameFactory(ass);
 }
Exemple #2
0
 public ServerList(ISupportServers game, UserSettings settings, IEventAggregator eventBus,
                   IGameServerQueryHandler queryHandler, IGameContext gameContext)
 {
     _eventBus        = eventBus;
     _queryHandler    = queryHandler;
     _gameContext     = gameContext;
     _settings        = settings;
     _listTimer       = new TimerWithElapsedCancellationAsync(GetTimerValue(), ListTimerElapsed, null);
     _serverTimer     = new TimerWithElapsedCancellationAsync(ServerUpdateFrequency, ServerTimerElapsed);
     Game             = game;
     Filter           = Game.GetServerFilter();
     ServerQueryQueue = new ServerQueryQueue();
 }
Exemple #3
0
 public Task HandleUpdateState() => Task.Run(async() => {
     await OnElapsed().ConfigureAwait(false);
     _timer = new TimerWithElapsedCancellationAsync(TimeSpan.FromHours(1).TotalMilliseconds, OnElapsed);
 });