Skip to content

IParseHelper Interface

Interface provided to help compiler and optimizer extensions parse.

MethodDescription
ContainsProperty(possibleProperty)Checks if the string contains a property (i.e. “foo[Property]bar”)
CreateComplexReference(section, sourceLineNumbers, parentType, parentId, parentLanguage, childType, childId, isPrimary)Creates WixComplexReference and WixGroup symbols in the active section.
CreateCustomActionReference(sourceLineNumbers, section, customAction, platform, supportedPlatforms)Create a reference in the specified section for a custom action specialized for specific platforms, given standard prefixes for naming and suffixes for platforms.
CreateDirectorySymbol(section, sourceLineNumbers, id, parentId, name, shortName, sourceName, shortSourceName)Creates a directory row from a name.
CreateGuid(namespaceGuid, value)Creates a version 3 name-based UUID.
CreateIdentifier(prefix, args)Create an identifier by hashing data from the row.
CreateIdentifierFromFilename(filename)Create an identifier based on passed file name
CreateIdentifierValueFromPlatform(name, currentPlatform, supportedPlatforms)Append a suffix to the given name based on the current platform. If the current platform is not in the supported platforms, then it returns null.
CreateRegistrySymbol(section, sourceLineNumbers, root, key, name, value, componentId, valueType, valueAction)Creates a Registry symbol in the active section.
CreateRegistrySymbol(section, sourceLineNumbers, root, key, name, value, componentId)Creates a numeric Registry symbol in the active section.
CreateSimpleReference(section, sourceLineNumbers, symbolName, primaryKey)Create a WixSimpleReference symbol in the active section.
CreateSimpleReference(section, sourceLineNumbers, symbolName, primaryKeys)Create a WixSimpleReference symbol in the active section.
CreateSimpleReference(section, sourceLineNumbers, symbolDefinition, primaryKey)Create a WixSimpleReference symbol in the active section.
CreateSimpleReference(section, sourceLineNumbers, symbolDefinition, primaryKeys)Create a WixSimpleReference symbol in the active section.
CreateSymbol(section, sourceLineNumbers, symbolName, identifier)Creates a symbol in the section.
CreateSymbol(section, sourceLineNumbers, symbolDefinition, identifier)Creates a symbol in the section.
CreateWixGroupSymbol(section, sourceLineNumbers, parentType, parentId, childType, childId)A symbol in the WixGroup table is added for this child node and its parent node.
CreateWixSearchRelationSymbol(section, sourceLineNumbers, id, parentId, attributes)
CreateWixSearchSymbol(section, sourceLineNumbers, elementName, id, variable, condition, after, bootstrapperExtensionId)Creates a symbol in the WixSearch table.
EnsureTable(section, sourceLineNumbers, tableName)Add the appropriate symbols to make sure that the given table shows up in the resulting output.
EnsureTable(section, sourceLineNumbers, tableDefinition)Add the appropriate symbols to make sure that the given table shows up in the resulting output.
GetAttributeBundleVariableNameIdentifier(sourceLineNumbers, attribute)Gets a bundle variable name identifier and displays an error for an illegal value.
GetAttributeBundleVariableNameValue(sourceLineNumbers, attribute, nameRule)Gets a bundle variable name value and displays an error for an illegal value.
GetAttributeGuidValue(sourceLineNumbers, attribute, generatable, canBeEmpty)Get a guid attribute value and displays an error for an illegal guid value.
GetAttributeIdentifier(sourceLineNumbers, attribute)Get an identifier attribute value and displays an error for an illegal identifier value.
GetAttributeIdentifierValue(sourceLineNumbers, attribute)Get an identifier attribute value and displays an error for an illegal identifier value.
GetAttributeIntegerValue(sourceLineNumbers, attribute, minimum, maximum)Get an integer attribute value and displays an error for an illegal integer value.
GetAttributeLongFilename(sourceLineNumbers, attribute, allowWildcards, allowRelative)Gets a long filename value and displays an error for an illegal long filename value.
GetAttributeLongValue(sourceLineNumbers, attribute, minimum, maximum)Get a long integral attribute value and displays an error for an illegal long value.
GetAttributeRegistryRootValue(sourceLineNumbers, attribute, allowHkmu)Gets a RegistryRootType value and displays an error for an illegal value.
GetAttributeValue(sourceLineNumbers, attribute, emptyRule)Get an attribute value and displays an error if the value is empty by default.
GetAttributeVersionValue(sourceLineNumbers, attribute)Gets a version value or possibly a binder variable and displays an error for an illegal version value.
GetAttributeYesNoDefaultValue(sourceLineNumbers, attribute)Gets a yes/no/default value and displays an error for an illegal yes/no/default value.
GetAttributeYesNoValue(sourceLineNumbers, attribute)Gets a yes/no value and displays an error for an illegal yes/no value.
GetConditionInnerText(node)Gets node’s inner text and ensure’s it is safe for use in a condition by trimming any extra whitespace.
GetSourceLineNumbers(element)Gets a source line number for an element.
GetTrimmedInnerText(element)Get an element’s inner text and trims any extra whitespace.
InnerTextDisallowed(element)Validates that the element does not contain inner text.
InnerTextDisallowed(element, attributeName)Validates that the element does not contain inner text and suggests which attribute to use instead.
IsValidIdentifier(value)Verifies that a value is a legal identifier.
IsValidLocIdentifier(identifier)Verifies if an identifier is a valid loc identifier.
IsValidLongFilename(filename, allowWildcards, allowRelative)Verifies if a filename is a valid long filename.
IsValidShortFilename(filename, allowWildcards)Verifies if a filename is a valid short filename.
ScheduleActionSymbol(section, sourceLineNumbers, access, sequence, name, condition, beforeAction, afterAction, overridable)Schedules an action symbol.
UnexpectedAttribute(element, attribute)Called when the compiler encounters an unexpected attribute.
UnexpectedElement(parentElement, childElement)Called when the compiler encounters an unexpected child element.
WixToolset.Extensibility.dll version 5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8

