BasePreprocessorExtension Class
Base class for creating a preprocessor extension.
Methods
Section titled “Methods”| Method | Description |
|---|---|
| EvaluateFunction(prefix, function, args) | Evaluates a function defined in the extension. |
| GetVariableValue(prefix, name) | Gets the value of a variable whose prefix matches the extension. |
| PostPreprocess() | Called at the end of the preprocessing of a source file. |
| PrePreprocess() | Called at the beginning of the preprocessing of a source file. |
| ProcessPragma(prefix, pragma, args, parent) | Processes a pragma defined in the extension. |
Properties
Section titled “Properties”| Property | Description |
|---|---|
| Context | Context for use by the extension. |
| Messaging | Messaging for use by the extension. |
| Prefixes | Gets or sets the variable prefixes for the extension. |
| PreprocessHelper | PreprocessHelper for use by the extension. |
WixToolset.Extensibility.dll version 5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8 |
EvaluateFunction(prefix, function, args) Method
Section titled “EvaluateFunction(prefix, function, args) Method”Evaluates a function defined in the extension.
Declaration
Section titled “Declaration”public string EvaluateFunction( string prefix, string function, System.String[] args)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| prefix | string | The prefix of the function to be processed by the extension. |
| function | string | The name of the function. |
| args | System.String[] | The list of arguments. |
Return value
Section titled “Return value”string The value of the function or null if the function is not defined.
GetVariableValue(prefix, name) Method
Section titled “GetVariableValue(prefix, name) Method”Gets the value of a variable whose prefix matches the extension.
Declaration
Section titled “Declaration”public string GetVariableValue( string prefix, string name)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| prefix | string | The prefix of the variable to be processed by the extension. |
| name | string | The name of the variable. |
Return value
Section titled “Return value”string The value of the variable or null if the variable is undefined.
PostPreprocess() Method
Section titled “PostPreprocess() Method”Called at the end of the preprocessing of a source file.
Declaration
Section titled “Declaration”public void PostPreprocess()PrePreprocess() Method
Section titled “PrePreprocess() Method”Called at the beginning of the preprocessing of a source file.
Declaration
Section titled “Declaration”public void PrePreprocess()ProcessPragma(prefix, pragma, args, parent) Method
Section titled “ProcessPragma(prefix, pragma, args, parent) Method”Processes a pragma defined in the extension.
Declaration
Section titled “Declaration”public bool ProcessPragma( string prefix, string pragma, string args, System.Xml.Linq.XContainer parent)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| prefix | string | The prefix of the pragma to be processed by the extension. |
| pragma | string | The name of the pragma. |
| args | string | The pragma’s arguments. |
| parent | System.Xml.Linq.XContainer | The parent node of the pragma. |
Return value
Section titled “Return value”bool false if the pragma is not defined.
Context Property
Section titled “Context Property”Context for use by the extension.
Declaration
Section titled “Declaration”protected Data.IPreprocessContext Context { get; set; }Messaging Property
Section titled “Messaging Property”Messaging for use by the extension.
Declaration
Section titled “Declaration”protected Services.IMessaging Messaging { get; set; }Prefixes Property
Section titled “Prefixes Property”Gets or sets the variable prefixes for the extension.
Declaration
Section titled “Declaration”public System.String[] Prefixes { get; set; }PreprocessHelper Property
Section titled “PreprocessHelper Property”PreprocessHelper for use by the extension.
Declaration
Section titled “Declaration”protected Services.IPreprocessHelper PreprocessHelper { get; set; }