| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- //
- // System.ComponentModel.RefreshPropertiesAttribute.cs
- //
- // Author:
- // Tim Coleman ([email protected])
- // Andreas Nahr ([email protected])
- //
- // Copyright (C) Tim Coleman, 2002
- // (C) 2003 Andreas Nahr
- //
- //
- namespace System.ComponentModel {
- [AttributeUsage (AttributeTargets.All)]
- public sealed class RefreshPropertiesAttribute : Attribute {
- #region Fields
- RefreshProperties refresh;
- #endregion // Fields
-
- public static readonly RefreshPropertiesAttribute All = new RefreshPropertiesAttribute (RefreshProperties.All);
- public static readonly RefreshPropertiesAttribute Default = new RefreshPropertiesAttribute (RefreshProperties.None);
- public static readonly RefreshPropertiesAttribute Repaint = new RefreshPropertiesAttribute (RefreshProperties.Repaint);
- #region Constructors
- public RefreshPropertiesAttribute (RefreshProperties refresh)
- {
- this.refresh = refresh;
- }
- #endregion // Constructors
- #region Properties
- public RefreshProperties RefreshProperties {
- get { return refresh; }
- }
- #endregion // Properties
- #region Methods
- public override bool Equals (object obj)
- {
- if (!(obj is RefreshPropertiesAttribute))
- return false;
- if (obj == this)
- return true;
- return ((RefreshPropertiesAttribute) obj).RefreshProperties == refresh;
- }
- public override int GetHashCode ()
- {
- return refresh.GetHashCode ();
- }
- public override bool IsDefaultAttribute ()
- {
- return (this == RefreshPropertiesAttribute.Default);
- }
- #endregion // Methods
- }
- }
|