Checks if the string contains a property (i.e. “foo[Property]bar”)

public bool ContainsProperty(
string possibleProperty
)
ParameterTypeDescription
possiblePropertystringString to evaluate for properties.

bool True if a property is found in the string.

CreateComplexReference(section, sourceLineNumbers, parentType, parentId, parentLanguage, childType, childId, isPrimary) Method

Section titled “CreateComplexReference(section, sourceLineNumbers, parentType, parentId, parentLanguage, childType, childId, isPrimary) Method”

Creates WixComplexReference and WixGroup symbols in the active section.

public void CreateComplexReference(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
WixToolset.Data.ComplexReferenceParentType parentType,
string parentId,
string parentLanguage,
WixToolset.Data.ComplexReferenceChildType childType,
string childId,
bool isPrimary
)
ParameterTypeDescription
sectionWixToolset.Data.IntermediateSectionSection to create the reference in.
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information.
parentTypeWixToolset.Data.ComplexReferenceParentTypeThe parent type.
parentIdstringThe parent id.
parentLanguagestringThe parent language.
childTypeWixToolset.Data.ComplexReferenceChildTypeThe child type.
childIdstringThe child id.
isPrimaryboolWhether the child is primary.

CreateCustomActionReference(sourceLineNumbers, section, customAction, platform, supportedPlatforms) Method

Section titled “CreateCustomActionReference(sourceLineNumbers, section, customAction, platform, supportedPlatforms) Method”

Create a reference in the specified section for a custom action specialized for specific platforms, given standard prefixes for naming and suffixes for platforms.

public void CreateCustomActionReference(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
WixToolset.Data.IntermediateSection section,
string customAction,
WixToolset.Data.Platform platform,
WixToolset.Extensibility.Data.CustomActionPlatforms supportedPlatforms
)
ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information.
sectionWixToolset.Data.IntermediateSectionSection to create the reference in.
customActionstringThe custom action base name.
platformWixToolset.Data.PlatformThe platform being compiled.
supportedPlatformsWixToolset.Extensibility.Data.CustomActionPlatformsThe platforms for which there are specialized custom actions.

