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

◆ ShouldSerializeValue()

override bool System.ComponentModel.ReflectPropertyDescriptor.ShouldSerializeValue ( object component)
inline

Definition at line 877 of file ReflectPropertyDescriptor.cs.

878 {
879 component = GetInvocationTarget(_componentClass, component);
880 if (IsReadOnly)
881 {
882 if (ShouldSerializeMethodValue != null)
883 {
884 try
885 {
886 return (bool)ShouldSerializeMethodValue.Invoke(component, null);
887 }
888 catch
889 {
890 }
891 }
893 }
894 if (DefaultValue == s_noValue)
895 {
896 if (ShouldSerializeMethodValue != null)
897 {
898 try
899 {
900 return (bool)ShouldSerializeMethodValue.Invoke(component, null);
901 }
902 catch
903 {
904 }
905 }
906 return true;
907 }
908 return !object.Equals(DefaultValue, GetValue(component));
909 }
override? object GetInvocationTarget(Type type, object instance)
object? Invoke(object? obj, object?[]? parameters)

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