CommandLineParser.FluentValidations
0.5.1
FluentValidations extension for CommandLineParser.Core
Suggested Alternatives
MatthiWare.CommandLineParser.Extensions.FluentValidations
Additional DetailsWrong package id
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
Install-Package CommandLineParser.FluentValidations -Version 0.5.1
dotnet add package CommandLineParser.FluentValidations --version 0.5.1
<PackageReference Include="CommandLineParser.FluentValidations" Version="0.5.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CommandLineParser.FluentValidations --version 0.5.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CommandLineParser.FluentValidations, 0.5.1"
For F# scripts that support #r syntax, copy this into the source code to reference the package.
// Install CommandLineParser.FluentValidations as a Cake Addin #addin nuget:?package=CommandLineParser.FluentValidations&version=0.5.1 // Install CommandLineParser.FluentValidations as a Cake Tool #tool nuget:?package=CommandLineParser.FluentValidations&version=0.5.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CommandLineParser
A simple, light-weight and strongly typed commandline parser made in .NET Standard!
Installation
PM> Install-Package MatthiWare.CommandLineParser
Quick Start
Example of configuring the port option using the Fluent API.
static void Main(string[] args)
{
// create the parser
var parser = new CommandLineParser<ServerOptions>();
// configure the options using the Fluent API
parser.Configure(options => options.Port)
.Name("p", "port")
.Description("The port of the server")
.Required();
// parse
var parserResult = parser.Parse(args);
// check for parsing errors
if (parserResult.HasErrors)
{
Console.ReadKey();
return -1;
}
var serverOptions = parserResult.Result;
Console.WriteLine($"Parsed port is {serverOptions.Port}");
}
private class ServerOptions
{
// options
public int Port { get; set; }
}
Run command line
dotnet myapp --port 2551
For more advanced configuration options see the wiki.
Contributors
CommandLineParser
A simple, light-weight and strongly typed commandline parser made in .NET Standard!
Installation
PM> Install-Package MatthiWare.CommandLineParser
Quick Start
Example of configuring the port option using the Fluent API.
static void Main(string[] args)
{
// create the parser
var parser = new CommandLineParser<ServerOptions>();
// configure the options using the Fluent API
parser.Configure(options => options.Port)
.Name("p", "port")
.Description("The port of the server")
.Required();
// parse
var parserResult = parser.Parse(args);
// check for parsing errors
if (parserResult.HasErrors)
{
Console.ReadKey();
return -1;
}
var serverOptions = parserResult.Result;
Console.WriteLine($"Parsed port is {serverOptions.Port}");
}
private class ServerOptions
{
// options
public int Port { get; set; }
}
Run command line
dotnet myapp --port 2551
For more advanced configuration options see the wiki.
Contributors
Release Notes
- Update dependencies
Dependencies
-
.NETStandard 2.0
- FluentValidation (>= 9.3.0)
- MatthiWare.CommandLineParser (>= 0.5.1)
Used By
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version History
Version | Downloads | Last updated |
---|