CreateDirectorySymbol(section, sourceLineNumbers, id, parentId, name, shortName, sourceName, shortSourceName) Method

Section titled “CreateDirectorySymbol(section, sourceLineNumbers, id, parentId, name, shortName, sourceName, shortSourceName) Method”

Creates a directory row from a name.

public WixToolset.Data.Identifier CreateDirectorySymbol(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
WixToolset.Data.Identifier id,
string parentId,
string name,
string shortName,
string sourceName,
string shortSourceName
)
ParameterTypeDescription
sectionWixToolset.Data.IntermediateSectionSection to add the new symbol to.
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information.
idWixToolset.Data.IdentifierOptional identifier for the new row.
parentIdstringOptional identifier for the parent row.
namestringLong name of the directory.
shortNamestringOptional short name of the directory.
sourceNamestringOptional source name for the directory.
shortSourceNamestringOptional short source name for the directory.

WixToolset.Data.Identifier Identifier for the newly created row.

Creates a version 3 name-based UUID.

public string CreateGuid(
System.Guid namespaceGuid,
string value
)
ParameterTypeDescription
namespaceGuidSystem.GuidThe namespace UUID.
valuestringThe value.

string The generated GUID for the given namespace and value.

Create an identifier by hashing data from the row.

public WixToolset.Data.Identifier CreateIdentifier(
string prefix,
System.String[] args
)
ParameterTypeDescription
prefixstringThree letter or less prefix for generated row identifier.
argsSystem.String[]Information to hash.

WixToolset.Data.Identifier The new identifier.

CreateIdentifierFromFilename(filename) Method

Section titled “CreateIdentifierFromFilename(filename) Method”

Create an identifier based on passed file name

public WixToolset.Data.Identifier CreateIdentifierFromFilename(
string filename
)
ParameterTypeDescription
filenamestringFile name to generate identifier from

WixToolset.Data.Identifier The new identifier.

CreateIdentifierValueFromPlatform(name, currentPlatform, supportedPlatforms) Method

Section titled “CreateIdentifierValueFromPlatform(name, currentPlatform, supportedPlatforms) Method”

Append a suffix to the given name based on the current platform. If the current platform is not in the supported platforms, then it returns null.

public string CreateIdentifierValueFromPlatform(
string name,
WixToolset.Data.Platform currentPlatform,
WixToolset.Extensibility.Data.BurnPlatforms supportedPlatforms
)
ParameterTypeDescription
namestringThe base name for the identifier.
currentPlatformWixToolset.Data.PlatformThe platform being compiled.
supportedPlatformsWixToolset.Extensibility.Data.BurnPlatformsThe platforms for which there are specialized implementations.

string The generated identifier value, or null if the current platform isn’t supported.

CreateRegistrySymbol(section, sourceLineNumbers, root, key, name, value, componentId, valueType, valueAction) Method

Section titled “CreateRegistrySymbol(section, sourceLineNumbers, root, key, name, value, componentId, valueType, valueAction) Method”

Creates a Registry symbol in the active section.

public WixToolset.Data.Identifier CreateRegistrySymbol(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
WixToolset.Data.Symbols.RegistryRootType root,
string key,
string name,
string value,
string componentId,
WixToolset.Data.Symbols.RegistryValueType valueType,
WixToolset.Data.Symbols.RegistryValueActionType valueAction
)
ParameterTypeDescription
sectionWixToolset.Data.IntermediateSectionActive section.
sourceLineNumbersWixToolset.Data.SourceLineNumberSource and line number of the current symbol.
rootWixToolset.Data.Symbols.RegistryRootTypeThe registry entry root.
keystringThe registry entry key.
namestringThe registry entry name.
valuestringThe registry entry value.
componentIdstringThe component which will control installation/uninstallation of the registry entry.
valueTypeWixToolset.Data.Symbols.RegistryValueTypeThe registry value type. Default is string.
valueActionWixToolset.Data.Symbols.RegistryValueActionTypeThe way to apply the registry value. Default is write.

CreateRegistrySymbol(section, sourceLineNumbers, root, key, name, value, componentId) Method

Section titled “CreateRegistrySymbol(section, sourceLineNumbers, root, key, name, value, componentId) Method”

