public static bool TryGetProcessInfo(string command, out ProcessCommand process) { Guard.AgainstEmpty(command, nameof(command)); if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { command = TrimCommand(command); } process = commands.FirstOrDefault(x => x.Command == command); return(!process.Equals(default(ProcessCommand))); }