Skip to content

BasePreprocessorExtension Class

Base class for creating a preprocessor extension.

MethodDescription
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.
PropertyDescription
ContextContext for use by the extension.
MessagingMessaging for use by the extension.
PrefixesGets or sets the variable prefixes for the extension.
PreprocessHelperPreprocessHelper 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.

public string EvaluateFunction(
string prefix,
string function,
System.String[] args
)
ParameterTypeDescription
prefixstringThe prefix of the function to be processed by the extension.
functionstringThe name of the function.
argsSystem.String[]The list of arguments.

string The value of the function or null if the function is not defined.

Gets the value of a variable whose prefix matches the extension.

public string GetVariableValue(
string prefix,
string name
)
ParameterTypeDescription
prefixstringThe prefix of the variable to be processed by the extension.
namestringThe name of the variable.

string The value of the variable or null if the variable is undefined.

Called at the end of the preprocessing of a source file.

public void PostPreprocess()

Called at the beginning of the preprocessing of a source file.

public void PrePreprocess()

ProcessPragma(prefix, pragma, args, parent) Method

Section titled “ProcessPragma(prefix, pragma, args, parent) Method”

Processes a pragma defined in the extension.

public bool ProcessPragma(
string prefix,
string pragma,
string args,
System.Xml.Linq.XContainer parent
)
ParameterTypeDescription
prefixstringThe prefix of the pragma to be processed by the extension.
pragmastringThe name of the pragma.
argsstringThe pragma’s arguments.
parentSystem.Xml.Linq.XContainerThe parent node of the pragma.

bool false if the pragma is not defined.

Context for use by the extension.

protected Data.IPreprocessContext Context { get; set; }

Messaging for use by the extension.

protected Services.IMessaging Messaging { get; set; }

Gets or sets the variable prefixes for the extension.

public System.String[] Prefixes { get; set; }

PreprocessHelper for use by the extension.

protected Services.IPreprocessHelper PreprocessHelper { get; set; }