InstallPathMap Class
Represents a mapping of install paths for all directories, components, or files in an installation database.
Methods
Section titled “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
Section titled “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.0+41e11442b2ca93e444b60213b5ae99dcbab787d8 |
Add(key, installPath) Method
Section titled “Add(key, installPath) Method”Sets an install path for a direcotry, component, or file key.
Declaration
Section titled “Declaration”public void Add( string key, InstallPath installPath)Parameters
Section titled “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
Section titled “Remarks”Changing an install path does not modify the Database used to generate this InstallPathMap.
BuildComponentPathMap(db, directoryPathMap) Method
Section titled “BuildComponentPathMap(db, directoryPathMap) Method”Builds a mapping from Component keys to installation paths.
Declaration
Section titled “Declaration”public static InstallPathMap BuildComponentPathMap( WixToolset.Dtf.WindowsInstaller.Database db, InstallPathMap directoryPathMap)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| db | WixToolset.Dtf.WindowsInstaller.Database | Installation database. |
| directoryPathMap | InstallPathMap | Directory mapping returned by . |
Return value
Section titled “Return value”InstallPathMap An InstallPathMap with the described mapping.
BuildDirectoryPathMap(db, useShortNames) Method
Section titled “BuildDirectoryPathMap(db, useShortNames) Method”Builds a mapping from Directory keys to installation paths.
Declaration
Section titled “Declaration”public static InstallPathMap BuildDirectoryPathMap( WixToolset.Dtf.WindowsInstaller.Database db, bool useShortNames)Parameters
Section titled “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
Section titled “Return value”InstallPathMap An InstallPathMap with the described mapping.
BuildDirectoryPathMap(db, useShortNames, sourceRootDir, targetRootDir) Method
Section titled “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
Section titled “Declaration”public static InstallPathMap BuildDirectoryPathMap( WixToolset.Dtf.WindowsInstaller.Database db, bool useShortNames, string sourceRootDir, string targetRootDir)Parameters
Section titled “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
Section titled “Return value”InstallPathMap An InstallPathMap with the described mapping.
BuildFilePathMap(db, componentPathMap, useShortNames) Method
Section titled “BuildFilePathMap(db, componentPathMap, useShortNames) Method”Builds a mapping from File keys to installation paths.
Declaration
Section titled “Declaration”public static InstallPathMap BuildFilePathMap( WixToolset.Dtf.WindowsInstaller.Database db, InstallPathMap componentPathMap, bool useShortNames)Parameters
Section titled “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
Section titled “Return value”InstallPathMap An InstallPathMap with the described mapping.
Clear() Method
Section titled “Clear() Method”Removes all entries from the dictionary.
Declaration
Section titled “Declaration”public void Clear()ContainsKey(key) Method
Section titled “ContainsKey(key) Method”Tests whether a direcotry, component, or file key exists in the map.
Declaration
Section titled “Declaration”public bool ContainsKey( string key)Parameters
Section titled “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
Section titled “Return value”bool true if the key is found; false otherwise
GetEnumerator() Method
Section titled “GetEnumerator() Method”Gets an enumerator over all entries in the dictionary.
Declaration
Section titled “Declaration”public IEnumerator<System.Collections.Generic.KeyValuePair`2<System.String,WixToolset.Dtf.WindowsInstaller.Package.InstallPath>> GetEnumerator()Return value
Section titled “Return value”IEnumerator<System.Collections.Generic.KeyValuePair2<System.String,WixToolset.Dtf.WindowsInstaller.Package.InstallPath>>` An enumerator for the dictionary.
Remove(key) Method
Section titled “Remove(key) Method”Removes an install path from the map.
Declaration
Section titled “Declaration”public bool Remove( string key)Parameters
Section titled “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
Section titled “Return value”bool true if the item was removed, false if it did not exist
Remarks
Section titled “Remarks”Changing an install path does not modify the Database used to generate this InstallPathMap.
Count Property
Section titled “Count Property”Gets the number of entries in the dictionary.
Declaration
Section titled “Declaration”public int Count { get; set; }Item Property
Section titled “Item Property”Gets or sets an install path for a direcotry, component, or file key.
Declaration
Section titled “Declaration”public InstallPath Item[ string key] { get; set; }Parameters
Section titled “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
Section titled “Remarks”Changing an install path does not modify the Database used to generate this InstallPathMap.
Keys Property
Section titled “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
Section titled “Declaration”public System.Collections.Generic.ICollection<System.String> Keys { get; set; }SourcePaths Property
Section titled “SourcePaths Property”Gets a mapping from keys to source paths.
Declaration
Section titled “Declaration”public System.Collections.Generic.IDictionary<System.String,System.String> SourcePaths { get; set; }TargetPaths Property
Section titled “TargetPaths Property”Gets a mapping from keys to target paths.
Declaration
Section titled “Declaration”public System.Collections.Generic.IDictionary<System.String,System.String> TargetPaths { get; set; }Values Property
Section titled “Values Property”Gets the collection of InstallPath values in the InstallPathMap.
Declaration
Section titled “Declaration”public System.Collections.Generic.ICollection<WixToolset.Dtf.WindowsInstaller.Package.InstallPath> Values { get; set; }