wx.Build.EnvironmentVarInfo Class Reference

Inheritance diagram for wx.Build.EnvironmentVarInfo:

Inheritance graph

List of all members.

Public Member Functions

void Append (string valueString)
 EnvironmentVarInfo (string varname, string description, Type t)
 EnvironmentVarInfo (string varname, string description, Type t, bool isMandatory)
override bool Equals (object obj)
delegate void EventHandler (EnvironmentVarInfo affectedVariable)
object Get ()
object Get (object defaultValue)
string GetAsString ()
override int GetHashCode ()
System.Xml.Schema.XmlSchema GetSchema ()
bool IsEmpty ()
void ReadXml (System.Xml.XmlReader reader)
bool SafeSet (object value)
bool SafeSet (string valueString)
void Set (string valueString)
override string ToString ()
void WriteXml (System.Xml.XmlWriter writer)

Static Public Attributes

static event EventHandler OnEnvVarChanged

Properties

string Description [get]
bool IsMandatory [get]
Type ValueType [get]
string Varname [get]


Detailed Description

Instances of this class describle the use of environment variables in IBuildActionClass. Instances of this class appear in IBuildActionClass.UsedVars. They declare the name of an environment variable that is used by a action, provide a text documentation, and a type object.

Constructor & Destructor Documentation

wx.Build.EnvironmentVarInfo.EnvironmentVarInfo ( string  varname,
string  description,
Type  t,
bool  isMandatory 
)

Creates an instance.

Parameters:
varname is the name of the environment variable.
description is a text description.
t is a supported type object. Values will be converted into this type. Currently supported types are System.Int32, system.Boolean, System.String, wy.Build.DirectoryName, and enumerations. This will raise an System.ArgumentException on all incompatible types.
isMandatory specifies that a valeu of this variable is required in order to produce the targets of those projects declaring this variable.

wx.Build.EnvironmentVarInfo.EnvironmentVarInfo ( string  varname,
string  description,
Type  t 
)

Creates an instance.

Parameters:
varname is the name of the environment variable.
description is a text description.
t is a supported type object. Values will be converted into this type. Currently supported types are System.Int32, system.Boolean, System.String, wy.Build.DirectoryName, and enumerations. This will raise an System.ArgumentException on all incompatible types.


Member Function Documentation

void wx.Build.EnvironmentVarInfo.Append ( string  valueString  ) 

Append valueString to the represented environment variable separated by a semicolon ';' or colon ':' (dependeing on platform).

override bool wx.Build.EnvironmentVarInfo.Equals ( object  obj  ) 

delegate void wx.Build.EnvironmentVarInfo.EventHandler ( EnvironmentVarInfo  affectedVariable  ) 

object wx.Build.EnvironmentVarInfo.Get (  ) 

Reads the value of this variable. Returns this as instance of ValueType. This will return null if the variable does not exist unless this is not mandatory. On mandatory variables, this will throw an exception on empty variables, If you want to avoid this exception, run IsEmpty().

object wx.Build.EnvironmentVarInfo.Get ( object  defaultValue  ) 

Returns the content of the environment variable.

Parameters:
defaultValue If the variable is not defined, this value will be returned.

string wx.Build.EnvironmentVarInfo.GetAsString (  ) 

Returns the current value of this variable as string. Result will be an empty string (nut null) if the variable is undefined.

override int wx.Build.EnvironmentVarInfo.GetHashCode (  ) 

System.Xml.Schema.XmlSchema wx.Build.EnvironmentVarInfo.GetSchema (  ) 

Returns null as suggested by the framework doc.

Returns:

bool wx.Build.EnvironmentVarInfo.IsEmpty (  ) 

True iff this variabel is either not defined or has an empty value. This also works for mandatory variables without exception.

void wx.Build.EnvironmentVarInfo.ReadXml ( System.Xml.XmlReader  reader  ) 

bool wx.Build.EnvironmentVarInfo.SafeSet ( object  value  ) 

Assigns the provided value to the environment. The value shall comply with the type of this variable. If this is not able to parse value after setting, the assignment will be made undone.

Parameters:
value The new value of the variable

bool wx.Build.EnvironmentVarInfo.SafeSet ( string  valueString  ) 

Assign valueString to the represented environment variable. This method will refuse to accept an assignment that cannot be parsed by Get(). In that case this will return false and the value of the variable will remain to be the old one. This is exception safe.

void wx.Build.EnvironmentVarInfo.Set ( string  valueString  ) 

Assign valueString to the represented environment variable. This method will refuse to accept an assignment that cannot be parsed by Get() and raise an exception.

override string wx.Build.EnvironmentVarInfo.ToString (  ) 

void wx.Build.EnvironmentVarInfo.WriteXml ( System.Xml.XmlWriter  writer  ) 


Member Data Documentation

event EventHandler wx.Build.EnvironmentVarInfo.OnEnvVarChanged [static]

Will be raised after changing an environment variable using Set().


Property Documentation

string wx.Build.EnvironmentVarInfo.Description [get]

bool wx.Build.EnvironmentVarInfo.IsMandatory [get]

True iff this variable needs to have a value in order to enable certain tools. This will, for instance, be true if a tool gets some required path information from a variable.

Type wx.Build.EnvironmentVarInfo.ValueType [get]

This is the type that will be used in tools parsing the variable value. Supported values are currently string , int , and enumerations.

string wx.Build.EnvironmentVarInfo.Varname [get]


The wx.NET Build System.   (c) 2009-2010 Harald Meyer auf'm Hofe