Beispiel #1
0
 private void LoadPingerstoPing()
 {
     foreach (var keyValuePair in _configWorker.GetReadsProtocols())
     {
         _pooling.Add(keyValuePair.Key, new Pinger(keyValuePair.Value, _logger));
     }
 }
Beispiel #2
0
        public bool SaveInConfig(string[] args)
        {
            if (args == null)
            {
                throw new NullReferenceException(nameof(args));
            }
            _builder.AddCommandLine(args, _commandMap);
            _config = _builder.Build();
            if (ParseInputsArgs())
            {
                var dictionary = _reader.GetReadsProtocols();
                dictionary.Add(dictionary.Count + 1, _protocol);
                SaveInConfig(dictionary.Select(x => x.Value));
                return(true);
            }

            return(false);
        }