blob: a60e22ad0a5c6a116a8369581c0af077b44489f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
//
// System.Web.UI.PersistChildrenAttribute.cs
//
// Duncan Mak (duncan@ximian.com)
//
// (C) Ximian, Inc.
//
using System;
namespace System.Web.UI {
[AttributeUsage (AttributeTargets.Class)]
public sealed class PersistChildrenAttribute : Attribute
{
bool persist;
public PersistChildrenAttribute (bool persist)
{
this.persist = persist;
}
public static readonly PersistChildrenAttribute Default = new PersistChildrenAttribute (true);
public static readonly PersistChildrenAttribute Yes = new PersistChildrenAttribute (true);
public static readonly PersistChildrenAttribute No = new PersistChildrenAttribute (false);
public bool Persist {
get { return persist; }
}
public override bool Equals (object obj)
{
if (!(obj is PersistChildrenAttribute))
return false;
return (((PersistChildrenAttribute) obj).persist == persist);
}
public override int GetHashCode ()
{
return persist ? 1 : 0;
}
public override bool IsDefaultAttribute ()
{
return (persist == true);
}
}
}
|