2002-05-10 Duncan Mak <duncan@ximian.com>
[mono.git] / mcs / class / System.Web / System.Web.UI / ParseChildrenAttribute.cs
1 //
2 // System.Web.UI.ParseChildrenAttribute.cs
3 //
4 // Duncan Mak  (duncan@ximian.com)
5 //
6 // (C) Ximian, Inc.
7 //
8
9 using System;
10
11 namespace System.Web.UI {
12
13         [AttributeUsage (AttributeTargets.Class)]
14         public sealed class ParseChildrenAttribute : Attribute
15         {
16                 bool childrenAsProperties;
17                 string defaultProperty;
18
19                 // LAMESPEC
20                 public ParseChildrenAttribute ()
21                 {
22                         childrenAsProperties = false;
23                         defaultProperty = "";
24                 }
25
26                 public ParseChildrenAttribute (bool childrenAsProperties)
27                 {
28                         this.childrenAsProperties = childrenAsProperties;
29                         this.defaultProperty = "";
30                 }
31
32                 public ParseChildrenAttribute (bool childrenAsProperties,
33                                                string defaultProperty)
34                 {
35                         this.childrenAsProperties = childrenAsProperties;
36                         this.defaultProperty = defaultProperty;
37                 }
38
39                 public static readonly ParseChildrenAttribute Default;
40
41                 public bool ChildrenAsProperties {
42
43                         get { return childrenAsProperties; }
44
45                         set { childrenAsProperties = value; }
46                 }
47
48                 public string DefaultProperty {
49                         get { return defaultProperty; }
50
51                         set { defaultProperty = value; }
52                 }
53
54                 [MonoTODO]
55                 public override bool Equals (object obj)
56                 {
57                         return false;
58                 }
59
60                 [MonoTODO]
61                 public override int GetHashCode ()
62                 {
63                         return 42;
64                 }
65
66                 [MonoTODO]
67                 public override bool IsDefaultAttribute ()
68                 {
69                         return false;
70                 }
71         }
72 }