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

◆ GetBoxedValueTypePropertyGetter()

static Func< PropertyValue, PropertyValue > System.Diagnostics.Tracing.PropertyValue.GetBoxedValueTypePropertyGetter ( PropertyInfo property)
inlinestaticprivate

Definition at line 460 of file PropertyValue.cs.

461 {
462 Type type = property.PropertyType;
463 if (type.IsEnum)
464 {
465 type = Enum.GetUnderlyingType(type);
466 }
467 Func<object, PropertyValue> factory = GetFactory(type);
468 return (PropertyValue container) => factory(property.GetValue(container.ReferenceValue));
469 }
object? GetValue(object? obj)
static Func< object, PropertyValue > GetFactory(Type type)

References System.Diagnostics.Tracing.PropertyValue.GetFactory(), System.Enum.GetUnderlyingType(), System.Reflection.PropertyInfo.GetValue(), System.Diagnostics.Tracing.PropertyValue.ReferenceValue, and System.type.

Referenced by System.Diagnostics.Tracing.PropertyValue.GetPropertyGetter().