static ReinstallModesConverter()
{
CharToModeMap = new Dictionary<char, ReinstallModes>(CharComparer.InvariantCultureIgnoreCase);
CharToModeMap.Add('p', ReinstallModes.FileMissing);
CharToModeMap.Add('o', ReinstallModes.FileOlderVersion);
CharToModeMap.Add('e', ReinstallModes.FileEqualVersion);
CharToModeMap.Add('d', ReinstallModes.FileExact);
CharToModeMap.Add('c', ReinstallModes.FileVerify);
CharToModeMap.Add('a', ReinstallModes.FileReplace);
CharToModeMap.Add('u', ReinstallModes.UserData);
CharToModeMap.Add('m', ReinstallModes.MachineData);
CharToModeMap.Add('s', ReinstallModes.Shortcut);
CharToModeMap.Add('v', ReinstallModes.Package);
// Reverse the key/value pairs.
ModeToCharMap = new Dictionary<ReinstallModes, char>();
foreach (var entry in CharToModeMap)
{
ModeToCharMap.Add(entry.Value, entry.Key);
}
}