private bool ParseHelp(string[] args, HelpOptionAttribute helpOption) { bool caseSensitive = _settings.CaseSensitive; for (int i = 0; i < args.Length; i++) { if (!string.IsNullOrEmpty(helpOption.ShortName)) { if (ArgumentParser.CompareShort(args[i], helpOption.ShortName, caseSensitive)) { return(true); } } if (!string.IsNullOrEmpty(helpOption.LongName)) { if (ArgumentParser.CompareLong(args[i], helpOption.LongName, caseSensitive)) { return(true); } } } return(false); }
private bool ParseHelp(string[] args, HelpOptionAttribute helpOption) { var caseSensitive = _settings.CaseSensitive; foreach (var arg in args) { if (helpOption.ShortName != null) { if (ArgumentParser.CompareShort(arg, helpOption.ShortName, caseSensitive)) { return(true); } } if (string.IsNullOrEmpty(helpOption.LongName)) { continue; } if (ArgumentParser.CompareLong(arg, helpOption.LongName, caseSensitive)) { return(true); } } return(false); }
private static bool ParseHelp(string[] args, HelpOptionAttribute helpOption) { for (int i = 0; i < args.Length; i++) { if (!string.IsNullOrEmpty(helpOption.ShortName)) { if (ArgumentParser.CompareShort(args[i], helpOption.ShortName)) { return(true); } } if (!string.IsNullOrEmpty(helpOption.LongName)) { if (ArgumentParser.CompareLong(args[i], helpOption.LongName)) { return(true); } } } return(false); }