Table of Contents

Class CommandLine

Namespace
Ranorex.Core
Assembly
Ranorex.Core.dll

Represents command line arguments passed to an application.

public class CommandLine
Inheritance
CommandLine
Inherited Members

Constructors

CommandLine(string)

Creates a new CommandLine, parsing the specified command line argument string.

public CommandLine(string cmdLine)

Parameters

cmdLine string

The command line string to parse.

Exceptions

RanorexException

If parsing the cmdLine fails.

Properties

Arguments

A list of non-parameter command line arguments.

public IList<string> Arguments { get; }

Property Value

IList<string>

EnvironmentCommandLine

Gets a command line instance for the Environment.CommandLine.

public static CommandLine EnvironmentCommandLine { get; }

Property Value

CommandLine

Exceptions

RanorexException

If parsing the Environment.CommandLine fails.

ParameterLists

A dictionary of lists of command line parameters.
For example, the command line /include:a /include:b would result in the dictionary ["include" -> "a", "b"]

public IDictionary<string, List<string>> ParameterLists { get; }

Property Value

IDictionary<string, List<string>>

Parameters

A name-value dictionary of command line parameters.

public IDictionary<string, string> Parameters { get; }

Property Value

IDictionary<string, string>

Methods

ToString()

Converts back to a command line string. Arguments are listed before parameters. Both sorted alphabetically to always produce deterministic result.

public override string ToString()

Returns

string

Alphabetically sorted command line string.