Skip to content

Releases: codeaddicts/libArgument

libArgument v0.1 Beta

27 Apr 07:04
Compare
Choose a tag to compare
libArgument v0.1 Beta Pre-release
Pre-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 :)

libArgument v0.1 Alpha

13 Mar 14:03
Compare
Choose a tag to compare
Pre-release

This is the first release.
We've made some Unit Tests and I think it's pretty stable.
Since this is an early release, I would love to see your suggestions and bug reports :)

Edit: The Switch attribute is broken in this release.