| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- //
- // System.ComponentModel.DesignOnlyAttribute.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.Property)]
- public sealed class DesignOnlyAttribute : Attribute
- {
- private bool design_only;
- public static readonly DesignOnlyAttribute Default = new DesignOnlyAttribute (false);
- public static readonly DesignOnlyAttribute No = new DesignOnlyAttribute (false);
- public static readonly DesignOnlyAttribute Yes = new DesignOnlyAttribute (true);
- public DesignOnlyAttribute (bool design_only)
- {
- this.design_only = design_only;
- }
- public bool IsDesignOnly {
- get { return design_only; }
- }
- public override bool Equals (object obj)
- {
- if (!(obj is DesignOnlyAttribute))
- return false;
- if (obj == this)
- return true;
- return ((DesignOnlyAttribute) obj).IsDesignOnly == design_only;
- }
- public override int GetHashCode ()
- {
- return design_only.GetHashCode ();
- }
- public override bool IsDefaultAttribute ()
- {
- return design_only == DesignOnlyAttribute.Default.IsDesignOnly;
- }
- }
- }
|