libArgument v0.1 Beta
Pre-release
Pre-release
SplittyDev
released this
27 Apr 07:04
·
21 commits
to master
since this release
We've fixed a good amount of problems with the last release.
New features / fixes in this release:
- The Switch attribute works now
- Fixed several minor bugs
- Added automatic help generation using the Docs attribute
This release is pretty stable, we've used it for some personal projects and it worked really well.
The following is an example of the new help generator:
using Codeaddicts.libArgument;
using Codeaddicts.libArgument.Attributes;
public class Options {
[Switch]
[Docs ("Displays this help")]
public bool help;
[Argument ("in")]
[Docs ("Input file")]
public string input_file;
[Argument ("out")]
[Docs ("Output file")]
public string output_file;
}
public static class Program {
public static void Main (string[] args) {
var options = ArgumentParser.Parse<Options> (args);
if (options.help) {
ArgumentParser.Help ();
return;
}
Console.WriteLine ("Input file: {0}", options.input_file);
Console.WriteLine ("Output file: {0}", options.output_file);
...
}
}
The dll file and the zip file are basically the same, but the zip file is a little bit smaller.
We hope you enjoy this release as much as we do :)