2 // System.Web.UI.PersistChildrenAttribute.cs
4 // Duncan Mak (duncan@ximian.com)
11 namespace System.Web.UI {
13 [AttributeUsage (AttributeTargets.Class)]
14 public sealed class PersistChildrenAttribute : Attribute
18 public PersistChildrenAttribute (bool persist)
20 this.persist = persist;
23 public static readonly PersistChildrenAttribute Default = new PersistChildrenAttribute (true);
24 public static readonly PersistChildrenAttribute Yes = new PersistChildrenAttribute (true);
25 public static readonly PersistChildrenAttribute No = new PersistChildrenAttribute (false);
28 get { return persist; }
31 public override bool Equals (object obj)
33 if (!(obj is PersistChildrenAttribute))
36 return (((PersistChildrenAttribute) obj).persist == persist);
39 public override int GetHashCode ()
41 return persist ? 1 : 0;
44 public override bool IsDefaultAttribute ()
46 return (persist == true);