public static NetworkProbeResult ErrorResult(string error)
        {
            var result = new NetworkProbeResult();

            result.Success = false;
            result.Error   = error;

            return(result);
        }
        public NetworkProbeResult Parse(string input)
        {
            NetworkProbeResult result = new NetworkProbeResult();

            if (!string.IsNullOrWhiteSpace(input))
            {
                var devices = ParseDeviceList(input);
                foreach (var device in devices)
                {
                    result.AddDevice(device); // Checks for duplicate entries
                }
            }

            result.RawResult = input;
            return(result);
        }
        public NetworkProbeResult Probe()
        {
            string networkProbeCommand = "sudo arp-scan --localnet --plain";

            try
            {
                var result = Bash(networkProbeCommand);

                return(Parse(result));
            }
            catch (Exception ex)
            {
                var error = $"An error occcurred while trying to run the {networkProbeCommand} command. Error:{ex.Message}";

                return(NetworkProbeResult.ErrorResult(error));
            }
        }