blob: 68460ec2d2849fa7174a681f9602ecb68e896079 (
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
51
52
53
54
55
56
57
58
59
60
61
|
//
// System.Web.UI.PersistenceModeAttribute.cs
//
// Duncan Mak (duncan@ximian.com)
//
// (C) Ximian, Inc.
//
using System;
namespace System.Web.UI {
[AttributeUsage (AttributeTargets.All)]
public sealed class PersistenceModeAttribute : Attribute
{
PersistenceMode mode;
public PersistenceModeAttribute (PersistenceMode mode)
{
this.mode = mode;
}
public static readonly PersistenceModeAttribute Attribute =
new PersistenceModeAttribute (PersistenceMode.Attribute);
public static readonly PersistenceModeAttribute Default =
new PersistenceModeAttribute (PersistenceMode.Attribute);
public static readonly PersistenceModeAttribute EncodedInnerDefaultProperty =
new PersistenceModeAttribute (PersistenceMode.EncodedInnerDefaultProperty);
public static readonly PersistenceModeAttribute InnerDefaultProperty =
new PersistenceModeAttribute (PersistenceMode.InnerDefaultProperty);
public static readonly PersistenceModeAttribute InnerProperty =
new PersistenceModeAttribute (PersistenceMode.InnerProperty);
public PersistenceMode Mode {
get { return mode; }
}
public override bool Equals (object obj)
{
if (!(obj is PersistenceModeAttribute))
return false;
return ((PersistenceModeAttribute) obj).mode == mode;
}
public override int GetHashCode ()
{
return (int) mode;
}
public override bool IsDefaultAttribute ()
{
return (mode == PersistenceMode.Attribute);
}
}
}
|