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

◆ LogSwitchValues()

static void System.AppContext.LogSwitchValues ( RuntimeEventSource ev)
inlinestaticpackage

Definition at line 147 of file AppContext.cs.

148 {
149 if (s_switches != null)
150 {
152 {
154 {
155 ev.LogAppContextSwitch(s_switch.Key, s_switch.Value ? 1 : 0);
156 }
157 }
158 }
159 if (s_dataStore == null)
160 {
161 return;
162 }
164 {
165 if (s_switches != null)
166 {
168 {
170 return;
171 }
172 }
173 LogDataStore(ev, null);
174 }
176 {
178 {
179 if (item.Value is string value && bool.TryParse(value, out var result) && (switches == null || !switches.ContainsKey(item.Key)))
180 {
181 ev.LogAppContextSwitch(item.Key, result ? 1 : 0);
182 }
183 }
184 }
185 }
static Dictionary< string, object > s_dataStore
Definition AppContext.cs:15
static Dictionary< string, bool > s_switches
Definition AppContext.cs:17

References System.Collections.Generic.Dictionary< TKey, TValue >.ContainsKey(), System.item, System.AppContext.s_dataStore, System.AppContext.s_switches, and System.value.

Referenced by System.Diagnostics.Tracing.RuntimeEventSource.OnEventCommand().