commandlineparser / commandlineparser/commandline
Add MapResult example to HelpText Configuration Wiki
- 主要語言
- C#
- 星號
- 4.8k
- 分支
- 478
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Please add the following example to the https://github.com/commandlineparser/commandline/wiki/HelpText-Configuration page.
```
class Program {
static int Main(string[] args) {
var parserResult = new Parser(c => c.HelpWriter = null).ParseArguments(args);
return parserResult.MapResult(
(Options opts) => new Run(opts),
errs => DisplayHelp(parserResult, errs)
);
}
static int DisplayHelp(ParserResult parserResult, IEnumerable errs) {
Console.WriteLine(HelpText.AutoBuild(parserResult, h => {
h.AddPreOptionsLine(Environment.NewLine + "Use this tool wisely!");
return h;
}));
return 1;
}
}
```
Also I had a great trouble finding this page, please add more links to it.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
開啟 issue 中連結的 HelpText Configuration wiki 頁面,並檢查其中現有的範例和導覽連結。加入提供的 C# MapResult 範例,並透過新增指向該頁面的連結來改善可發現性。當範例和連結在 wiki 頁面上可見且格式正確時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- csharp
- 領域
- documentation
- Issue 類型
- 文件
- 難度
- 1/5
- 預估耗時
- 1 小時以內
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 55/100