Skip to content

Commit 01990a8

Browse files
committed
2 parents ca187f1 + 9b4eadb commit 01990a8

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

README.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![CI](https://github.com/EmptyFlow/FlowCommandLine/actions/workflows/cipackage.yml/badge.svg)](https://github.com/EmptyFlow/FlowCommandLine/actions/workflows/cipackage.yml) [![nugeticon](https://img.shields.io/badge/nuget-available-blue)](https://www.nuget.org/packages/FlowCommandLine)
22

33
# FlowCommandLine
4-
A fast and simple command line parser that works in two modes: command-based (e.g. `git commit ...`) or parameters-only. Parsing can be happened to any model class or record with parameterless constructor.
4+
FlowCommandLine is a C# library available on Nuget that is a fast and simple command line parser that works in two modes: command-based (e.g. `git commit ...`) or parameters-only. Parsing can be happened to any model class or record with parameterless constructor.
55
It support modern dotnet core runtimes (net8+), compilation in NativeAot. It supported auto documentation for commands and parameters.
66
Lot of types of properties [is supported](https://github.com/EmptyFlow/FlowCommandLine/wiki/Supported-mappings-types).
77
By default, the output will be to the system console, but can be redefined to any of your case - instead `CommandLine.Console ()` you can use `new CommandLine (new MyConsoleCommandLineProvider())` where `MyConsoleCommandLineProvider` it is you class which is implement `ICommandLineProvider` interface.
@@ -27,20 +27,10 @@ CommandLine.Console ()
2727
},
2828
"Command description", // command description :)
2929
new List<FlowCommandParameter> { // adjust command parameters
30-
new FlowCommandParameter {
31-
FullName = "param1", // for parameter in format --param1
32-
ShortName = "p1, // for parameter in format -p1
33-
PropertyName = "Param1" // it
34-
Description = "parameter description",
35-
Required = true, // parameter is required
36-
},
37-
FlowCommandParameter.CreateRequired("p3", "param3", "parameter description"), // use factory method for required parameter
38-
new FlowCommandParameter {
39-
FullName = "param2", // full name is required property, other properties ShortName or PropertyName can be inferred from FullName
40-
Description = "parameter2 description",
41-
Required = false,
42-
},
30+
FlowCommandParameter.CreateRequired("p1", "param1", "parameter 1 description"), // use factory methods for required parameter
31+
FlowCommandParameter.CreateRequired("p3", "param3", "parameter 3 description"),
4332
FlowCommandParameter.Create("p4", "param4", "parameter description"), // use factory method for non required parameter
33+
FlowCommandParameter.Create("p2", "param2", "parameter2 description")
4434
}
4535
)
4636
.RunCommand ();

0 commit comments

Comments
 (0)