Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ WriteEvent() [11/18]

unsafe void System.Diagnostics.Tracing.EventSource.WriteEvent ( int eventId,
long arg1,
string? arg2 )
inlineprotectedinherited

Definition at line 845 of file EventSource.cs.

846 {
847 if (IsEnabled())
848 {
849 if (arg2 == null)
850 {
851 arg2 = "";
852 }
853 fixed (char* ptr2 = arg2)
854 {
855 EventData* ptr = stackalloc EventData[2];
856 ptr->DataPointer = (IntPtr)(&arg1);
857 ptr->Size = 8;
858 ptr->Reserved = 0;
859 ptr[1].DataPointer = (IntPtr)ptr2;
860 ptr[1].Size = (arg2.Length + 1) * 2;
861 ptr[1].Reserved = 0;
863 }
864 }
865 }
unsafe void WriteEventCore(int eventId, int eventDataCount, EventData *data)

References System.Diagnostics.Tracing.EventSource.IsEnabled(), and System.Diagnostics.Tracing.EventSource.WriteEventCore().