InstallPathMap Class
Represents a mapping of install paths for all directories, components, or files in an installation database.
Methods
Method | Description |
---|---|
Add(key, installPath) | Sets an install path for a direcotry, component, or file key. |
BuildComponentPathMap(db, directoryPathMap) | Builds a mapping from Component keys to installation paths. |
BuildDirectoryPathMap(db, useShortNames) | Builds a mapping from Directory keys to installation paths. |
BuildDirectoryPathMap(db, useShortNames, sourceRootDir, targetRootDir) | Builds a mapping of Directory keys to directory paths, specifying root directories for the source and target paths. |
BuildFilePathMap(db, componentPathMap, useShortNames) | Builds a mapping from File keys to installation paths. |
Clear() | Removes all entries from the dictionary. |
ContainsKey(key) | Tests whether a direcotry, component, or file key exists in the map. |
GetEnumerator() | Gets an enumerator over all entries in the dictionary. |
Remove(key) | Removes an install path from the map. |
Properties
Property | Description |
---|---|
Count | Gets the number of entries in the dictionary. |
Item | Gets or sets an install path for a direcotry, component, or file key. |
Keys | Gets the collection of keys in the InstallPathMap. Depending on the type of InstallPathMap, they are all directory, component, or file key strings. |
SourcePaths | Gets a mapping from keys to source paths. |
TargetPaths | Gets a mapping from keys to target paths. |
Values | Gets the collection of InstallPath values in the InstallPathMap. |
WixToolset.Dtf.WindowsInstaller.Package.dll
version 5.0.2+aa65968c419420d32e3e1b647aea0082f5ca5b78
Add(key, installPath) Method
Sets an install path for a direcotry, component, or file key.
Declaration
public void Add(
string key,
InstallPath installPath
)
Parameters
Parameter | Type | Description |
---|---|---|
key | string | Depending on the type of InstallPathMap, this is the primary key from the either the Directory, Component, or File table. |
installPath | InstallPath | The install path of the key item. |
Remarks
Changing an install path does not modify the Database used to generate this InstallPathMap.
BuildComponentPathMap(db, directoryPathMap) Method
Builds a mapping from Component keys to installation paths.
Declaration
public static InstallPathMap BuildComponentPathMap(
WixToolset.Dtf.WindowsInstaller.Database db,
InstallPathMap directoryPathMap
)
Parameters
Parameter | Type | Description |
---|---|---|
db | WixToolset.Dtf.WindowsInstaller.Database | Installation database. |
directoryPathMap | InstallPathMap | Directory mapping returned by . |
Return value
InstallPathMap
An InstallPathMap with the described mapping.
BuildDirectoryPathMap(db, useShortNames) Method
Builds a mapping from Directory keys to installation paths.
Declaration
public static InstallPathMap BuildDirectoryPathMap(
WixToolset.Dtf.WindowsInstaller.Database db,
bool useShortNames
)
Parameters
Parameter | Type | Description |
---|---|---|
db | WixToolset.Dtf.WindowsInstaller.Database | Installation database. |
useShortNames | bool | true to use short directory names; false to use long names |
Return value
InstallPathMap
An InstallPathMap with the described mapping.
BuildDirectoryPathMap(db, useShortNames, sourceRootDir, targetRootDir) Method
Builds a mapping of Directory keys to directory paths, specifying root directories for the source and target paths.
Declaration
public static InstallPathMap BuildDirectoryPathMap(
WixToolset.Dtf.WindowsInstaller.Database db,
bool useShortNames,
string sourceRootDir,
string targetRootDir
)
Parameters
Parameter | Type | Description |
---|---|---|
db | WixToolset.Dtf.WindowsInstaller.Database | Database containing the Directory table. |
useShortNames | bool | true to use short directory names; false to use long names |
sourceRootDir | string | The root directory path of all source paths, or null to leave them relative. |
targetRootDir | string | The root directory path of all source paths, or null to leave them relative. |
Return value
InstallPathMap
An InstallPathMap with the described mapping.
BuildFilePathMap(db, componentPathMap, useShortNames) Method
Builds a mapping from File keys to installation paths.
Declaration
public static InstallPathMap BuildFilePathMap(
WixToolset.Dtf.WindowsInstaller.Database db,
InstallPathMap componentPathMap,
bool useShortNames
)
Parameters
Parameter | Type | Description |
---|---|---|
db | WixToolset.Dtf.WindowsInstaller.Database | Installation database. |
componentPathMap | InstallPathMap | Component mapping returned by . |
useShortNames | bool | true to use short file names; false to use long names |
Return value
InstallPathMap
An InstallPathMap with the described mapping.
Clear() Method
Removes all entries from the dictionary.
Declaration
public void Clear()
ContainsKey(key) Method
Tests whether a direcotry, component, or file key exists in the map.
Declaration
public bool ContainsKey(
string key
)
Parameters
Parameter | Type | Description |
---|---|---|
key | string | Depending on the type of InstallPathMap, this is the primary key from the either the Directory, Component, or File table. |
Return value
bool
true if the key is found; false otherwise
GetEnumerator() Method
Gets an enumerator over all entries in the dictionary.
Declaration
public IEnumerator<System.Collections.Generic.KeyValuePair`2<System.String,WixToolset.Dtf.WindowsInstaller.Package.InstallPath>> GetEnumerator()
Return value
IEnumerator<System.Collections.Generic.KeyValuePair
2<System.String,WixToolset.Dtf.WindowsInstaller.Package.InstallPath>>` An enumerator for the dictionary.
Remove(key) Method
Removes an install path from the map.
Declaration
public bool Remove(
string key
)
Parameters
Parameter | Type | Description |
---|---|---|
key | string | Depending on the type of InstallPathMap, this is the primary key from the either the Directory, Component, or File table. |
Return value
bool
true if the item was removed, false if it did not exist
Remarks
Changing an install path does not modify the Database used to generate this InstallPathMap.
Count Property
Gets the number of entries in the dictionary.
Declaration
public int Count { get; set; }
Item Property
Gets or sets an install path for a direcotry, component, or file key.
Declaration
public InstallPath Item[
string key
] { get; set; }
Parameters
Parameter | Type | Description |
---|---|---|
key | string | Depending on the type of InstallPathMap, this is the primary key from the either the Directory, Component, or File table. |
Remarks
Changing an install path does not modify the Database used to generate this InstallPathMap.
Keys Property
Gets the collection of keys in the InstallPathMap. Depending on the type of InstallPathMap, they are all directory, component, or file key strings.
Declaration
public System.Collections.Generic.ICollection<System.String> Keys { get; set; }
SourcePaths Property
Gets a mapping from keys to source paths.
Declaration
public System.Collections.Generic.IDictionary<System.String,System.String> SourcePaths { get; set; }
TargetPaths Property
Gets a mapping from keys to target paths.
Declaration
public System.Collections.Generic.IDictionary<System.String,System.String> TargetPaths { get; set; }
Values Property
Gets the collection of InstallPath values in the InstallPathMap.
Declaration
public System.Collections.Generic.ICollection<WixToolset.Dtf.WindowsInstaller.Package.InstallPath> Values { get; set; }