public virtual void AppendUsage(IConsoleBuffer buff) { buff.AppendLine("usage:"); if (!string.IsNullOrWhiteSpace(CommandPrefix)) { buff.Append(CommandPrefix); buff.Append(" "); } buff.Append(Command); buff.Append(" "); buff.SetIndent(buff.CurrentPosition + 1); for (int i = 0; i < _pargs.Count; i++) { _pargs[i].AppendUsage(buff); buff.Append(" "); } foreach (var narg in _nargs.Values) { narg.AppendUsage(buff); buff.Append(" "); } buff.SetIndent(0); }
public virtual void AppendHelp(IConsoleBuffer buff) { buff.SetIndent(8); AppendHelpTitle(buff); buff.SetIndent(32); if (buff.CurrentPosition >= 32) { buff.AppendLine(); } buff.Append(Help); buff.SetIndent(0); }