文件名称:CommandLineParser:NET的命令行解析器C#库
文件大小:34KB
文件格式:ZIP
更新时间:2024-06-04 09:13:50
cli parser args command-line dotnet
命令行解析器 一个简单的.NET CLI参数解析器库,使用C#属性。 厌倦了自己亲自读取传递给您的主方法的string[] args吗? 这个简单的库使您可以将参数解析为任何标准.NET对象。 安装 dotnet add package CommandLine.Parser 例子 这里有一些例子: 默认选项名称模式 以这个简单的程序为例: copy.exe --source " ./my-stuff.txt " --destination " ./new-folder " 我们需要--source和--destination值。 public class FileCopyModel { public string source { get ; set ; } public string destination { get ; set ; } } public c
【文件预览】:
CommandLineParser-master
----.gitignore(8KB)
----CommandLineParser()
--------CommandParser.cs(15KB)
--------Helpers()
--------Exceptions()
--------CommandLineParser.csproj(184B)
--------Attributes()
--------IConfigModel.cs(275B)
----README.md(5KB)
----Resources()
--------command-line-parser.ico(3KB)
--------command-line-parser.png(8KB)
--------command-line-parser.svg(1KB)
----CommandLineParser.Tests()
--------NonOptionTests.cs(780B)
--------HelpTests.cs(3KB)
--------TransformTests.cs(907B)
--------Helpers()
--------CommandLineParser.Tests.csproj(599B)
--------LongOptionTests.cs(4KB)
--------Attributes()
--------MiscTests.cs(5KB)
--------packages.config(140B)
--------TerminatorTests.cs(861B)
--------ValuesOptionTests.cs(3KB)
--------Models()
--------ShortOptionTests.cs(3KB)
----LICENSE(1KB)
----.gitattributes(2KB)
----CommandLineParser.sln(3KB)