Show / Hide Table of Contents

Class EnvironmentVariables

This class defines the structure of environment variables

Inheritance
Object
EnvironmentVariables
Namespace: AxaFrance.WebEngine
Assembly: AxaFrance.WebEngine.dll
Syntax
[Serializable]
public class EnvironmentVariables

Constructors

| Edit this page View Source

EnvironmentVariables()

default constructor

Declaration
public EnvironmentVariables()

Properties

| Edit this page View Source

Current

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
| Edit this page View Source

Variables

List of variables

Declaration
public List<Variable> Variables { get; set; }
Property Value
Type Description
List<Variable>

Methods

| Edit this page View Source

GetValue(String)

Returns the value of the environment variable by its given name.

Declaration
public string GetValue(string name)
Parameters
Type Name Description
String name

Name of the variable to find.

Returns
Type Description
String

Value of the variable

| Edit this page View Source

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
Stream stream

the stream which the environment variables are stored

| Edit this page View Source

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
String xmlFile

The path of the XML file

  • Edit this page
  • View Source
In this article
Back to top Copyright ® 2016-2024 AXA France, All rights reserved.