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

◆ GetTypeInfoFromType()

static bool System.Diagnostics.Tracing.EventParameterInfo.GetTypeInfoFromType ( Type type,
out TraceLoggingTypeInfo typeInfo )
inlinestaticpackage

Definition at line 176 of file EventParameterInfo.cs.

177 {
178 if (type == typeof(bool))
179 {
180 typeInfo = ScalarTypeInfo.Boolean();
181 return true;
182 }
183 if (type == typeof(byte))
184 {
185 typeInfo = ScalarTypeInfo.Byte();
186 return true;
187 }
188 if (type == typeof(sbyte))
189 {
190 typeInfo = ScalarTypeInfo.SByte();
191 return true;
192 }
193 if (type == typeof(char))
194 {
195 typeInfo = ScalarTypeInfo.Char();
196 return true;
197 }
198 if (type == typeof(short))
199 {
200 typeInfo = ScalarTypeInfo.Int16();
201 return true;
202 }
203 if (type == typeof(ushort))
204 {
205 typeInfo = ScalarTypeInfo.UInt16();
206 return true;
207 }
208 if (type == typeof(int))
209 {
210 typeInfo = ScalarTypeInfo.Int32();
211 return true;
212 }
213 if (type == typeof(uint))
214 {
215 typeInfo = ScalarTypeInfo.UInt32();
216 return true;
217 }
218 if (type == typeof(long))
219 {
220 typeInfo = ScalarTypeInfo.Int64();
221 return true;
222 }
223 if (type == typeof(ulong))
224 {
225 typeInfo = ScalarTypeInfo.UInt64();
226 return true;
227 }
228 if (type == typeof(IntPtr))
229 {
230 typeInfo = ScalarTypeInfo.IntPtr();
231 return true;
232 }
233 if (type == typeof(UIntPtr))
234 {
235 typeInfo = ScalarTypeInfo.UIntPtr();
236 return true;
237 }
238 if (type == typeof(float))
239 {
240 typeInfo = ScalarTypeInfo.Single();
241 return true;
242 }
243 if (type == typeof(double))
244 {
245 typeInfo = ScalarTypeInfo.Double();
246 return true;
247 }
248 if (type == typeof(Guid))
249 {
250 typeInfo = ScalarTypeInfo.Guid();
251 return true;
252 }
253 typeInfo = null;
254 return false;
255 }

References System.Diagnostics.Tracing.ScalarTypeInfo.Boolean(), System.Diagnostics.Tracing.ScalarTypeInfo.Byte(), System.Diagnostics.Tracing.ScalarTypeInfo.Char(), System.Diagnostics.Tracing.ScalarTypeInfo.Double(), System.Diagnostics.Tracing.ScalarTypeInfo.Guid(), System.Diagnostics.Tracing.ScalarTypeInfo.Int16(), System.Diagnostics.Tracing.ScalarTypeInfo.Int32(), System.Diagnostics.Tracing.ScalarTypeInfo.Int64(), System.Diagnostics.Tracing.ScalarTypeInfo.IntPtr(), System.Diagnostics.Tracing.ScalarTypeInfo.SByte(), System.Diagnostics.Tracing.ScalarTypeInfo.Single(), System.type, System.Diagnostics.Tracing.ScalarTypeInfo.UInt16(), System.Diagnostics.Tracing.ScalarTypeInfo.UInt32(), System.Diagnostics.Tracing.ScalarTypeInfo.UInt64(), and System.Diagnostics.Tracing.ScalarTypeInfo.UIntPtr().

Referenced by System.Diagnostics.Tracing.EventPipeMetadataGenerator.GenerateEventMetadata(), System.Diagnostics.Tracing.EventParameterInfo.GenerateMetadataForTypeV2(), and System.Diagnostics.Tracing.EventParameterInfo.GetMetadataLengthForTypeV2().