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

◆ WriteEvent() [18/18]

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

Definition at line 706 of file EventSource.cs.

707 {
708 //The blocks IL_004b, IL_004e, IL_0060, IL_0122 are reachable both inside and outside the pinned region starting at IL_0048. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement.
709 if (!IsEnabled())
710 {
711 return;
712 }
713 if (arg1 == null)
714 {
715 arg1 = "";
716 }
717 if (arg2 == null)
718 {
719 arg2 = "";
720 }
721 if (arg3 == null)
722 {
723 arg3 = "";
724 }
725 fixed (char* ptr5 = arg1)
726 {
727 char* intPtr;
728 if (arg2 == null)
729 {
730 char* ptr;
731 intPtr = (ptr = null);
732 fixed (char* ptr2 = arg3)
733 {
734 char* ptr3 = ptr2;
735 EventData* ptr4 = stackalloc EventData[3];
736 ptr4->DataPointer = (IntPtr)ptr5;
737 ptr4->Size = (arg1.Length + 1) * 2;
738 ptr4->Reserved = 0;
739 ptr4[1].DataPointer = (IntPtr)ptr;
740 ptr4[1].Size = (arg2.Length + 1) * 2;
741 ptr4[1].Reserved = 0;
742 ptr4[2].DataPointer = (IntPtr)ptr3;
743 ptr4[2].Size = (arg3.Length + 1) * 2;
744 ptr4[2].Reserved = 0;
746 }
747 return;
748 }
749 fixed (char* ptr6 = &arg2.GetPinnableReference())
750 {
751 char* ptr;
752 intPtr = (ptr = ptr6);
753 fixed (char* ptr2 = arg3)
754 {
755 char* ptr3 = ptr2;
756 EventData* ptr4 = stackalloc EventData[3];
757 ptr4->DataPointer = (IntPtr)ptr5;
758 ptr4->Size = (arg1.Length + 1) * 2;
759 ptr4->Reserved = 0;
760 ptr4[1].DataPointer = (IntPtr)ptr;
761 ptr4[1].Size = (arg2.Length + 1) * 2;
762 ptr4[1].Reserved = 0;
763 ptr4[2].DataPointer = (IntPtr)ptr3;
764 ptr4[2].Size = (arg3.Length + 1) * 2;
765 ptr4[2].Reserved = 0;
767 }
768 }
769 }
770 }
unsafe void WriteEventCore(int eventId, int eventDataCount, EventData *data)

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