Пример #1
0
        public SeederContext(SessionData sessionData, BindableSettings bindableSettings, IDataContextUpdater[] updaters,
                             [NotNull] IServerStatusUpdater serverStatusUpdater,
                             [NotNull] IPlayerStatusGetter playerStatusGetter)
        {
            if (sessionData == null)
            {
                throw new ArgumentNullException("sessionData");
            }
            if (bindableSettings == null)
            {
                throw new ArgumentNullException("bindableSettings");
            }
            if (updaters == null)
            {
                throw new ArgumentNullException("updaters");
            }
            if (serverStatusUpdater == null)
            {
                throw new ArgumentNullException("serverStatusUpdater");
            }
            if (playerStatusGetter == null)
            {
                throw new ArgumentNullException("playerStatusGetter");
            }

            _sessionData         = sessionData;
            _settings            = bindableSettings;
            _updaters            = updaters;
            _serverStatusUpdater = serverStatusUpdater;
            _playerStatusGetter  = playerStatusGetter;

            _sessionData.ServerStatuses.SetInnerServerCollection(_settings.Servers);
        }
Пример #2
0
        public SeederContext(SessionData sessionData, BindableSettings bindableSettings, IDataContextUpdater[] updaters,
            [NotNull] IServerStatusUpdater serverStatusUpdater,
            [NotNull] IPlayerStatusGetter playerStatusGetter)
        {
            if (sessionData == null) throw new ArgumentNullException("sessionData");
            if (bindableSettings == null) throw new ArgumentNullException("bindableSettings");
            if (updaters == null) throw new ArgumentNullException("updaters");
            if (serverStatusUpdater == null) throw new ArgumentNullException("serverStatusUpdater");
            if (playerStatusGetter == null) throw new ArgumentNullException("playerStatusGetter");

            _sessionData = sessionData;
            _settings = bindableSettings;
            _updaters = updaters;
            _serverStatusUpdater = serverStatusUpdater;
            _playerStatusGetter = playerStatusGetter;

            _sessionData.ServerStatuses.SetInnerServerCollection(_settings.Servers);
        }