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));
}