Announcing NDesk.Options 0.2.1 - Jonathan Pryor's web log
« Threading: Lock Nesting | Main | Icecream & Firewalls »
Announcing NDesk.Options 0.2.1
I am pleased to announce the release of NDesk.Options 0.2.1. NDesk.Options is a C# program option parser library, inspired by Perl's Getopt::Long option parser.
To download, visit the NDesk.Options web page:
http://www.ndesk.org/Options
Usage
See http://www.ndesk.org/Options and the OptionSet documentation for examples.
What's New?
There have been several minor changes since the previous 0.2.0 release:
- The OptionSet base class has been changed from Collection<Option> to KeyedCollection<string, Option>, as KeyedCollection<string, Option> is conceptually closer to what OptionSet supports: one or more strings as aliases for a single Option.
- OptionSet.GetOptionForName() has been deprecated in favor of using KeyedCollection.Item(string).
- C# 2.0 Compatibility. The unit tests require a C# 3.0 compiler, but the actual option parser and related classes now only require a C# 2.0 compiler.
- Default argument handling support. This is useful for argument runs, in which the meaning of later options depends upon a prior argument, e.g.: mdoc-assemble --format=ecma A B --format=man C (where A and B are processed with --format=ecma in effect, while C is processed with --format=man in effect).
- The Option.Description property can now contain value formatting codes which are used by OptionSet.WriteOptionDescriptions().
- The Option.Description property is now automatically line-wrapped within OptionSet.WriteOptionDescriptions().
- ndesk-options.pc fixes for pkg-config.
- Unit tests now depend on NUnit and have been split out into separate files.