Creates a numeric Registry symbol in the active section.

public WixToolset.Data.Identifier CreateRegistrySymbol(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
WixToolset.Data.Symbols.RegistryRootType root,
string key,
string name,
int value,
string componentId
)
ParameterTypeDescription
sectionWixToolset.Data.IntermediateSectionActive section.
sourceLineNumbersWixToolset.Data.SourceLineNumberSource and line number of the current symbol.
rootWixToolset.Data.Symbols.RegistryRootTypeThe registry entry root.
keystringThe registry entry key.
namestringThe registry entry name.
valueintThe numeric registry entry value.
componentIdstringThe component which will control installation/uninstallation of the registry entry.

CreateSimpleReference(section, sourceLineNumbers, symbolName, primaryKey) Method

Section titled “CreateSimpleReference(section, sourceLineNumbers, symbolName, primaryKey) Method”

Create a WixSimpleReference symbol in the active section.

public void CreateSimpleReference(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
string symbolName,
string primaryKey
)
ParameterTypeDescription
sectionWixToolset.Data.IntermediateSectionActive section.
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information for the row.
symbolNamestringThe symbol name of the simple reference.
primaryKeystringThe primary key of the simple reference.

CreateSimpleReference(section, sourceLineNumbers, symbolName, primaryKeys) Method

Section titled “CreateSimpleReference(section, sourceLineNumbers, symbolName, primaryKeys) Method”

Create a WixSimpleReference symbol in the active section.

public void CreateSimpleReference(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
string symbolName,
System.String[] primaryKeys
)
ParameterTypeDescription
sectionWixToolset.Data.IntermediateSectionActive section.
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information for the row.
symbolNamestringThe symbol name of the simple reference.
primaryKeysSystem.String[]The primary keys of the simple reference.

CreateSimpleReference(section, sourceLineNumbers, symbolDefinition, primaryKey) Method

Section titled “CreateSimpleReference(section, sourceLineNumbers, symbolDefinition, primaryKey) Method”

Create a WixSimpleReference symbol in the active section.

public void CreateSimpleReference(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
WixToolset.Data.IntermediateSymbolDefinition symbolDefinition,
string primaryKey
)
ParameterTypeDescription
sectionWixToolset.Data.IntermediateSectionActive section.
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information for the row.
symbolDefinitionWixToolset.Data.IntermediateSymbolDefinitionThe symbol definition of the simple reference.
primaryKeystringThe primary key of the simple reference.

CreateSimpleReference(section, sourceLineNumbers, symbolDefinition, primaryKeys) Method

Section titled “CreateSimpleReference(section, sourceLineNumbers, symbolDefinition, primaryKeys) Method”

Create a WixSimpleReference symbol in the active section.

public void CreateSimpleReference(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
WixToolset.Data.IntermediateSymbolDefinition symbolDefinition,
System.String[] primaryKeys
)
ParameterTypeDescription
sectionWixToolset.Data.IntermediateSectionActive section.
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information for the row.
symbolDefinitionWixToolset.Data.IntermediateSymbolDefinitionThe symbol definition of the simple reference.
primaryKeysSystem.String[]The primary keys of the simple reference.

CreateSymbol(section, sourceLineNumbers, symbolName, identifier) Method

Section titled “CreateSymbol(section, sourceLineNumbers, symbolName, identifier) Method”

Creates a symbol in the section.

public WixToolset.Data.IntermediateSymbol CreateSymbol(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
string symbolName,
WixToolset.Data.Identifier identifier
)
ParameterTypeDescription
sectionWixToolset.Data.IntermediateSectionSection to add the new symbol to.
sourceLineNumbersWixToolset.Data.SourceLineNumberSource and line number of current symbol.
symbolNamestringName of symbol definition.
identifierWixToolset.Data.IdentifierOptional identifier for the symbol.

WixToolset.Data.IntermediateSymbol New symbol.

CreateSymbol(section, sourceLineNumbers, symbolDefinition, identifier) Method

Section titled “CreateSymbol(section, sourceLineNumbers, symbolDefinition, identifier) Method”

