Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
EventCommandEventArgs.cs
Go to the documentation of this file.
2
4
6{
8
10
12
14
16
17 internal int etwSessionId;
18
19 internal bool enable;
20
21 internal EventLevel level;
22
24
26
27 public EventCommand Command { get; internal set; }
28
29 public IDictionary<string, string?>? Arguments { get; internal set; }
30
31 public bool EnableEvent(int eventId)
32 {
33 if (Command != EventCommand.Enable && Command != EventCommand.Disable)
34 {
35 throw new InvalidOperationException();
36 }
38 }
39
40 public bool DisableEvent(int eventId)
41 {
42 if (Command != EventCommand.Enable && Command != EventCommand.Disable)
43 {
44 throw new InvalidOperationException();
45 }
47 }
48
50 {
53 this.eventSource = eventSource;
54 this.listener = listener;
55 this.eventProviderType = eventProviderType;
56 this.perEventSourceSessionId = perEventSourceSessionId;
57 this.etwSessionId = etwSessionId;
58 this.enable = enable;
59 this.level = level;
60 this.matchAnyKeyword = matchAnyKeyword;
61 }
62}
EventCommandEventArgs(EventCommand command, IDictionary< string, string > arguments, EventSource eventSource, EventListener listener, EventProviderType eventProviderType, int perEventSourceSessionId, int etwSessionId, bool enable, EventLevel level, EventKeywords matchAnyKeyword)
bool EnableEventForDispatcher(EventDispatcher dispatcher, EventProviderType eventProviderType, int eventId, bool value)