Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ScalarArrayTypeInfo.cs
Go to the documentation of this file.
2
4{
6
7 private static ScalarArrayTypeInfo s_byte;
8
10
12
14
16
18
20
22
24
26
28
30
32
34
36
37 private readonly int elementSize;
38
40 : base(type)
41 {
42 this.nativeFormat = nativeFormat;
43 this.elementSize = elementSize;
44 }
45
47 {
49 }
50
55
57 {
58 return s_boolean ?? (s_boolean = new ScalarArrayTypeInfo(typeof(bool[]), TraceLoggingDataType.Boolean8, 1));
59 }
60
61 public static TraceLoggingTypeInfo Byte()
62 {
63 return s_byte ?? (s_byte = new ScalarArrayTypeInfo(typeof(byte[]), TraceLoggingDataType.UInt8, 1));
64 }
65
67 {
68 return s_sbyte ?? (s_sbyte = new ScalarArrayTypeInfo(typeof(sbyte[]), TraceLoggingDataType.Int8, 1));
69 }
70
71 public static TraceLoggingTypeInfo Char()
72 {
73 return s_char ?? (s_char = new ScalarArrayTypeInfo(typeof(char[]), TraceLoggingDataType.Char16, 2));
74 }
75
77 {
78 return s_int16 ?? (s_int16 = new ScalarArrayTypeInfo(typeof(short[]), TraceLoggingDataType.Int16, 2));
79 }
80
82 {
83 return s_uint16 ?? (s_uint16 = new ScalarArrayTypeInfo(typeof(ushort[]), TraceLoggingDataType.UInt16, 2));
84 }
85
87 {
88 return s_int32 ?? (s_int32 = new ScalarArrayTypeInfo(typeof(int[]), TraceLoggingDataType.Int32, 4));
89 }
90
92 {
93 return s_uint32 ?? (s_uint32 = new ScalarArrayTypeInfo(typeof(uint[]), TraceLoggingDataType.UInt32, 4));
94 }
95
97 {
98 return s_int64 ?? (s_int64 = new ScalarArrayTypeInfo(typeof(long[]), TraceLoggingDataType.Int64, 8));
99 }
100
102 {
103 return s_uint64 ?? (s_uint64 = new ScalarArrayTypeInfo(typeof(ulong[]), TraceLoggingDataType.UInt64, 8));
104 }
105
107 {
109 }
110
112 {
114 }
115
117 {
118 return s_single ?? (s_single = new ScalarArrayTypeInfo(typeof(float[]), TraceLoggingDataType.Float, 4));
119 }
120
122 {
123 return s_double ?? (s_double = new ScalarArrayTypeInfo(typeof(double[]), TraceLoggingDataType.Double, 8));
124 }
125
126 public unsafe static TraceLoggingTypeInfo Guid()
127 {
128 return s_guid ?? (s_guid = new ScalarArrayTypeInfo(typeof(Guid[]), TraceLoggingDataType.Guid, sizeof(Guid)));
129 }
130}
ScalarArrayTypeInfo(Type type, TraceLoggingDataType nativeFormat, int elementSize)
override void WriteData(PropertyValue value)
override void WriteMetadata(TraceLoggingMetadataCollector collector, string name, EventFieldFormat format)
static unsafe TraceLoggingTypeInfo Guid()
static readonly TraceLoggingDataType UIntPtrType
Definition Statics.cs:13
static TraceLoggingDataType FormatScalar(EventFieldFormat format, TraceLoggingDataType nativeFormat)
Definition Statics.cs:133
static readonly TraceLoggingDataType IntPtrType
Definition Statics.cs:11
static void AddArray(PropertyValue value, int elementSize)
static int Size
Definition IntPtr.cs:21