Click or drag to resize

CommandLineSubstituteArgumentList Method

Given an array of strings, containing batch style placeholders for environment variables and numbered parameters, the placeholders are replaced by the referred parameter values.

Namespace:  Mastersign.Bench
Assembly:  BenchLib (in BenchLib.dll) Version: 0.22.0.0 (0.22.0.0)
Syntax
public static string SubstituteArgumentList(
	string[] values,
	string[] parameters
)

Parameters

values
Type: SystemString
A number of strings possibly with placeholders for environment varibales and numbered parameters. Environment variables are written as %NAME%, and numbered parameters are written as %x, with x beeing a digit from 0 to 9.
parameters
Type: SystemString
An array with ordered parameter strings.

Return Value

Type: String
An array with the substituted strings.
Examples
Given the environment variable MY_DIR with a value of C:\my-dir, and an array with ["a", "b"] for parameters, the array with ["-out", "%MY_DIR%\result", "-msg", "%2 + %1 = ?"] for values is substituted into the following array: ["-out", "C:\my-dir\result", "-msg", "b + a = ?"].
See Also