public bool TryMatch(CommandLineArgument arg, string key, string value, int position, bool isLong, out CommandLineArgument parsedArg) { bool matches = isLong ? key == arg.LongText : key == arg.Text; if (matches) { parsedArg = CommandLineArgument.CreateFromInstance(arg, value, position); return(true); } parsedArg = null; return(false); }