Class EnvironmentVariables
This class defines the structure of environment variables
Inheritance
Namespace: AxaFrance.WebEngine
Assembly: AxaFrance.WebEngine.dll
Syntax
[Serializable]
public class EnvironmentVariables
Constructors
| Improve this Doc View SourceEnvironmentVariables()
default constructor
Declaration
public EnvironmentVariables()
Properties
| Improve this Doc View SourceCurrent
Environment Variables currently loaded. If variables are not loaded by calling LoadFrom() method, it will returns null.
Attention: if there are already variables loaded and LoadFrom method are called again. all variables are cleaned before the second call is done
Declaration
public static EnvironmentVariables Current { get; }
Property Value
Type | Description |
---|---|
EnvironmentVariables |
Variables
List of variables
Declaration
public List<Variable> Variables { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<Variable> |
Methods
| Improve this Doc View SourceGetValue(String)
Returns the value of the environment variable by its given name.
Declaration
public string GetValue(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the variable to find. |
Returns
Type | Description |
---|---|
System.String | Value of the variable |
LoadFrom(Stream)
Load the environment variables from an Stream the stream data is in XML format
Declaration
public static void LoadFrom(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | the stream which the environment variables are stored |
LoadFrom(String)
Load the environment variables from an XML file.
the path should be full path
UNC path is supported: \netshare\path\somefile.xml
Web path is NOT supported. e.g.: http://somewhere.com/somefile.xml
Make sure that the automation solution has the access rights to the file, or an exception will be thrown.Declaration
public static void LoadFrom(string xmlFile)
Parameters
Type | Name | Description |
---|---|---|
System.String | xmlFile | The path of the XML file |