Skip to main content

InstallPathMap Class

Represents a mapping of install paths for all directories, components, or files in an installation database.

Methods​

MethodDescription
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​

PropertyDescription
CountGets the number of entries in the dictionary.
ItemGets or sets an install path for a direcotry, component, or file key.
KeysGets the collection of keys in the InstallPathMap. Depending on the type of InstallPathMap, they are all directory, component, or file key strings.
SourcePathsGets a mapping from keys to source paths.
TargetPathsGets a mapping from keys to target paths.
ValuesGets the collection of InstallPath values in the InstallPathMap.

WixToolset.Dtf.WindowsInstaller.Package.dll version 6.0.0+8c7432e50072e009353ea5f2c956ccf453476f71

Add(key, installPath) Method​

Sets an install path for a direcotry, component, or file key.

Declaration​

public void Add(
string key,
InstallPath installPath
)

Parameters​

ParameterTypeDescription
keystringDepending on the type of InstallPathMap, this is the primary key from the either the Directory, Component, or File table.
installPathInstallPathThe 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​

ParameterTypeDescription
dbWixToolset.Dtf.WindowsInstaller.DatabaseInstallation database.
directoryPathMapInstallPathMapDirectory 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​

ParameterTypeDescription
dbWixToolset.Dtf.WindowsInstaller.DatabaseInstallation database.
useShortNamesbooltrue 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​

ParameterTypeDescription
dbWixToolset.Dtf.WindowsInstaller.DatabaseDatabase containing the Directory table.
useShortNamesbooltrue to use short directory names; false to use long names
sourceRootDirstringThe root directory path of all source paths, or null to leave them relative.
targetRootDirstringThe 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​

ParameterTypeDescription
dbWixToolset.Dtf.WindowsInstaller.DatabaseInstallation database.
componentPathMapInstallPathMapComponent mapping returned by .
useShortNamesbooltrue 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​

ParameterTypeDescription
keystringDepending 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.KeyValuePair2<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​

ParameterTypeDescription
keystringDepending 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​

ParameterTypeDescription
keystringDepending 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; }