I made some updates on my command line parser for .net .
It now supports aliases and you can set whether the parameter should accept a value or not so you can use -foo bar
where foo
doesn’t accept a value and therefore bar
is regognized as a position dependand parameter.
An example parameter definition:
[Parameter(Position = 0, IsMandatory = true, AcceptsNoValue = false, Name = "folder", Description = "The folder", Aliases = new string[]{"target"})] public string FolderParameter { get { return _FolderParameter; } set { _FolderParameter = value; } }
(Ignore the slashes placed before the quotes, wordpress seems to add them automaticly) I also have added the Intrepid.Automation.CommandLine.OutputHelp
function, which outputs help for the parameters of an object to a stream. Like this:
SUMMARY
Creates playlists in a folder and its subfoldersPARAMETERS
-target[String excludefilter = NULL] (efilter)
Only files not matching this regex are included[String includefilter = NULL] (ifilter)
Only files matching this regex are includedString folder (target)
The folder[Boolean expand]
Whether to expand referenced m3u’sREMARKS
m3u playlists are automaticly excluded; use -excludefilter to add additional excludes.
You can still download the Intrepid.Clorelib assembly here and you still may only use it for non-commercial open-source usage and may not change/reverse engineer/etc it in any way.
Hope it will prove usefull :-).