Creates a symbol in the section.

public WixToolset.Data.IntermediateSymbol CreateSymbol(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
WixToolset.Data.IntermediateSymbolDefinition symbolDefinition,
WixToolset.Data.Identifier identifier
)
ParameterTypeDescription
sectionWixToolset.Data.IntermediateSectionSection to add the new symbol to.
sourceLineNumbersWixToolset.Data.SourceLineNumberSource and line number of current symbol.
symbolDefinitionWixToolset.Data.IntermediateSymbolDefinitionSymbol definition to create from.
identifierWixToolset.Data.IdentifierOptional identifier for the symbol.

WixToolset.Data.IntermediateSymbol New symbol.

CreateWixGroupSymbol(section, sourceLineNumbers, parentType, parentId, childType, childId) Method

Section titled “CreateWixGroupSymbol(section, sourceLineNumbers, parentType, parentId, childType, childId) Method”

A symbol in the WixGroup table is added for this child node and its parent node.

public void CreateWixGroupSymbol(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
WixToolset.Data.ComplexReferenceParentType parentType,
string parentId,
WixToolset.Data.ComplexReferenceChildType childType,
string childId
)
ParameterTypeDescription
sectionWixToolset.Data.IntermediateSectionSection to create the reference in.
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information for the row.
parentTypeWixToolset.Data.ComplexReferenceParentTypeType of child’s complex reference parent.
parentIdstringId of the parenet node.
childTypeWixToolset.Data.ComplexReferenceChildTypeComplex reference type of child
childIdstringId of the Child Node.

CreateWixSearchRelationSymbol(section, sourceLineNumbers, id, parentId, attributes) Method

Section titled “CreateWixSearchRelationSymbol(section, sourceLineNumbers, id, parentId, attributes) Method”
public void CreateWixSearchRelationSymbol(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
WixToolset.Data.Identifier id,
string parentId,
int attributes
)
ParameterTypeDescription
sectionWixToolset.Data.IntermediateSectionSection to create the reference in.
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line number for the parent element.
idWixToolset.Data.IdentifierIdentifier of the search (key into the WixSearch table)
parentIdstringIdentifier of the search that comes before (key into the WixSearch table)
attributesintFurther details about the relation between id and parentId.

CreateWixSearchSymbol(section, sourceLineNumbers, elementName, id, variable, condition, after, bootstrapperExtensionId) Method

Section titled “CreateWixSearchSymbol(section, sourceLineNumbers, elementName, id, variable, condition, after, bootstrapperExtensionId) Method”

Creates a symbol in the WixSearch table.

public void CreateWixSearchSymbol(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
string elementName,
WixToolset.Data.Identifier id,
string variable,
string condition,
string after,
string bootstrapperExtensionId
)
ParameterTypeDescription
sectionWixToolset.Data.IntermediateSectionSection to create the reference in.
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line number for the search element.
elementNamestringName of search element.
idWixToolset.Data.IdentifierIdentifier of the search.
variablestringThe Burn variable to store the result into.
conditionstringA condition to test before evaluating the search.
afterstringThe search that this one will execute after.
bootstrapperExtensionIdstringThe id of the bootstrapper extension that handles this search.

EnsureTable(section, sourceLineNumbers, tableName) Method

Section titled “EnsureTable(section, sourceLineNumbers, tableName) Method”

Add the appropriate symbols to make sure that the given table shows up in the resulting output.

public void EnsureTable(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
string tableName
)
ParameterTypeDescription
sectionWixToolset.Data.IntermediateSectionActive section.
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line numbers.
tableNamestringName of the table to ensure existance of.

EnsureTable(section, sourceLineNumbers, tableDefinition) Method

Section titled “EnsureTable(section, sourceLineNumbers, tableDefinition) Method”

Add the appropriate symbols to make sure that the given table shows up in the resulting output.

public void EnsureTable(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
WixToolset.Data.WindowsInstaller.TableDefinition tableDefinition
)
ParameterTypeDescription
sectionWixToolset.Data.IntermediateSectionActive section.
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line numbers.
tableDefinitionWixToolset.Data.WindowsInstaller.TableDefinitionDefinition of the table to ensure existance of.

