commandlineparser / commandlineparser/commandline

Outputting help text as individual lines

Aperta
#559 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub
question
Lingua principale
C#
Stelle
4.8k
Fork
478
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Beyond parsing the string into lines, how would I modify this to call `Log.Information()` for each line of help generated? It seems the API is capable of this, but I'm obviously struggling to figure it out myself.

```
static void DisplayHelp(ParserResult result, IEnumerable errs) {
var helpText = HelpText.AutoBuild(result, h => {
h.AutoHelp = true;
h.AutoVersion = true;
return HelpText.DefaultParsingErrorsHandler(result, h);
}, e => e);
Log.Information(helpText);
}
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.