Skip to main content

IParseHelper Interface

Interface provided to help compiler and optimizer extensions parse.

Methods

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

ContainsProperty(possibleProperty) Method

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

Declaration

public bool ContainsProperty(
string possibleProperty
)

Parameters

ParameterTypeDescription
possiblePropertystringString to evaluate for properties.

Return value

bool True if a property is found in the string.

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

Creates WixComplexReference and WixGroup symbols in the active section.

Declaration

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
)

Parameters

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

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

Declaration

public void CreateCustomActionReference(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
WixToolset.Data.IntermediateSection section,
string customAction,
WixToolset.Data.Platform platform,
WixToolset.Extensibility.Data.CustomActionPlatforms supportedPlatforms
)

Parameters

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

Creates a directory row from a name.

Declaration

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
)

Parameters

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.

Return value

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

CreateGuid(namespaceGuid, value) Method

Creates a version 3 name-based UUID.

Declaration

public string CreateGuid(
System.Guid namespaceGuid,
string value
)

Parameters

ParameterTypeDescription
namespaceGuidSystem.GuidThe namespace UUID.
valuestringThe value.

Return value

string The generated GUID for the given namespace and value.

CreateIdentifier(prefix, args) Method

Create an identifier by hashing data from the row.

Declaration

public WixToolset.Data.Identifier CreateIdentifier(
string prefix,
System.String[] args
)

Parameters

ParameterTypeDescription
prefixstringThree letter or less prefix for generated row identifier.
argsSystem.String[]Information to hash.

Return value

WixToolset.Data.Identifier The new identifier.

CreateIdentifierFromFilename(filename) Method

Create an identifier based on passed file name

Declaration

public WixToolset.Data.Identifier CreateIdentifierFromFilename(
string filename
)

Parameters

ParameterTypeDescription
filenamestringFile name to generate identifier from

Return value

WixToolset.Data.Identifier The new identifier.

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.

Declaration

public string CreateIdentifierValueFromPlatform(
string name,
WixToolset.Data.Platform currentPlatform,
WixToolset.Extensibility.Data.BurnPlatforms supportedPlatforms
)

Parameters

ParameterTypeDescription
namestringThe base name for the identifier.
currentPlatformWixToolset.Data.PlatformThe platform being compiled.
supportedPlatformsWixToolset.Extensibility.Data.BurnPlatformsThe platforms for which there are specialized implementations.

Return value

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

Creates a Registry symbol in the active section.

Declaration

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
)

Parameters

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

Creates a numeric Registry symbol in the active section.

Declaration

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
)

Parameters

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

Create a WixSimpleReference symbol in the active section.

Declaration

public void CreateSimpleReference(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
string symbolName,
string primaryKey
)

Parameters

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

Create a WixSimpleReference symbol in the active section.

Declaration

public void CreateSimpleReference(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
string symbolName,
System.String[] primaryKeys
)

Parameters

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

Create a WixSimpleReference symbol in the active section.

Declaration

public void CreateSimpleReference(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
WixToolset.Data.IntermediateSymbolDefinition symbolDefinition,
string primaryKey
)

Parameters

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

Create a WixSimpleReference symbol in the active section.

Declaration

public void CreateSimpleReference(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
WixToolset.Data.IntermediateSymbolDefinition symbolDefinition,
System.String[] primaryKeys
)

Parameters

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

Creates a symbol in the section.

Declaration

public WixToolset.Data.IntermediateSymbol CreateSymbol(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
string symbolName,
WixToolset.Data.Identifier identifier
)

Parameters

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.

Return value

WixToolset.Data.IntermediateSymbol New symbol.

CreateSymbol(section, sourceLineNumbers, symbolDefinition, identifier) Method

Creates a symbol in the section.

Declaration

public WixToolset.Data.IntermediateSymbol CreateSymbol(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
WixToolset.Data.IntermediateSymbolDefinition symbolDefinition,
WixToolset.Data.Identifier identifier
)

Parameters

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.

Return value

WixToolset.Data.IntermediateSymbol New symbol.

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

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

Declaration

public void CreateWixGroupSymbol(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
WixToolset.Data.ComplexReferenceParentType parentType,
string parentId,
WixToolset.Data.ComplexReferenceChildType childType,
string childId
)