GetAttributeBundleVariableNameIdentifier(sourceLineNumbers, attribute) Method

Section titled “GetAttributeBundleVariableNameIdentifier(sourceLineNumbers, attribute) Method”

Gets a bundle variable name identifier and displays an error for an illegal value.

public WixToolset.Data.Identifier GetAttributeBundleVariableNameIdentifier(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute
)
ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
attributeSystem.Xml.Linq.XAttributeThe attribute containing the value to get.

WixToolset.Data.Identifier The attribute’s identifier value or a special value if an error occurred.

GetAttributeBundleVariableNameValue(sourceLineNumbers, attribute, nameRule) Method

Section titled “GetAttributeBundleVariableNameValue(sourceLineNumbers, attribute, nameRule) Method”

Gets a bundle variable name value and displays an error for an illegal value.

public string GetAttributeBundleVariableNameValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute,
WixToolset.Extensibility.Data.BundleVariableNameRule nameRule
)
ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
attributeSystem.Xml.Linq.XAttributeThe attribute containing the value to get.
nameRuleWixToolset.Extensibility.Data.BundleVariableNameRuleA rule for the contents of the value. If the contents do not follow the rule, an error is thrown.

string The attribute’s value.

GetAttributeGuidValue(sourceLineNumbers, attribute, generatable, canBeEmpty) Method

Section titled “GetAttributeGuidValue(sourceLineNumbers, attribute, generatable, canBeEmpty) Method”

Get a guid attribute value and displays an error for an illegal guid value.

public string GetAttributeGuidValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute,
bool generatable,
bool canBeEmpty
)
ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
attributeSystem.Xml.Linq.XAttributeThe attribute containing the value to get.
generatableboolDetermines whether the guid can be automatically generated.
canBeEmptyboolIf true, no error is raised on empty value. If false, an error is raised.

string The attribute’s guid value or a special value if an error occurred.

GetAttributeIdentifier(sourceLineNumbers, attribute) Method

Section titled “GetAttributeIdentifier(sourceLineNumbers, attribute) Method”

Get an identifier attribute value and displays an error for an illegal identifier value.

public WixToolset.Data.Identifier GetAttributeIdentifier(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute
)
ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
attributeSystem.Xml.Linq.XAttributeThe attribute containing the value to get.

WixToolset.Data.Identifier The attribute’s identifier value or a special value if an error occurred.

GetAttributeIdentifierValue(sourceLineNumbers, attribute) Method

Section titled “GetAttributeIdentifierValue(sourceLineNumbers, attribute) Method”

Get an identifier attribute value and displays an error for an illegal identifier value.

public string GetAttributeIdentifierValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute
)
ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
attributeSystem.Xml.Linq.XAttributeThe attribute containing the value to get.

string The attribute’s identifier value or a special value if an error occurred.

GetAttributeIntegerValue(sourceLineNumbers, attribute, minimum, maximum) Method

Section titled “GetAttributeIntegerValue(sourceLineNumbers, attribute, minimum, maximum) Method”

Get an integer attribute value and displays an error for an illegal integer value.

public int GetAttributeIntegerValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute,
int minimum,
int maximum
)
ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
attributeSystem.Xml.Linq.XAttributeThe attribute containing the value to get.
minimumintThe minimum legal value.
maximumintThe maximum legal value.

int The attribute’s integer value or a special value if an error occurred during conversion.

GetAttributeLongFilename(sourceLineNumbers, attribute, allowWildcards, allowRelative) Method

Section titled “GetAttributeLongFilename(sourceLineNumbers, attribute, allowWildcards, allowRelative) Method”

Gets a long filename value and displays an error for an illegal long filename value.

public string GetAttributeLongFilename(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute,
bool allowWildcards,
bool allowRelative
)
ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
attributeSystem.Xml.Linq.XAttributeThe attribute containing the value to get.
allowWildcardsbooltrue if wildcards are allowed in the filename.
allowRelativebooltrue if relative paths are allowed in the filename.

string The attribute’s long filename value.

