private static void TryGetSwitchOverridePartial(string switchName, ref bool overrideFound, ref bool overrideValue) { string text = null; overrideFound = false; if (!AppContextDefaultValues.s_errorReadingRegistry) { text = AppContextDefaultValues.GetSwitchValueFromRegistry(switchName); } if (text == null) { text = CompatibilitySwitch.GetValue(switchName); } bool flag; if (text != null && bool.TryParse(text, out flag)) { overrideValue = flag; overrideFound = true; } }
private static void TryGetSwitchOverridePartial(string switchName, ref bool overrideFound, ref bool overrideValue) { string str = (string)null; overrideFound = false; if (AppContextDefaultValues.s_switchesRegKey != null) { str = AppContextDefaultValues.s_switchesRegKey.GetValue(switchName, (object)null) as string; } if (str == null) { str = CompatibilitySwitch.GetValue(switchName); } bool result; if (str == null || !bool.TryParse(str, out result)) { return; } overrideValue = result; overrideFound = true; }