CheckFileMap (level, map);
- if (locationSubPath == null)
+ if (locationSubPath == null) {
switch (level) {
case ConfigurationUserLevel.PerUserRoaming:
if (map.RoamingUserConfigFilename == null)
locationSubPath = "local";
break;
}
-
- configPath = null;
- string next = null;
-
- locationConfigPath = null;
+ }
if (locationSubPath == "exe" || locationSubPath == null && map.ExeConfigFilename != null) {
configPath = "exe";
- next = "machine";
+ locationSubPath = "machine";
locationConfigPath = map.ExeConfigFilename;
+ return;
}
if (locationSubPath == "local" && map.LocalUserConfigFilename != null) {
configPath = "local";
- next = "roaming";
+ locationSubPath = "roaming";
locationConfigPath = map.LocalUserConfigFilename;
+ return;
}
if (locationSubPath == "roaming" && map.RoamingUserConfigFilename != null) {
configPath = "roaming";
- next = "exe";
+ locationSubPath = "exe";
locationConfigPath = map.RoamingUserConfigFilename;
+ return;
}
- if ((locationSubPath == "machine" || configPath == null) && map.MachineConfigFilename != null) {
+ if (locationSubPath == "machine" && map.MachineConfigFilename != null) {
configPath = "machine";
- next = null;
+ locationSubPath = null;
+ locationConfigPath = null;
+ return;
}
- locationSubPath = next;
+
+ throw new NotImplementedException ();
}
}