Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ScalarTypeInfo.cs
Go to the documentation of this file.
2
3internal sealed class ScalarTypeInfo : TraceLoggingTypeInfo
4{
5 private static ScalarTypeInfo s_boolean;
6
7 private static ScalarTypeInfo s_byte;
8
9 private static ScalarTypeInfo s_sbyte;
10
11 private static ScalarTypeInfo s_char;
12
13 private static ScalarTypeInfo s_int16;
14
15 private static ScalarTypeInfo s_uint16;
16
17 private static ScalarTypeInfo s_int32;
18
19 private static ScalarTypeInfo s_uint32;
20
21 private static ScalarTypeInfo s_int64;
22
23 private static ScalarTypeInfo s_uint64;
24
25 private static ScalarTypeInfo s_intptr;
26
27 private static ScalarTypeInfo s_uintptr;
28
29 private static ScalarTypeInfo s_single;
30
31 private static ScalarTypeInfo s_double;
32
33 private static ScalarTypeInfo s_guid;
34
36
38 : base(type)
39 {
40 this.nativeFormat = nativeFormat;
41 }
42
44 {
46 }
47
52
54 {
55 return s_boolean ?? (s_boolean = new ScalarTypeInfo(typeof(bool), TraceLoggingDataType.Boolean8));
56 }
57
58 public static TraceLoggingTypeInfo Byte()
59 {
60 return s_byte ?? (s_byte = new ScalarTypeInfo(typeof(byte), TraceLoggingDataType.UInt8));
61 }
62
64 {
65 return s_sbyte ?? (s_sbyte = new ScalarTypeInfo(typeof(sbyte), TraceLoggingDataType.Int8));
66 }
67
68 public static TraceLoggingTypeInfo Char()
69 {
70 return s_char ?? (s_char = new ScalarTypeInfo(typeof(char), TraceLoggingDataType.Char16));
71 }
72
74 {
75 return s_int16 ?? (s_int16 = new ScalarTypeInfo(typeof(short), TraceLoggingDataType.Int16));
76 }
77
79 {
80 return s_uint16 ?? (s_uint16 = new ScalarTypeInfo(typeof(ushort), TraceLoggingDataType.UInt16));
81 }
82
84 {
85 return s_int32 ?? (s_int32 = new ScalarTypeInfo(typeof(int), TraceLoggingDataType.Int32));
86 }
87
89 {
90 return s_uint32 ?? (s_uint32 = new ScalarTypeInfo(typeof(uint), TraceLoggingDataType.UInt32));
91 }
92
94 {
95 return s_int64 ?? (s_int64 = new ScalarTypeInfo(typeof(long), TraceLoggingDataType.Int64));
96 }
97
99 {
100 return s_uint64 ?? (s_uint64 = new ScalarTypeInfo(typeof(ulong), TraceLoggingDataType.UInt64));
101 }
102
104 {
105 return s_intptr ?? (s_intptr = new ScalarTypeInfo(typeof(IntPtr), Statics.IntPtrType));
106 }
107
109 {
110 return s_uintptr ?? (s_uintptr = new ScalarTypeInfo(typeof(UIntPtr), Statics.UIntPtrType));
111 }
112
114 {
115 return s_single ?? (s_single = new ScalarTypeInfo(typeof(float), TraceLoggingDataType.Float));
116 }
117
119 {
120 return s_double ?? (s_double = new ScalarTypeInfo(typeof(double), TraceLoggingDataType.Double));
121 }
122
124 {
125 return s_guid ?? (s_guid = new ScalarTypeInfo(typeof(Guid), TraceLoggingDataType.Guid));
126 }
127}
static TraceLoggingTypeInfo UInt32()
static TraceLoggingTypeInfo Char()
static TraceLoggingTypeInfo Int32()
static TraceLoggingTypeInfo Guid()
static TraceLoggingTypeInfo Single()
ScalarTypeInfo(Type type, TraceLoggingDataType nativeFormat)
static TraceLoggingTypeInfo UInt64()
override void WriteMetadata(TraceLoggingMetadataCollector collector, string name, EventFieldFormat format)
static TraceLoggingTypeInfo UInt16()
static TraceLoggingTypeInfo UIntPtr()
static TraceLoggingTypeInfo SByte()
static TraceLoggingTypeInfo Boolean()
static TraceLoggingTypeInfo Int64()
static TraceLoggingTypeInfo Int16()
static TraceLoggingTypeInfo Byte()
static TraceLoggingTypeInfo Double()
override void WriteData(PropertyValue value)
readonly TraceLoggingDataType nativeFormat
static TraceLoggingTypeInfo IntPtr()
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