private void ShowHelpFor(Command command) { Output.Write(command.Name); foreach (string switchName in command.SwitchNames) { Output.Write(' '); CommandSwitch sw = command.FindSwitch(switchName); if (sw.Optional) Output.Write('['); if (sw.Mode == CommandSwitch.ValueMode.ExpectMultiple) Output.Write('{'); Output.Write(switchName); if (sw.Mode != CommandSwitch.ValueMode.Unexpected) Output.Write(" <value>"); if (sw.Mode == CommandSwitch.ValueMode.ExpectMultiple) Output.Write('}'); if (sw.Optional) Output.Write(']'); } Output.WriteLine(); }