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

◆ PinArray()

unsafe void System.Diagnostics.Tracing.DataCollector.PinArray ( object value,
int size )
inlineprivate

Definition at line 218 of file DataCollector.cs.

219 {
220 GCHandle* ptr = pins;
221 if (pinsEnd <= ptr)
222 {
223 throw new IndexOutOfRangeException(SR.EventSource_PinArrayOutOfRange);
224 }
225 EventSource.EventData* ptr2 = datas;
226 if (datasEnd <= ptr2)
227 {
228 throw new IndexOutOfRangeException(SR.EventSource_DataDescriptorsOutOfRange);
229 }
230 pins = ptr + 1;
231 datas = ptr2 + 1;
232 *ptr = GCHandle.Alloc(value, GCHandleType.Pinned);
233 ptr2->DataPointer = ptr->AddrOfPinnedObject();
234 ptr2->m_Size = size;
235 }
unsafe EventSource.EventData * datas
unsafe EventSource.EventData * datasEnd
static GCHandle Alloc(object? value)
Definition GCHandle.cs:81

References System.Runtime.InteropServices.GCHandle.AddrOfPinnedObject(), System.Runtime.InteropServices.GCHandle.Alloc(), System.Diagnostics.Tracing.DataCollector.datas, System.Diagnostics.Tracing.DataCollector.datasEnd, System.SR.EventSource_DataDescriptorsOutOfRange, System.SR.EventSource_PinArrayOutOfRange, System.Diagnostics.Tracing.DataCollector.pins, System.Diagnostics.Tracing.DataCollector.pinsEnd, and System.value.

Referenced by System.Diagnostics.Tracing.DataCollector.AddArray(), System.Diagnostics.Tracing.DataCollector.AddNullTerminatedString(), and System.Diagnostics.Tracing.DataCollector.EndBuffered().