public void Run(int?columns) { ComponentCatalog.CacheClassesExtra(_extraAssemblies); using (var ch = _env.Start("Help")) using (var sw = new StringWriter(CultureInfo.InvariantCulture)) using (var writer = IndentingTextWriter.Wrap(sw)) { if (_listKinds) { if (_component != null) { writer.WriteLine("Listing component kinds so ignoring specified component"); } else if (_kind != null) { writer.WriteLine("Listing component kinds so ignoring specified kind"); } ListKinds(writer); } else if (_component != null) { ShowHelp(writer, columns); } else if (_allComponents) { ShowAllHelp(writer, columns); } else { ShowComponents(writer); } ch.Info(sw.ToString()); ch.Done(); } }