Search

The Command Line Parser Library offers to CLR applications a simple programming interface for manipulating command line input. This library allows you to display an help screen with a good degree of customization. This API tries to keep on his shoulders all that is boring and repetitive to be programmed.
It provides a solid parsing API constantly updated since 2005.

Latest available stable download: 1.8 stable.
Latest available download: 1.8.0.7 beta.
Latest available version on source code control: 1.9.0.1 alfa (released 19 Sep 2011).

Overview

The command line input, read from the standard entry point as string array, is then pushed in an instance of a custom type decorated with library attributes. You just create this class with one field for each option value you want to make persistent (and a special field for non-option values). Rules about command line options are engraved in your custom type from library attributes.

  1. The library source code contains a sample application that will clarify all told up to this moment. In this sample you'll not find how to use mutually exclusive options, please read this test source file.
  2. More informations on User Guide.
  3. A new feature (OptionArray attribute), introduced from version 1.7.0.1 alfa, allow a greater flexibility in the parsing process.

Consuming The Code

The project is entirely written in C# and is also thought to be included in another (C#) project. Anyway you can reference the library as binary DLL file, consuming it from any .NET language. Depending on your IDE, it's possible to take advantage of documentation comments attached to any publicly visible member.

Input Specification

Reason To Use

  1. Remove from each application the code specific for command line parsing.
  2. Promote code reuse through a consistent, clear and easy to use API.
  3. The API is lightweight, has no external dependencies and is easy to integrate within an application.
  4. The project and its documentation are continuously updated and extended.
  5. It has been used for years in closed and open source projects.
  6. This project has also grown through the interaction of enthusiastic users and from constructive criticism.
  7. Comments and various types of communication are taken seriously by the author.

Compatibility

  • CSharp 3.0+
  • .NET Framework 2.0+
  • Mono Profile 2.1+

Each stable release is also tested under Mono on Linux. This project contains unit tests from first release.

Contributor(s)

  • Steven Evans (blog)

Projects using this library

Contacts & Other

For go deeper on the usage, for bug reports and features requests:

Remember also to take advantage of all greats CodePlex features (like Discussions and Issue Tracker).

Please Support

If you use this project and you want help the author to keep it updated, please consider make a donation.
Donations are made through PayPal Donate button present below and in the author's blog at gsscoder.blogspot.com.

PayPal - The safer, easier way to pay online!

Last edited Oct 4 2011 at 8:15 PM by gsscoder, version 110
Updating...
© 2006-2012 Microsoft | Get Help | Privacy Statement | Terms of Use | Code of Conduct | Advertise With Us | Version 2012.1.11.18365