IBackendHelper Interface
Interface provided to help backend extensions.
Methods
Section titled “Methods”| Method | Description |
|---|---|
| CreateGuid() | Creates a MSI compatible GUID. |
| CreateGuid(namespaceGuid, value) | Creates a version 3 name-based UUID. |
| CreateResolvedDirectory(directoryParent, name) | Creates a resolved directory. |
| GenerateIdentifier(prefix, args) | Generate an identifier by hashing data from the row. |
| GetMsiFileName(value, source, longName) | Get a source/target and short/long file name from an MSI Filename column. |
| GetValidCodePage(value, allowNoChange, onlyAnsi, sourceLineNumbers) | Gets a valid code page from the given web name or integer value. |
| IsValidBinderVariable(variable) | Verifies if an identifier is a valid binder variable name. |
| IsValidFourPartVersion(version) | Verifies the given string is a valid 4-part version. |
| IsValidIdentifier(id) | Determines if value is a valid identifier. |
| IsValidLongFilename(filename, allowWildcards, allowRelative) | Verifies the given string is a valid long filename. |
| IsValidMsiProductVersion(version) | Verifies the given string is a valid MSI product version. |
| IsValidShortFilename(filename, allowWildcards) | Verifies the given string is a valid short filename. |
| IsValidWixVersion(version) | Verifies the given string is a valid WiX version. |
| SplitMsiFileName(value) | Get the source/target and short/long file names from an MSI Filename column. |
WixToolset.Extensibility.dll version 5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8 |
CreateGuid() Method
Section titled “CreateGuid() Method”Creates a MSI compatible GUID.
Declaration
Section titled “Declaration”public string CreateGuid()Return value
Section titled “Return value”string Creates an uppercase GUID with braces.
CreateGuid(namespaceGuid, value) Method
Section titled “CreateGuid(namespaceGuid, value) Method”Creates a version 3 name-based UUID.
Declaration
Section titled “Declaration”public string CreateGuid( System.Guid namespaceGuid, string value)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| namespaceGuid | System.Guid | The namespace UUID. |
| value | string | The value. |
Return value
Section titled “Return value”string The generated GUID for the given namespace and value.
CreateResolvedDirectory(directoryParent, name) Method
Section titled “CreateResolvedDirectory(directoryParent, name) Method”Creates a resolved directory.
Declaration
Section titled “Declaration”public WixToolset.Extensibility.Data.IResolvedDirectory CreateResolvedDirectory( string directoryParent, string name)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| directoryParent | string | Directory parent identifier. |
| name | string | Name of directory. |
Return value
Section titled “Return value”WixToolset.Extensibility.Data.IResolvedDirectory Resolved directory.
GenerateIdentifier(prefix, args) Method
Section titled “GenerateIdentifier(prefix, args) Method”Generate an identifier by hashing data from the row.
Declaration
Section titled “Declaration”public string GenerateIdentifier( string prefix, System.String[] args)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| prefix | string | Three letter or less prefix for generated row identifier. |
| args | System.String[] | Information to hash. |
Return value
Section titled “Return value”string The generated identifier.
GetMsiFileName(value, source, longName) Method
Section titled “GetMsiFileName(value, source, longName) Method”Get a source/target and short/long file name from an MSI Filename column.
Declaration
Section titled “Declaration”public string GetMsiFileName( string value, bool source, bool longName)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| value | string | The Filename value. |
| source | bool | true to get a source name; false to get a target name |
| longName | bool | true to get a long name; false to get a short name |
Return value
Section titled “Return value”string The requesed file name.
GetValidCodePage(value, allowNoChange, onlyAnsi, sourceLineNumbers) Method
Section titled “GetValidCodePage(value, allowNoChange, onlyAnsi, sourceLineNumbers) Method”Gets a valid code page from the given web name or integer value.
Declaration
Section titled “Declaration”public int GetValidCodePage( string value, bool allowNoChange, bool onlyAnsi, WixToolset.Data.SourceLineNumber sourceLineNumbers)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| value | string | A code page web name or integer value as a string. |
| allowNoChange | bool | Whether to allow -1 which does not change the database code pages. This may be the case with wxl files. |
| onlyAnsi | bool | Whether to allow Unicode (UCS) or UTF code pages. |
| sourceLineNumbers | WixToolset.Data.SourceLineNumber | Source line information for the current authoring. |
Return value
Section titled “Return value”int A valid code page number.
Exceptions
Section titled “Exceptions”| Exception | Description |
|---|---|
| T:System.ArgumentOutOfRangeException | The value is an integer less than 0 or greater than 65535. |
| T:System.ArgumentNullException | is null. |
| T:System.NotSupportedException | The value doesn’t not represent a valid code page name or integer value. |
| T:WixToolset.Data.WixException | The code page is invalid for summary information. |
IsValidBinderVariable(variable) Method
Section titled “IsValidBinderVariable(variable) Method”Verifies if an identifier is a valid binder variable name.
Declaration
Section titled “Declaration”public bool IsValidBinderVariable( string variable)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| variable | string | Binder variable name to verify. |
Return value
Section titled “Return value”bool True if the identifier is a valid binder variable name.
IsValidFourPartVersion(version) Method
Section titled “IsValidFourPartVersion(version) Method”Verifies the given string is a valid 4-part version.
Declaration
Section titled “Declaration”public bool IsValidFourPartVersion( string version)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| version | string | The version to verify. |
Return value
Section titled “Return value”bool True if version is a valid 4-part version.
IsValidIdentifier(id) Method
Section titled “IsValidIdentifier(id) Method”Determines if value is a valid identifier.
Declaration
Section titled “Declaration”public bool IsValidIdentifier( string id)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| id | string | Identifier to validate. |
Return value
Section titled “Return value”bool True if valid identifier, otherwise false.
IsValidLongFilename(filename, allowWildcards, allowRelative) Method
Section titled “IsValidLongFilename(filename, allowWildcards, allowRelative) Method”Verifies the given string is a valid long filename.
Declaration
Section titled “Declaration”public bool IsValidLongFilename( string filename, bool allowWildcards, bool allowRelative)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| filename | string | The filename to verify. |
| allowWildcards | bool | Allow wildcards in the filename. |
| allowRelative | bool | Allow long file name to be a relative path. |
Return value
Section titled “Return value”bool True if filename is a valid long filename.
IsValidMsiProductVersion(version) Method
Section titled “IsValidMsiProductVersion(version) Method”Verifies the given string is a valid MSI product version.
Declaration
Section titled “Declaration”public bool IsValidMsiProductVersion( string version)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| version | string | The MSI product version to verify. |
Return value
Section titled “Return value”bool True if version is a valid MSI product version
IsValidShortFilename(filename, allowWildcards) Method
Section titled “IsValidShortFilename(filename, allowWildcards) Method”Verifies the given string is a valid short filename.
Declaration
Section titled “Declaration”public bool IsValidShortFilename( string filename, bool allowWildcards)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| filename | string | The filename to verify. |
| allowWildcards | bool | Allow wildcards in the filename. |
Return value
Section titled “Return value”bool True if filename is a valid short filename.
IsValidWixVersion(version) Method
Section titled “IsValidWixVersion(version) Method”Verifies the given string is a valid WiX version.
Declaration
Section titled “Declaration”public bool IsValidWixVersion( string version)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| version | string | The version to verify. |
Return value
Section titled “Return value”bool True if version is a valid WiX version.
SplitMsiFileName(value) Method
Section titled “SplitMsiFileName(value) Method”Get the source/target and short/long file names from an MSI Filename column.
Declaration
Section titled “Declaration”public System.String[] SplitMsiFileName( string value)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| value | string | The Filename value. |
Return value
Section titled “Return value”System.String[] An array of strings of length 4. The contents are: short target, long target, short source, and long source.
Remarks
Section titled “Remarks”If any particular file name part is not parsed, its set to null in the appropriate location of the returned array of strings. Thus the returned array will always be of length 4.