GetAttributeLongValue(sourceLineNumbers, attribute, minimum, maximum) Method

Section titled “GetAttributeLongValue(sourceLineNumbers, attribute, minimum, maximum) Method”

Get a long integral attribute value and displays an error for an illegal long value.

public System.Int64 GetAttributeLongValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute,
System.Int64 minimum,
System.Int64 maximum
)
ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
attributeSystem.Xml.Linq.XAttributeThe attribute containing the value to get.
minimumSystem.Int64The minimum legal value.
maximumSystem.Int64The maximum legal value.

System.Int64 The attribute’s long value or a special value if an error occurred during conversion.

GetAttributeRegistryRootValue(sourceLineNumbers, attribute, allowHkmu) Method

Section titled “GetAttributeRegistryRootValue(sourceLineNumbers, attribute, allowHkmu) Method”

Gets a RegistryRootType value and displays an error for an illegal value.

public System.Nullable<WixToolset.Data.Symbols.RegistryRootType> GetAttributeRegistryRootValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute,
bool allowHkmu
)
ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
attributeSystem.Xml.Linq.XAttributeThe attribute containing the value to get.
allowHkmuboolWhether HKMU is returned as -1 (true), or treated as an error (false).

System.Nullable<WixToolset.Data.Symbols.RegistryRootType> The attribute’s RegisitryRootType value.

GetAttributeValue(sourceLineNumbers, attribute, emptyRule) Method

Section titled “GetAttributeValue(sourceLineNumbers, attribute, emptyRule) Method”

Get an attribute value and displays an error if the value is empty by default.

public string GetAttributeValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute,
WixToolset.Data.EmptyRule emptyRule
)
ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
attributeSystem.Xml.Linq.XAttributeThe attribute containing the value to get.
emptyRuleWixToolset.Data.EmptyRuleA rule for the contents of the value. If the contents do not follow the rule, an error is thrown.

string The attribute’s value.

GetAttributeVersionValue(sourceLineNumbers, attribute) Method

Section titled “GetAttributeVersionValue(sourceLineNumbers, attribute) Method”

Gets a version value or possibly a binder variable and displays an error for an illegal version value.

public string GetAttributeVersionValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute
)
ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
attributeSystem.Xml.Linq.XAttributeThe attribute containing the value to get.

string The attribute’s version value.

GetAttributeYesNoDefaultValue(sourceLineNumbers, attribute) Method

Section titled “GetAttributeYesNoDefaultValue(sourceLineNumbers, attribute) Method”

Gets a yes/no/default value and displays an error for an illegal yes/no/default value.

public WixToolset.Data.YesNoDefaultType GetAttributeYesNoDefaultValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute
)
ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
attributeSystem.Xml.Linq.XAttributeThe attribute containing the value to get.

WixToolset.Data.YesNoDefaultType The attribute’s YesNoType value.

GetAttributeYesNoValue(sourceLineNumbers, attribute) Method

Section titled “GetAttributeYesNoValue(sourceLineNumbers, attribute) Method”

Gets a yes/no value and displays an error for an illegal yes/no value.

public WixToolset.Data.YesNoType GetAttributeYesNoValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute
)
ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
attributeSystem.Xml.Linq.XAttributeThe attribute containing the value to get.

WixToolset.Data.YesNoType The attribute’s YesNoType value.

Gets node’s inner text and ensure’s it is safe for use in a condition by trimming any extra whitespace.

public string GetConditionInnerText(
System.Xml.Linq.XElement node
)
ParameterTypeDescription
nodeSystem.Xml.Linq.XElementThe node to ensure inner text is a condition.

string The value converted into a safe condition.

Gets a source line number for an element.

public WixToolset.Data.SourceLineNumber GetSourceLineNumbers(
System.Xml.Linq.XElement element
)
ParameterTypeDescription
elementSystem.Xml.Linq.XElementElement to get source line number.

WixToolset.Data.SourceLineNumber Source line number.

Get an element’s inner text and trims any extra whitespace.

public string GetTrimmedInnerText(
System.Xml.Linq.XElement element
)
ParameterTypeDescription
elementSystem.Xml.Linq.XElementThe element with inner text to be trimmed.

