[This is preliminary documentation and is subject to change.]
Provides implementation of configuration based on arguments supplied from command line
which is "string[]". Arguments start with either "/" or "-" prefix. If any argument is not
prefixed then it is written as an auto-named attribute node of the root with its value set, otherwise a section (under root) with
argument's name is created. Any argument may have options. Any option may either consist of name
or name value pair delimited by "=".
Argument options are written as attribute nodes of their corresponding sections.
If option value specified without name (without "=") then option is auto-named
Inheritance Hierarchy

NFX.Environment Configuration
NFX.Environment CommandArgsConfiguration
Namespace: NFX.Environment
Assembly: NFX (in NFX.dll) Version: 3.0.0.1 (3.0.0.1)
Syntax
Examples
c:\>dosomething.exe "c:\input.file" "d:\output.file" -compress level=100 method=zip -shadow fast -large
[args ?1="c:\input.file" ?2="c:\output.file"] [compress level="100" method="zip"] [shadow ?1="fast"] [large]
var conf = new CmdArgsConfiguration(args); var inFile = conf.Root.AttrByIndex(0).ValueAsString(DEFAULT_INPUT_FILE); var outFile = conf.Root.AttrByIndex(1).ValueAsString(DEFAULT_OUTPUT_FILE); ..... if (conf.Root["large"].Exists) ....... ..... var level = conf.Root["compress"].AttrByName("level").ValueAsInt(DEFAULT_COMPRESSION_LEVEL); .....
See Also