Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
TraceLoggingEventTypes.cs
Go to the documentation of this file.
4
6
8{
9 internal readonly TraceLoggingTypeInfo[] typeInfos;
10
11 internal readonly string[] paramNames;
12
13 internal readonly string name;
14
15 internal readonly EventTags tags;
16
17 internal readonly byte level;
18
19 internal readonly byte opcode;
20
21 internal readonly EventKeywords keywords;
22
23 internal readonly byte[] typeMetadata;
24
25 internal readonly int scratchSize;
26
27 internal readonly int dataCount;
28
29 internal readonly int pinCount;
30
32
33 internal string Name => name;
34
35 internal EventTags Tags => tags;
36
37 [RequiresUnreferencedCode("EventSource WriteEvent will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type")]
42
47
48 [RequiresUnreferencedCode("EventSource WriteEvent will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type")]
79
103
105 {
106 return nameInfos.TryGet(new KeyValuePair<string, EventTags>(name, tags)) ?? nameInfos.GetOrAdd(new NameInfo(name, tags, typeMetadata.Length));
107 }
108
109 [RequiresUnreferencedCode("EventSource WriteEvent will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type")]
111 {
112 if (paramInfos == null)
113 {
114 throw new ArgumentNullException("paramInfos");
115 }
118 for (int i = 0; i < paramInfos.Length; i++)
119 {
121 }
122 return array;
123 }
124
125 [RequiresUnreferencedCode("EventSource WriteEvent will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type")]
127 {
128 if (types == null)
129 {
130 throw new ArgumentNullException("types");
131 }
134 for (int i = 0; i < types.Length; i++)
135 {
137 }
138 return array;
139 }
140
142 {
143 if (typeInfos == null)
144 {
145 throw new ArgumentNullException("typeInfos");
146 }
147 return (TraceLoggingTypeInfo[])typeInfos.Clone();
148 }
149
150 private static string[] MakeParamNameArray(ParameterInfo[] paramInfos)
151 {
152 string[] array = new string[paramInfos.Length];
153 for (int i = 0; i < array.Length; i++)
154 {
155 array[i] = paramInfos[i].Name;
156 }
157 return array;
158 }
159}
static bool ShouldOverrideFieldName(string fieldName)
Definition Statics.cs:74
static byte Combine(int settingValue, byte defaultValue)
Definition Statics.cs:48
static TraceLoggingTypeInfo[] MakeArray(Type[] types)
TraceLoggingEventTypes(string name, EventTags tags, params TraceLoggingTypeInfo[] typeInfos)
TraceLoggingEventTypes(string name, EventTags tags, ParameterInfo[] paramInfos)
ConcurrentSet< KeyValuePair< string, EventTags >, NameInfo > nameInfos
static string[] MakeParamNameArray(ParameterInfo[] paramInfos)
TraceLoggingEventTypes(EventTags tags, string defaultName, TraceLoggingTypeInfo[] typeInfos)
static TraceLoggingTypeInfo[] MakeArray(TraceLoggingTypeInfo[] typeInfos)
NameInfo GetNameInfo(string name, EventTags tags)
TraceLoggingEventTypes(string name, EventTags tags, params Type[] types)
static TraceLoggingTypeInfo[] MakeArray(ParameterInfo[] paramInfos)
static TraceLoggingTypeInfo GetInstance(Type type, List< Type > recursionCheck)