Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetCachedSwitchValueInternal() [4/4]

static bool System.LocalAppContextSwitches.GetCachedSwitchValueInternal ( string switchName,
ref int cachedSwitchValue )
inlinestaticprivate

Definition at line 32 of file LocalAppContextSwitches.cs.

33 {
34 if (!AppContext.TryGetSwitch(switchName, out var isEnabled))
35 {
36 isEnabled = GetSwitchDefaultValue(switchName);
37 }
38 AppContext.TryGetSwitch("TestSwitch.LocalAppContext.DisableCaching", out var isEnabled2);
39 if (!isEnabled2)
40 {
41 cachedSwitchValue = (isEnabled ? 1 : (-1));
42 }
43 return isEnabled;
44 }
static bool GetSwitchDefaultValue(string switchName)

References System.LocalAppContextSwitches.GetSwitchDefaultValue(), and System.AppContext.TryGetSwitch().