mscorlib(4.0.0.0) API with additions
DesignerSerializationVisibilityAttribute.cs
1 namespace System.ComponentModel
2 {
4  [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event)]
6  {
9 
12 
15 
18 
19  private DesignerSerializationVisibility visibility;
20 
24 
28  {
29  this.visibility = visibility;
30  }
31 
36  public override bool Equals(object obj)
37  {
38  if (obj == this)
39  {
40  return true;
41  }
42  DesignerSerializationVisibilityAttribute designerSerializationVisibilityAttribute = obj as DesignerSerializationVisibilityAttribute;
43  if (designerSerializationVisibilityAttribute != null)
44  {
45  return designerSerializationVisibilityAttribute.Visibility == visibility;
46  }
47  return false;
48  }
49 
52  public override int GetHashCode()
53  {
54  return base.GetHashCode();
55  }
56 
60  public override bool IsDefaultAttribute()
61  {
62  return Equals(Default);
63  }
64  }
65 }
Specifies the type of persistence to use when serializing a property on a component at design time.
static readonly DesignerSerializationVisibilityAttribute Default
Specifies the default value, which is F:System.ComponentModel.DesignerSerializationVisibilityAttribut...
Represents the base class for custom attributes.
Definition: Attribute.cs:15
override bool Equals(object obj)
Indicates whether this instance and a specified object are equal.
DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility visibility)
Initializes a new instance of the T:System.ComponentModel.DesignerSerializationVisibilityAttribute cl...
override bool IsDefaultAttribute()
Gets a value indicating whether the current value of the attribute is the default value for the attri...
static readonly DesignerSerializationVisibilityAttribute Hidden
Specifies that a serializer should not serialize the value of the property. This static field is read...
static readonly DesignerSerializationVisibilityAttribute Visible
Specifies that a serializer should be allowed to serialize the value of the property....
DesignerSerializationVisibility Visibility
Gets a value indicating the basic serialization mode a serializer should use when determining whether...
AttributeTargets
Specifies the application elements on which it is valid to apply an attribute.
DesignerSerializationVisibility
Specifies the visibility a property has to the design-time serializer.
static readonly DesignerSerializationVisibilityAttribute Content
Specifies that a serializer should serialize the contents of the property, rather than the property i...