Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
FrameworkEventSource.cs
Go to the documentation of this file.
3
5
6[EventSource(Guid = "8E9F5090-2D75-4d03-8A81-E5AFBF85DAF1", Name = "System.Diagnostics.Eventing.FrameworkEventSource")]
7internal sealed class FrameworkEventSource : EventSource
8{
9 public static class Keywords
10 {
12
14 }
15
16 public static class Tasks
17 {
19 }
20
21 private const string EventSourceSuppressMessage = "Parameters to this method are primitive and are trimmer safe";
22
23 public static readonly FrameworkEventSource Log = new FrameworkEventSource();
24
25 private protected override ReadOnlySpan<byte> ProviderMetadata => new byte[51]
26 {
27 51, 0, 83, 121, 115, 116, 101, 109, 46, 68,
28 105, 97, 103, 110, 111, 115, 116, 105, 99, 115,
29 46, 69, 118, 101, 110, 116, 105, 110, 103, 46,
30 70, 114, 97, 109, 101, 119, 111, 114, 107, 69,
31 118, 101, 110, 116, 83, 111, 117, 114, 99, 101,
32 0
33 };
34
35 private FrameworkEventSource(int _)
36 {
37 }
38
39 [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:UnrecognizedReflectionPattern", Justification = "Parameters to this method are primitive and are trimmer safe")]
40 [NonEvent]
41 private unsafe void WriteEvent(int eventId, long arg1, int arg2, string arg3, bool arg4, int arg5, int arg6)
42 {
43 if (IsEnabled())
44 {
45 if (arg3 == null)
46 {
47 arg3 = "";
48 }
49 fixed (char* ptr2 = arg3)
50 {
51 EventData* ptr = stackalloc EventData[6];
52 ptr->DataPointer = (IntPtr)(&arg1);
53 ptr->Size = 8;
54 ptr->Reserved = 0;
55 ptr[1].DataPointer = (IntPtr)(&arg2);
56 ptr[1].Size = 4;
57 ptr[1].Reserved = 0;
58 ptr[2].DataPointer = (IntPtr)ptr2;
59 ptr[2].Size = (arg3.Length + 1) * 2;
60 ptr[2].Reserved = 0;
61 ptr[3].DataPointer = (IntPtr)(&arg4);
62 ptr[3].Size = 4;
63 ptr[3].Reserved = 0;
64 ptr[4].DataPointer = (IntPtr)(&arg5);
65 ptr[4].Size = 4;
66 ptr[4].Reserved = 0;
67 ptr[5].DataPointer = (IntPtr)(&arg6);
68 ptr[5].Size = 4;
69 ptr[5].Reserved = 0;
70 WriteEventCore(eventId, 6, ptr);
71 }
72 }
73 }
74
75 [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:UnrecognizedReflectionPattern", Justification = "Parameters to this method are primitive and are trimmer safe")]
76 [NonEvent]
77 private unsafe void WriteEvent(int eventId, long arg1, int arg2, string arg3)
78 {
79 if (IsEnabled())
80 {
81 if (arg3 == null)
82 {
83 arg3 = "";
84 }
85 fixed (char* ptr2 = arg3)
86 {
87 EventData* ptr = stackalloc EventData[3];
88 ptr->DataPointer = (IntPtr)(&arg1);
89 ptr->Size = 8;
90 ptr->Reserved = 0;
91 ptr[1].DataPointer = (IntPtr)(&arg2);
92 ptr[1].Size = 4;
93 ptr[1].Reserved = 0;
94 ptr[2].DataPointer = (IntPtr)ptr2;
95 ptr[2].Size = (arg3.Length + 1) * 2;
96 ptr[2].Reserved = 0;
97 WriteEventCore(eventId, 3, ptr);
98 }
99 }
100 }
101
102 [Event(30, Level = EventLevel.Verbose, Keywords = (EventKeywords)18L)]
103 public void ThreadPoolEnqueueWork(long workID)
104 {
105 WriteEvent(30, workID);
106 }
107
108 [MethodImpl(MethodImplOptions.NoInlining)]
109 [NonEvent]
110 public void ThreadPoolEnqueueWorkObject(object workID)
111 {
112 ThreadPoolEnqueueWork(workID.GetHashCode());
113 }
114
115 [Event(31, Level = EventLevel.Verbose, Keywords = (EventKeywords)18L)]
116 public void ThreadPoolDequeueWork(long workID)
117 {
118 WriteEvent(31, workID);
119 }
120
121 [MethodImpl(MethodImplOptions.NoInlining)]
122 [NonEvent]
123 public void ThreadPoolDequeueWorkObject(object workID)
124 {
125 ThreadPoolDequeueWork(workID.GetHashCode());
126 }
127
128 [Event(150, Level = EventLevel.Informational, Keywords = (EventKeywords)16L, Task = (EventTask)3, Opcode = EventOpcode.Send)]
129 public void ThreadTransferSend(long id, int kind, string info, bool multiDequeues, int intInfo1, int intInfo2)
130 {
131 WriteEvent(150, id, kind, info, multiDequeues, intInfo1, intInfo2);
132 }
133
134 [NonEvent]
135 public void ThreadTransferSendObj(object id, int kind, string info, bool multiDequeues, int intInfo1, int intInfo2)
136 {
137 ThreadTransferSend(id.GetHashCode(), kind, info, multiDequeues, intInfo1, intInfo2);
138 }
139
140 [Event(151, Level = EventLevel.Informational, Keywords = (EventKeywords)16L, Task = (EventTask)3, Opcode = EventOpcode.Receive)]
141 public void ThreadTransferReceive(long id, int kind, string info)
142 {
143 WriteEvent(151, id, kind, info);
144 }
145
146 [NonEvent]
147 public void ThreadTransferReceiveObj(object id, int kind, string info)
148 {
149 ThreadTransferReceive(id.GetHashCode(), kind, info);
150 }
151
153 : base(new Guid(2392805520u, 11637, 19715, 138, 129, 229, 175, 191, 133, 218, 241), "System.Diagnostics.Eventing.FrameworkEventSource")
154 {
155 }
156}
unsafe void WriteEventCore(int eventId, int eventDataCount, EventData *data)
unsafe void WriteEvent(int eventId, long arg1, int arg2, string arg3, bool arg4, int arg5, int arg6)
void ThreadTransferReceive(long id, int kind, string info)
void ThreadTransferReceiveObj(object id, int kind, string info)
void ThreadTransferSend(long id, int kind, string info, bool multiDequeues, int intInfo1, int intInfo2)
void ThreadTransferSendObj(object id, int kind, string info, bool multiDequeues, int intInfo1, int intInfo2)
unsafe void WriteEvent(int eventId, long arg1, int arg2, string arg3)