private void PrintList(CommandTextWriter writer) { this.commandContext.Parsers[this].PrintUsage(); writer.WriteLine(Resources.AvaliableCommands); writer.Indent++; foreach (var item in this.commandContext.Commands) { if (this.commandContext.IsCommandVisible(item) == false) continue; var summary = CommandDescriptor.GetUsageDescriptionProvider(item.GetType()).GetSummary(item); writer.WriteLine(item.Name); writer.Indent++; writer.WriteMultiline(summary); writer.Indent--; } writer.Indent--; }
private void PrintOption(CommandTextWriter writer, SwitchDescriptor descriptor) { if (descriptor.ShortNamePattern != string.Empty) writer.WriteLine(descriptor.ShortNamePattern); if (descriptor.NamePattern != string.Empty) writer.WriteLine(descriptor.NamePattern); writer.Indent++; writer.WriteMultiline(descriptor.Description); writer.Indent--; writer.WriteLine(); }
private void PrintRequirement(CommandTextWriter writer, SwitchDescriptor descriptor) { writer.WriteLine(descriptor.Name); if (descriptor.Description != string.Empty) { writer.Indent++; writer.WriteMultiline(descriptor.Description); writer.Indent--; } writer.WriteLine(); }
private void PrintDescription(CommandTextWriter writer, SwitchDescriptor[] switches) { if (this.Description == string.Empty) return; writer.WriteLine(Resources.Description); writer.Indent++; writer.WriteMultiline(this.Description); writer.Indent--; writer.WriteLine(); }