Common.CmdParser 1.0.0.22

CommandLine parser

Install-Package Common.CmdParser -Version 1.0.0.22
dotnet add package Common.CmdParser --version 1.0.0.22
<PackageReference Include="Common.CmdParser" Version="1.0.0.22" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Common.CmdParser --version 1.0.0.22
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Add in your code:

using Common.CmdParser;

public class Program
{
        public static void Main(string[] args)
        {
            var cmdArguments = CMDParser.Parse(args);

            var requiredCMDOption = cmdArguments.GetAppParameter("param1", true);
            var optionalCMDOption = cmdArguments.GetAppParameter("param2", false);
            var optionalCMDOptionWithHelp = cmdArguments.GetAppParameter("v", false, "This is param3 without value");
        }
}

usage:


MyConsoleApp.exe /param1:"value1"

MyConsoleApp.exe /param1:"value1" --param2 "value2"

MyConsoleApp.exe --param1 "value1" --param2 "value2" -v

Add in your code:

using Common.CmdParser;

public class Program
{
        public static void Main(string[] args)
        {
            var cmdArguments = CMDParser.Parse(args);

            var requiredCMDOption = cmdArguments.GetAppParameter("param1", true);
            var optionalCMDOption = cmdArguments.GetAppParameter("param2", false);
            var optionalCMDOptionWithHelp = cmdArguments.GetAppParameter("v", false, "This is param3 without value");
        }
}

usage:


MyConsoleApp.exe /param1:"value1"

MyConsoleApp.exe /param1:"value1" --param2 "value2"

MyConsoleApp.exe --param1 "value1" --param2 "value2" -v

Dependencies

This package has no dependencies.

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
1.0.0.22 297 12/27/2018
1.0.0.3 374 12/22/2018