This commit was manufactured by cvs2svn to create branch 'mono-1-0'.
[mono.git] / mcs / class / System.Web.Services / System.Web.Services.Configuration / XmlFormatExtensionAttribute.cs
1  // \r
2 // System.Web.Services.Configuration.XmlFormatExtensionAttribute.cs\r
3 //\r
4 // Author:\r
5 //   Tim Coleman (tim@timcoleman.com)\r
6 //\r
7 // Copyright (C) Tim Coleman, 2002\r
8 //\r
9
10 //
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 // 
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 // 
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 \r
31 namespace System.Web.Services.Configuration {\r
32         [AttributeUsage (AttributeTargets.Class, Inherited = true)]\r
33         public sealed class XmlFormatExtensionAttribute : Attribute {\r
34 \r
35                 #region Fields\r
36 \r
37                 string elementName;\r
38                 string ns;\r
39                 Type[] extensionPoints;\r
40 \r
41                 #endregion // Fields\r
42 \r
43                 #region Constructors\r
44 \r
45                 public XmlFormatExtensionAttribute ()\r
46                 {\r
47                 }\r
48 \r
49                 public XmlFormatExtensionAttribute (string elementName, string ns, Type extensionPoint1)\r
50                         : this (elementName, ns, new Type[1] {extensionPoint1})\r
51                 {\r
52                 }\r
53 \r
54                 public XmlFormatExtensionAttribute (string elementName, string ns, Type[] extensionPoints)\r
55                         : this ()\r
56                 {\r
57                         this.elementName = elementName;\r
58                         this.ns = ns;\r
59                         this.extensionPoints = extensionPoints;\r
60                 }\r
61 \r
62                 public XmlFormatExtensionAttribute (string elementName, string ns, Type extensionPoint1, Type extensionPoint2)\r
63                         : this (elementName, ns, new Type[2] {extensionPoint1, extensionPoint2})\r
64                 {\r
65                 }\r
66 \r
67                 public XmlFormatExtensionAttribute (string elementName, string ns, Type extensionPoint1, Type extensionPoint2, Type extensionPoint3)\r
68                         : this (elementName, ns, new Type[3] {extensionPoint1, extensionPoint2, extensionPoint3})\r
69                 {\r
70                 }\r
71 \r
72                 public XmlFormatExtensionAttribute (string elementName, string ns, Type extensionPoint1, Type extensionPoint2, Type extensionPoint3, Type extensionPoint4)\r
73                         : this (elementName, ns, new Type[4] {extensionPoint1, extensionPoint2, extensionPoint3, extensionPoint4})\r
74                 {\r
75                 }\r
76                 \r
77                 #endregion // Constructors\r
78 \r
79                 #region Properties\r
80 \r
81                 public string ElementName {\r
82                         get { return elementName; }\r
83                         set { elementName = value; }\r
84                 }\r
85 \r
86                 public Type[] ExtensionPoints {\r
87                         get { return extensionPoints; }\r
88                         set { extensionPoints = value; }\r
89                 }\r
90 \r
91                 public string Namespace {\r
92                         get { return ns; }\r
93                         set { ns = value; }\r
94                 }\r
95 \r
96                 #endregion // Properties\r
97         }\r
98 }\r