Exemple #1
0
        public override void RunCommand(string rawDeviceList)
        {
            var devlist    = ParseDeviceList(rawDeviceList);
            var failedlist = new List <string>();

            try
            {
                foreach (var device in devlist)
                {
                    CancellationToken.Token.ThrowIfCancellationRequested();

                    if (device == "")
                    {
                        continue;
                    }

                    ResultConsole.AddConsoleLine(ParseResponse(NetworkServices.PingTest(device), device));
                }
            }
            catch (OperationCanceledException e)
            {
                ResetCancelToken(ActionName, e);
            }

            if (failedlist.Count > 0)
            {
                WriteToFailedLog(ActionName, failedlist);
            }
        }