System.ComponentModel.DebugReflectPropertyDescriptor.ShouldSerializeValue C# (CSharp) Method

ShouldSerializeValue() public method

public ShouldSerializeValue ( object component ) : bool
component object
return bool
        public override bool ShouldSerializeValue(object component) {

            component = GetDebugInvokee(componentClass, component);

            if (IsReadOnly) {
                if (ShouldSerializeMethodValue != null) {
                    try {
                        return (bool)ShouldSerializeMethodValue.Invoke(component, null);
                    }
                    catch {}
                }
                return Attributes.Contains(DesignerSerializationVisibilityAttribute.Content);
            }
            else if (DefaultValue == noValue) {
                if (ShouldSerializeMethodValue != null) {
                    try {
                        return (bool)ShouldSerializeMethodValue.Invoke(component, null);
                    }
                    catch {}
                }
                return true;
            }
            return !object.Equals(DefaultValue, GetValue(component));
        }