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

◆ GetValue() [1/2]

override object System.ComponentModel.ReflectPropertyDescriptor.GetValue ( object component)
inline

Definition at line 696 of file ReflectPropertyDescriptor.cs.

697 {
698 if (IsExtender)
699 {
700 return null;
701 }
702 if (component != null)
703 {
704 component = GetInvocationTarget(_componentClass, component);
705 try
706 {
707 return GetMethodValue.Invoke(component, null);
708 }
709 catch (Exception innerException)
710 {
711 string text = null;
712 ISite site = ((component is IComponent component2) ? component2.Site : null);
713 if (site != null && site.Name != null)
714 {
715 text = site.Name;
716 }
717 if (text == null)
718 {
719 text = component.GetType().FullName;
720 }
721 if (innerException is TargetInvocationException)
722 {
723 innerException = innerException.InnerException;
724 }
725 string p = innerException.Message ?? innerException.GetType().Name;
727 }
728 }
729 return null;
730 }
override? object GetInvocationTarget(Type type, object instance)
object? Invoke(object? obj, object?[]? parameters)
static string ErrorPropertyAccessorException
Definition SR.cs:124
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
Definition SR.cs:7

References System.SR.ErrorPropertyAccessorException, System.SR.Format(), System.Exception.GetType(), System.Exception.InnerException, System.ComponentModel.ISite.Name, System.Reflection.MemberInfo.Name, System.Name, and System.text.

Referenced by System.ComponentModel.ReflectPropertyDescriptor.CanResetValue().