IBackendHelper Interface
Interface provided to help backend extensions.
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.2+aa65968c419420d32e3e1b647aea0082f5ca5b78
CreateGuid() Method
Creates a MSI compatible GUID.
Declaration
public string CreateGuid()
Return value
string
Creates an uppercase GUID with braces.
CreateGuid(namespaceGuid, value) Method
Creates a version 3 name-based UUID.
Declaration
public string CreateGuid(
System.Guid namespaceGuid,
string value
)
Parameters
Parameter | Type | Description |
---|---|---|
namespaceGuid | System.Guid | The namespace UUID. |
value | string | The value. |
Return value
string
The generated GUID for the given namespace and value.
CreateResolvedDirectory(directoryParent, name) Method
Creates a resolved directory.
Declaration
public WixToolset.Extensibility.Data.IResolvedDirectory CreateResolvedDirectory(
string directoryParent,
string name
)
Parameters
Parameter | Type | Description |
---|---|---|
directoryParent | string | Directory parent identifier. |
name | string | Name of directory. |
Return value
WixToolset.Extensibility.Data.IResolvedDirectory
Resolved directory.
GenerateIdentifier(prefix, args) Method
Generate an identifier by hashing data from the row.
Declaration
public string GenerateIdentifier(
string prefix,
System.String[] args
)
Parameters
Parameter | Type | Description |
---|---|---|
prefix | string | Three letter or less prefix for generated row identifier. |
args | System.String[] | Information to hash. |
Return value
string
The generated identifier.
GetMsiFileName(value, source, longName) Method
Get a source/target and short/long file name from an MSI Filename column.
Declaration
public string GetMsiFileName(
string value,
bool source,
bool longName
)
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
string
The requesed file name.
GetValidCodePage(value, allowNoChange, onlyAnsi, sourceLineNumbers) Method
Gets a valid code page from the given web name or integer value.
Declaration
public int GetValidCodePage(
string value,
bool allowNoChange,
bool onlyAnsi,
WixToolset.Data.SourceLineNumber sourceLineNumbers
)
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
int
A valid code page number.
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
Verifies if an identifier is a valid binder variable name.
Declaration
public bool IsValidBinderVariable(
string variable
)
Parameters
Parameter | Type | Description |
---|---|---|
variable | string | Binder variable name to verify. |
Return value
bool
True if the identifier is a valid binder variable name.
IsValidFourPartVersion(version) Method
Verifies the given string is a valid 4-part version.
Declaration
public bool IsValidFourPartVersion(
string version
)
Parameters
Parameter | Type | Description |
---|---|---|
version | string | The version to verify. |
Return value
bool
True if version is a valid 4-part version.
IsValidIdentifier(id) Method
Determines if value is a valid identifier.
Declaration
public bool IsValidIdentifier(
string id
)
Parameters
Parameter | Type | Description |
---|---|---|
id | string | Identifier to validate. |
Return value
bool
True if valid identifier, otherwise false.
IsValidLongFilename(filename, allowWildcards, allowRelative) Method
Verifies the given string is a valid long filename.
Declaration
public bool IsValidLongFilename(
string filename,
bool allowWildcards,
bool allowRelative
)
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
bool
True if filename is a valid long filename.
IsValidMsiProductVersion(version) Method
Verifies the given string is a valid MSI product version.
Declaration
public bool IsValidMsiProductVersion(
string version
)
Parameters
Parameter | Type | Description |
---|---|---|
version | string | The MSI product version to verify. |
Return value
bool
True if version is a valid MSI product version
IsValidShortFilename(filename, allowWildcards) Method
Verifies the given string is a valid short filename.
Declaration
public bool IsValidShortFilename(
string filename,
bool allowWildcards
)
Parameters
Parameter | Type | Description |
---|---|---|
filename | string | The filename to verify. |
allowWildcards | bool | Allow wildcards in the filename. |
Return value
bool
True if filename is a valid short filename.
IsValidWixVersion(version) Method
Verifies the given string is a valid WiX version.
Declaration
public bool IsValidWixVersion(
string version
)
Parameters
Parameter | Type | Description |
---|---|---|
version | string | The version to verify. |
Return value
bool
True if version is a valid WiX version.
SplitMsiFileName(value) Method
Get the source/target and short/long file names from an MSI Filename column.
Declaration
public System.String[] SplitMsiFileName(
string value
)
Parameters
Parameter | Type | Description |
---|---|---|
value | string | The Filename value. |
Return value
System.String[]
An array of strings of length 4. The contents are: short target, long target, short source, and long source.
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.