Parameters

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

Declaration

public void CreateWixSearchRelationSymbol(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
WixToolset.Data.Identifier id,
string parentId,
int attributes
)

Parameters

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

Creates a symbol in the WixSearch table.

Declaration

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
)

Parameters

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

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

Declaration

public void EnsureTable(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
string tableName
)

Parameters

ParameterTypeDescription
sectionWixToolset.Data.IntermediateSectionActive section.
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line numbers.
tableNamestringName of the table to ensure existance of.

EnsureTable(section, sourceLineNumbers, tableDefinition) Method

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

Declaration

public void EnsureTable(
WixToolset.Data.IntermediateSection section,
WixToolset.Data.SourceLineNumber sourceLineNumbers,
WixToolset.Data.WindowsInstaller.TableDefinition tableDefinition
)

Parameters

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

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

Declaration

public WixToolset.Data.Identifier GetAttributeBundleVariableNameIdentifier(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute
)

Parameters

ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
attributeSystem.Xml.Linq.XAttributeThe attribute containing the value to get.

Return value

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

GetAttributeBundleVariableNameValue(sourceLineNumbers, attribute, nameRule) Method

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

Declaration

public string GetAttributeBundleVariableNameValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute,
WixToolset.Extensibility.Data.BundleVariableNameRule nameRule
)

Parameters

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.

Return value

string The attribute's value.

GetAttributeGuidValue(sourceLineNumbers, attribute, generatable, canBeEmpty) Method

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

Declaration

public string GetAttributeGuidValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute,
bool generatable,
bool canBeEmpty
)

Parameters

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.

Return value

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

GetAttributeIdentifier(sourceLineNumbers, attribute) Method

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

Declaration

public WixToolset.Data.Identifier GetAttributeIdentifier(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute
)

Parameters

ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
attributeSystem.Xml.Linq.XAttributeThe attribute containing the value to get.

Return value

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

GetAttributeIdentifierValue(sourceLineNumbers, attribute) Method

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

Declaration

public string GetAttributeIdentifierValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute
)

Parameters

ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
attributeSystem.Xml.Linq.XAttributeThe attribute containing the value to get.

Return value

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

GetAttributeIntegerValue(sourceLineNumbers, attribute, minimum, maximum) Method

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

Declaration

public int GetAttributeIntegerValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute,
int minimum,
int maximum
)

Parameters

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.

Return value

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

GetAttributeLongFilename(sourceLineNumbers, attribute, allowWildcards, allowRelative) Method

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

Declaration

public string GetAttributeLongFilename(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute,
bool allowWildcards,
bool allowRelative
)

Parameters

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.

Return value

string The attribute's long filename value.

GetAttributeLongValue(sourceLineNumbers, attribute, minimum, maximum) Method

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

Declaration

public System.Int64 GetAttributeLongValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute,
System.Int64 minimum,
System.Int64 maximum
)

Parameters

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.

Return value

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

GetAttributeRegistryRootValue(sourceLineNumbers, attribute, allowHkmu) Method

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

Declaration

public System.Nullable<WixToolset.Data.Symbols.RegistryRootType> GetAttributeRegistryRootValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute,
bool allowHkmu
)

Parameters

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).

Return value

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

GetAttributeValue(sourceLineNumbers, attribute, emptyRule) Method

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

Declaration

public string GetAttributeValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute,
WixToolset.Data.EmptyRule emptyRule
)

Parameters

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.

Return value

string The attribute's value.

GetAttributeVersionValue(sourceLineNumbers, attribute) Method

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

Declaration

public string GetAttributeVersionValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute
)

Parameters

ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
attributeSystem.Xml.Linq.XAttributeThe attribute containing the value to get.

Return value

string The attribute's version value.

GetAttributeYesNoDefaultValue(sourceLineNumbers, attribute) Method

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

Declaration

public WixToolset.Data.YesNoDefaultType GetAttributeYesNoDefaultValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute
)

Parameters

ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
attributeSystem.Xml.Linq.XAttributeThe attribute containing the value to get.

Return value

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

GetAttributeYesNoValue(sourceLineNumbers, attribute) Method

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

Declaration

