Main Page Options

From NDesk

Revision as of 22:50, 26 January 2008 by JonPryor (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

NDesk.Options is a callback-based program option parser for C#.

Contents

NDesk.Options Releases

NDesk.Options has had the following releases (in reverse chronological order):

Features

OptionSet currently supports:

  • Boolean options of the form: -flag, --flag, and /flag. Boolean parameters can have a `+' or `-' appended to explicitly enable or disable the flag (in the same fashion as mcs -debug+). For boolean callbacks, the provided value is non-null for enabled, and null for disabled.
  • Value options with a required value (append `=' to the option name) or an optional value (append `:' to the option name). The option value can either be in the current option (--opt=value) or in the following parameter (--opt value). The actual value is provided as the parameter to the callback delegate, unless it's (1) optional and (2) missing, in which case null is passed.
  • Bundled parameters which must start with a single `-' and consists of only single characters. In this manner, -abc would be a shorthand for -a -b -c.
  • Option processing is disabled when -- is encountered.

Documentation

Class Documentation.

Development

A git repository is available:

git-clone git://git.ndesk.org/pub/scm/ndesk-options
Retrieved from "http://ndesk.org/Options"