-
Notifications
You must be signed in to change notification settings - Fork 9
Environment
Craig edited this page Nov 2, 2018
·
4 revisions
The Nettle environment provides information about, and means to manipulate, the current environment. The environment is managed by the static NettleEnvironment class. There available methods are listed below.
By default, the environment variables collection contains a list of all variable values found in the System.Environment class using the GetEnvironmentVariables method.
Retrieves the value of a Nettle environment variable. Example:
var path = NettleEnvironment.GetEnvironmentVariable
(
"SystemRoot"
);
Debug.WriteLine(path);
// Displays C:\Windows
Sets the value of a Nettle environment variable. Example:
NettleEnvironment.SetEnvironmentVariable
(
"NettleNuGetUrl",
"https://www.nuget.org/packages/Nettle"
);
There is a GetEnvironmentVariable function that can be used in templates to retrieve environment variables with Nettle.
Example:
{{@GetEnvironmentVariable("NettleNuGetUrl")}}
Renders:
https://www.nuget.org/packages/Nettle