public WixToolset.Data.YesNoType GetAttributeYesNoValue(
WixToolset.Data.SourceLineNumber sourceLineNumbers,
System.Xml.Linq.XAttribute attribute
)

Parameters

ParameterTypeDescription
sourceLineNumbersWixToolset.Data.SourceLineNumberSource line information about the owner element.
attributeSystem.Xml.Linq.XAttributeThe attribute containing the value to get.

Return value

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

GetConditionInnerText(node) Method

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

Declaration

public string GetConditionInnerText(
System.Xml.Linq.XElement node
)

Parameters

ParameterTypeDescription
nodeSystem.Xml.Linq.XElementThe node to ensure inner text is a condition.

Return value

string The value converted into a safe condition.

GetSourceLineNumbers(element) Method

Gets a source line number for an element.

Declaration

public WixToolset.Data.SourceLineNumber GetSourceLineNumbers(
System.Xml.Linq.XElement element
)

Parameters

ParameterTypeDescription
elementSystem.Xml.Linq.XElementElement to get source line number.

Return value

WixToolset.Data.SourceLineNumber Source line number.

GetTrimmedInnerText(element) Method

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

Declaration

public string GetTrimmedInnerText(
System.Xml.Linq.XElement element
)

Parameters

ParameterTypeDescription
elementSystem.Xml.Linq.XElementThe element with inner text to be trimmed.

Return value

string The node's inner text trimmed.

InnerTextDisallowed(element) Method

Validates that the element does not contain inner text.

Declaration

public void InnerTextDisallowed(
System.Xml.Linq.XElement element
)

Parameters

ParameterTypeDescription
elementSystem.Xml.Linq.XElementElement to check for inner text.

InnerTextDisallowed(element, attributeName) Method

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

Declaration

public void InnerTextDisallowed(
System.Xml.Linq.XElement element,
string attributeName
)

Parameters

ParameterTypeDescription
elementSystem.Xml.Linq.XElementElement to check for inner text.
attributeNamestringName of attribute to use instead of inner text.

IsValidIdentifier(value) Method

Verifies that a value is a legal identifier.

Declaration

public bool IsValidIdentifier(
string value
)

Parameters

ParameterTypeDescription
valuestringThe value to verify.

Return value

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

IsValidLocIdentifier(identifier) Method

Verifies if an identifier is a valid loc identifier.

Declaration

public bool IsValidLocIdentifier(
string identifier
)

Parameters

ParameterTypeDescription
identifierstringIdentifier to verify.

Return value

bool True if the identifier is a valid loc identifier.

IsValidLongFilename(filename, allowWildcards, allowRelative) Method

Verifies if a filename is a valid long filename.

Declaration

public bool IsValidLongFilename(
string filename,
bool allowWildcards,
bool allowRelative
)

Parameters

ParameterTypeDescription
filenamestringFilename to verify.
allowWildcardsbooltrue if wildcards are allowed in the filename.
allowRelativebooltrue if relative paths are allowed in the filename.

Return value

bool True if the filename is a valid long filename

IsValidShortFilename(filename, allowWildcards) Method

Verifies if a filename is a valid short filename.

Declaration

public bool IsValidShortFilename(
string filename,
bool allowWildcards
)

Parameters

ParameterTypeDescription
filenamestringFilename to verify.
allowWildcardsboolIndicates whether wildcards are allowed in the filename.

Return value

bool True if the filename is a valid short filename

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

Schedules an action symbol.

Declaration

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
)

Parameters

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

Called when the compiler encounters an unexpected attribute.

Declaration

public void UnexpectedAttribute(
System.Xml.Linq.XElement element,
System.Xml.Linq.XAttribute attribute
)

Parameters

ParameterTypeDescription
elementSystem.Xml.Linq.XElementParent element that found unexpected attribute.
attributeSystem.Xml.Linq.XAttributeUnexpected attribute.

UnexpectedElement(parentElement, childElement) Method

Called when the compiler encounters an unexpected child element.

Declaration

public void UnexpectedElement(
System.Xml.Linq.XElement parentElement,
System.Xml.Linq.XElement childElement
)

Parameters

ParameterTypeDescription
parentElementSystem.Xml.Linq.XElementParent element that found unexpected child.
childElementSystem.Xml.Linq.XElementUnexpected child element.