IReadOnlyEnvironmentVariables.TryGetVariable Method

Definition

Tries to get the value of the specified environment variable.

C#
public bool TryGetVariable (string variable, out Microsoft.Testing.Platform.Extensions.TestHostControllers.OwnedEnvironmentVariable? environmentVariable);

Parameters

variable
String

The name of the environment variable.

environmentVariable
OwnedEnvironmentVariable

When this method returns, contains the value of the environment variable, if it is found; otherwise, null.

Returns

true if the environment variable is found; otherwise, false.

Applies to

Produkt Versionen
Microsoft Testing Platform 1.0.2, 1.1.0, 1.2.1, 1.3.2, 1.4.3, 1.5.3, 1.6.0