-
Couldn't load subscription status.
- Fork 288
Mapping Properties To Options
gsscoder edited this page May 21, 2012
·
25 revisions
You can map almost any data type to command line option.
Scalar values are mapped using OptionAttribute type. Let's define a string option.
class Options
{
[Option("p", "person-to-greet", DefaultValue="World")]
public string PersonToGreet { get; set; }
}Everything passed to -p or --person-to-great option will be loaded into Options::PersonToGreat instance property. This option is not required (default Required = false) ...
[to complete...]