Table of Contents

Class EnvironmentVariables

Namespace
CENTREL.XIA.Configuration.Types
Assembly
CENTREL.XIA.Configuration.Types.dll

Represents the of environment variables configured on a Windows machine.

public class EnvironmentVariables : BypassSection
Inheritance
EnvironmentVariables
Inherited Members

Constructors

EnvironmentVariables()

Initializes a new instance of the CENTREL.XIA.Configuration.Types.EnvironmentVariables class.

public EnvironmentVariables()

Properties

Items

Gets or sets the items in the collection.

public EnvironmentVariableCollection Items { get; set; }

Property Value

EnvironmentVariableCollection

Methods

AddSystemVariable(string, string)

Adds a new system enivronment variable to the collection.

public void AddSystemVariable(string name, string value)

Parameters

name string

The name of the environment variable to add, with or without percentage % signs.

value string

The value of the variable.

Expand()

Expands any environment variables contained within the collection.

public void Expand()

Remarks

Note that several passes are made to ensure that all variables are expanded.

Expand(string)

Expands any environment variables contained within the specified string value.

public string Expand(string value)

Parameters

value string

The value to be expanded - for example "%TEMP%\output.xml".

Returns

string

The value with the environment variables expanded.

Remarks

Note that several passes are made to ensure that all variables are expanded.

FindByName(string)

Returns the environment variable with the specified name, or null if no variable with that name is found.

public EnvironmentVariable FindByName(string name)

Parameters

name string

The name of the environment variable with or without percentage % signs.

Returns

EnvironmentVariable

The environment variable with the specified name,

ToString()

Returns the environment variables as a human readable string - for example "10 Environment Variables" or "{Not Documented}".

public override string ToString()

Returns

string

The environment variables as a human readable string.