Description
We need a helper class to properly get/set and reset the global values in LocalAppContextSwitches during testing. We currently have a bunch of reflection code duplicated in several places, and most (all?) of them aren't properly capturing current values and ensuring they get reset after the test.
I suggest we create an RAII helper that captures current values during construction, has getters to retrieve the global values, setters to manipulate the global values, uses IDisposable to reset all values back to their original state.