 | CommandLineAccess class |
Access to command line parameters
Implements IGetStringValue.
Minimal functionality:
If the transferred key exists in the command line,
this is returned unchanged, otherwise the
Default Value.
If the transferred key is numeric, an attempt is made to recognise it with
to access it as an index in the command line parameters;
If successful, the corresponding value is returned,
otherwise the default value.
Inheritance hierarchy Namespace: NetEti.ApplicationEnvironmentAssembly: NetEti.CommandLineAccess (in NetEti.CommandLineAccess.dll) Version: 1.0.0+3107384b301fc859aaac3a434ff023e72488deba
Syntaxpublic class CommandLineAccess : IGetStringValue
Public Class CommandLineAccess
Implements IGetStringValue
public ref class CommandLineAccess : IGetStringValue
type CommandLineAccess =
class
interface IGetStringValue
end
The CommandLineAccess Type exposes the following members.
Constructors
Properties | Name | Description of the |
---|
 | CommandLine |
Returns the command line as a string.
|
 | Description |
Returns a descriptive name of this StringValueGetter,
e.g. name plus source path if applicable.
|
Back to the top
Methods | Name | Description of the |
---|
 | GetStringValue |
Returns exactly one value for a key. If there is no value for the
key, defaultValue is returned.
|
 | GetStringValues |
Returns a string array for a key. If there is no value for the
key, defaultValue is returned.
Returns only a single value packed as an array, may have to be
be extended.
|
Back to the top
Remarks
File: CommandLineAccess.cs
Author: Erik Nagel, NetEti
13/03/2012 Erik Nagel: created
04.06.2014 Erik Nagel: Resolve named parameters (/name=xyz or -name=xyz)
10.04.2020 Erik Nagel: For resolution by numeric key (position number of the argument)
Parameters preceded by '/' or '-' are excluded.
See also