Attributes

You can declare your properties with some of the following Attributes:

ShortOptionName

Defines a second optionaly (short) name for your option.
[ShortOptionName("u")]
public string UserName { get; private set; } 
This option will be available via "/username" or via "/u".

OptionName

The normal option name equals to the property name. With this attribute you can override the default behaviour.
[ShortOptionName("n"), OptionName("name")]
public string ServiceName { get; private set; } 
This option will be available via "/name" or via "/n".

DefaultValue

Defines the default value if no matching argument was provided.
[DefaultValue("Mongrel Service")]
public string DisplayName { get; private set; }

Description

Describes the option. Used for the help function.
[ShortOptionName("u"), Description("The user name starting the service")]
public string UserName { get; private set; }

Last edited Jul 26, 2009 at 12:34 PM by twenzel, version 1

Comments

No comments yet.