string The node’s inner text trimmed.

Validates that the element does not contain inner text.

public void InnerTextDisallowed(
System.Xml.Linq.XElement element
)
ParameterTypeDescription
elementSystem.Xml.Linq.XElementElement to check for inner text.

InnerTextDisallowed(element, attributeName) Method

Section titled “InnerTextDisallowed(element, attributeName) Method”

Validates that the element does not contain inner text and suggests which attribute to use instead.

public void InnerTextDisallowed(
System.Xml.Linq.XElement element,
string attributeName
)
ParameterTypeDescription
elementSystem.Xml.Linq.XElementElement to check for inner text.
attributeNamestringName of attribute to use instead of inner text.

Verifies that a value is a legal identifier.

public bool IsValidIdentifier(
string value
)
ParameterTypeDescription
valuestringThe value to verify.

bool true if the value is an identifier; false otherwise.

Verifies if an identifier is a valid loc identifier.

public bool IsValidLocIdentifier(
string identifier
)
ParameterTypeDescription
identifierstringIdentifier to verify.

bool True if the identifier is a valid loc identifier.

IsValidLongFilename(filename, allowWildcards, allowRelative) Method

Section titled “IsValidLongFilename(filename, allowWildcards, allowRelative) Method”

Verifies if a filename is a valid long filename.

public bool IsValidLongFilename(
string filename,
bool allowWildcards,
bool allowRelative
)
ParameterTypeDescription
filenamestringFilename to verify.
allowWildcardsbooltrue if wildcards are allowed in the filename.
allowRelativebooltrue if relative paths are allowed in the filename.

bool True if the filename is a valid long filename

IsValidShortFilename(filename, allowWildcards) Method

Section titled “IsValidShortFilename(filename, allowWildcards) Method”

Verifies if a filename is a valid short filename.

public bool IsValidShortFilename(
string filename,
bool allowWildcards
)
ParameterTypeDescription
filenamestringFilename to verify.
allowWildcardsboolIndicates whether wildcards are allowed in the filename.

bool True if the filename is a valid short filename

ScheduleActionSymbol(section, sourceLineNumbers, access, sequence, name, condition, beforeAction, afterAction, overridable) Method

Section titled “ScheduleActionSymbol(section, sourceLineNumbers, access, sequence, name, condition, beforeAction, afterAction, overridable) Method”

Schedules an action symbol.

public WixToolset.Data.Symbols.WixActionSymbol ScheduleActionSymbol(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
WixToolset.Data.AccessModifier access,
WixToolset.Data.Symbols.SequenceTable sequence,
string name,
string condition,
string beforeAction,
string afterAction,
bool overridable
)
ParameterTypeDescription
sectionWixToolset.Data.IntermediateSectionSection to add the symbol to.
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
accessWixToolset.Data.AccessModifierAccess modifier for the scheduled action.
sequenceWixToolset.Data.Symbols.SequenceTableSequence to add the action to.
namestringName of action.
conditionstringOptional condition of action.
beforeActionstringOptional action to schedule before.
afterActionstringOption action to schedule after.
overridableboolOptional overridable flag.

UnexpectedAttribute(element, attribute) Method

Section titled “UnexpectedAttribute(element, attribute) Method”

Called when the compiler encounters an unexpected attribute.

public void UnexpectedAttribute(
System.Xml.Linq.XElement element,
System.Xml.Linq.XAttribute attribute
)
ParameterTypeDescription
elementSystem.Xml.Linq.XElementParent element that found unexpected attribute.
attributeSystem.Xml.Linq.XAttributeUnexpected attribute.

UnexpectedElement(parentElement, childElement) Method

Section titled “UnexpectedElement(parentElement, childElement) Method”

Called when the compiler encounters an unexpected child element.

public void UnexpectedElement(
System.Xml.Linq.XElement parentElement,
System.Xml.Linq.XElement childElement
)
ParameterTypeDescription
parentElementSystem.Xml.Linq.XElementParent element that found unexpected child.
childElementSystem.Xml.Linq.XElementUnexpected child element.