Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SourceSwitch.cs
Go to the documentation of this file.
1namespace System.Diagnostics;
2
3public class SourceSwitch : Switch
4{
6 {
7 get
8 {
9 return (SourceLevels)base.SwitchSetting;
10 }
11 set
12 {
13 base.SwitchSetting = (int)value;
14 }
15 }
16
17 public SourceSwitch(string name)
18 : base(name, string.Empty)
19 {
20 }
21
22 public SourceSwitch(string displayName, string defaultSwitchValue)
23 : base(displayName, string.Empty, defaultSwitchValue)
24 {
25 }
26
27 public bool ShouldTrace(TraceEventType eventType)
28 {
29 return ((uint)base.SwitchSetting & (uint)eventType) != 0;
30 }
31
32 protected override void OnValueChanged()
33 {
34 base.SwitchSetting = (int)Enum.Parse(typeof(SourceLevels), base.Value, ignoreCase: true);
35 }
36}
SourceSwitch(string displayName, string defaultSwitchValue)
bool ShouldTrace(TraceEventType eventType)
static object Parse(Type enumType, string value)
Definition Enum.cs:368