Optionize.NET

Optionize is a command-line options parsing library for .NET.

Parsing command line arguments has never been this easy!

No more string[] args massacre!

 How to use?

It’s as simple as using this anywhere in the code:

// Let's give it a simpler name in usings
using CMD = Kaisean.Tools.OptionizeLibrary.Optionize;

// If you run your app with the following command-line arguments -r 100
if(CMD.Options["r"])
{
    // ...this here will print 100
    Console.WriteLine(CMD.Options["r"].Values.FirstOrDefault());
}

But of course, you can customize Optionize to your liking, like in the following example:

CMD.Initialize(args, new OptionizeSettings()
{
    ValueGrouping = ValueGroupingOptions.AllValues,
    Options = new
    {
        r = new OptionInfo()
        {
            Count = 3,
            Help = "Specifies recursive algorithm",
            Aliases = new [] { "rec", "recursive" }
        },
        sub = new
        {
            Count = 1,
            Help = "Use sub folders"
        },
        q = new
        {
            Help = "Quit after process completes"
        }
    }
}

For the complete list of features and examples, please see the documentation.

Download now!Documentation (soon)