| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- //
- // System.ComponentModel.BrowsableAttribute.cs
- //
- // Author:
- // Miguel de Icaza ([email protected])
- // Andreas Nahr ([email protected])
- //
- // (C) Ximian, Inc. http://www.ximian.com
- // (C) 2003 Andreas Nahr
- //
- //
- namespace System.ComponentModel {
- [AttributeUsage (AttributeTargets.All)]
- public sealed class BrowsableAttribute : Attribute
- {
- private bool browsable;
- public static readonly BrowsableAttribute Default = new BrowsableAttribute (true);
- public static readonly BrowsableAttribute No = new BrowsableAttribute (false);
- public static readonly BrowsableAttribute Yes = new BrowsableAttribute (true);
- public BrowsableAttribute ()
- {
- }
- public BrowsableAttribute (bool browsable)
- {
- this.browsable = browsable;
- }
- public bool Browsable {
- get { return browsable; }
- }
- public override bool Equals (object obj)
- {
- if (!(obj is BrowsableAttribute))
- return false;
- if (obj == this)
- return true;
- return ((BrowsableAttribute) obj).Browsable == browsable;
- }
- public override int GetHashCode ()
- {
- return browsable.GetHashCode ();
- }
- public override bool IsDefaultAttribute ()
- {
- return browsable == BrowsableAttribute.Default.Browsable;
- }
- }
- }
|