Example #1
0
        private void Init(Config cfg)
        {
            _log.Debug("Start requested");

              if (_state == State.InWork || _state == State.Stopping)
              {
            _log.Warn("Try to start when in work. Ignore.");

            return;
              }

              _state = State.InWork;
              _log.Debug("Current state is 'in work'. Start adding clients.");

              for (int i = cfg.StartFrom; i < cfg.StartFrom + cfg.ClientNum; ++i)
              {
            var client = new Client(i, cfg, _ctx);

            client.Stopped += CheckIfAllStopped;
            Clients.Add(client);
              }

              _log.Debug("All clients added. Started OK!");
        }
Example #2
0
 public TestData(Client client)
 {
     _client = client;
 }