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

◆ GetFactory()

static Func< object, PropertyValue > System.Diagnostics.Tracing.PropertyValue.GetFactory ( Type type)
inlinestatic

Definition at line 370 of file PropertyValue.cs.

371 {
372 if (type == typeof(bool))
373 {
374 return (object value) => new PropertyValue((bool)value);
375 }
376 if (type == typeof(byte))
377 {
378 return (object value) => new PropertyValue((byte)value);
379 }
380 if (type == typeof(sbyte))
381 {
382 return (object value) => new PropertyValue((sbyte)value);
383 }
384 if (type == typeof(char))
385 {
386 return (object value) => new PropertyValue((char)value);
387 }
388 if (type == typeof(short))
389 {
390 return (object value) => new PropertyValue((short)value);
391 }
392 if (type == typeof(ushort))
393 {
394 return (object value) => new PropertyValue((ushort)value);
395 }
396 if (type == typeof(int))
397 {
398 return (object value) => new PropertyValue((int)value);
399 }
400 if (type == typeof(uint))
401 {
402 return (object value) => new PropertyValue((uint)value);
403 }
404 if (type == typeof(long))
405 {
406 return (object value) => new PropertyValue((long)value);
407 }
408 if (type == typeof(ulong))
409 {
410 return (object value) => new PropertyValue((ulong)value);
411 }
412 if (type == typeof(IntPtr))
413 {
414 return (object value) => new PropertyValue((IntPtr)value);
415 }
416 if (type == typeof(UIntPtr))
417 {
418 return (object value) => new PropertyValue((UIntPtr)value);
419 }
420 if (type == typeof(float))
421 {
422 return (object value) => new PropertyValue((float)value);
423 }
424 if (type == typeof(double))
425 {
426 return (object value) => new PropertyValue((double)value);
427 }
428 if (type == typeof(Guid))
429 {
430 return (object value) => new PropertyValue((Guid)value);
431 }
432 if (type == typeof(DateTime))
433 {
434 return (object value) => new PropertyValue((DateTime)value);
435 }
436 if (type == typeof(DateTimeOffset))
437 {
438 return (object value) => new PropertyValue((DateTimeOffset)value);
439 }
440 if (type == typeof(TimeSpan))
441 {
442 return (object value) => new PropertyValue((TimeSpan)value);
443 }
444 if (type == typeof(decimal))
445 {
446 return (object value) => new PropertyValue((decimal)value);
447 }
448 return (object value) => new PropertyValue(value);
449 }

References System.Diagnostics.Tracing.PropertyValue.PropertyValue(), System.type, and System.value.

Referenced by System.Diagnostics.Tracing.TraceLoggingTypeInfo.TraceLoggingTypeInfo(), System.Diagnostics.Tracing.TraceLoggingTypeInfo.TraceLoggingTypeInfo(), and System.Diagnostics.Tracing.PropertyValue.GetBoxedValueTypePropertyGetter().