寻找一个命令行参数解析器.NET命令行、参数、NET

2023-09-02 01:28:59 作者:风云谁人盖

我在寻找一个命令行参数解析,如 HTTP命令行解析器://www.sellsbrothers .COM /工具/成吉思汗/ 。

I'm looking for a command line argument parser, such as "Command line parser" from http://www.sellsbrothers.com/tools/Genghis/ .

功能我在寻找:

自动生成的使用 应该能够检查必需和可选参数 参数应该支持IEnumerable的与分离器支持 应该支持标志参数 将是很好的支持相结合的参数,如/ FX==/ F / X 将是很好的一个参数后面的空间不强求,如/ftest.txt==/˚F的test.txt

P.S: 命令行解析器是相当不错的,我真的很喜欢它的设计,但没有文件,没有新的更新,我想不出做一些东西,比如如何检查所需的参数。

推荐答案

我个人最喜欢的第三方命令行解析库是命令行分析器< /一>,我认为这是你指的是一个。最新的版本是不到2个月前,有定期提交。如果你想要一个更成熟的产品,你可以赤在Mono项目的控制台库(对不起,我似乎无法找到目前的直接链接到命名空间,但单​​框架的一部分)

My personal favourite 3rd party commandline parsing library is Command Line Parser and I assume this is the one you are referring to. The most recent release was less than 2 months ago and there are regular commits. If you want a more mature offering you could chek out the console library in the mono project (sorry I can't seem to find a direct link to the namespace at the moment, but its a part of the mono framework)