2004-05-06 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / System.XML / System.Xml.Schema / XmlSchemaAnnotated.cs
1 // Author: Dwivedi, Ajay kumar\r
2 //            Adwiv@Yahoo.com\r
3 using System;\r
4 using System.Collections;\r
5 using System.Xml;\r
6 using System.Xml.Serialization;\r
7 \r
8 namespace System.Xml.Schema\r
9 {\r
10         /// <summary>\r
11         /// Summary description for XmlSchemaAnnotated.\r
12         /// </summary>\r
13 \r
14         public class XmlSchemaAnnotated : XmlSchemaObject\r
15         {\r
16                 private XmlSchemaAnnotation annotation;\r
17                 private string id;\r
18                 private XmlAttribute[] unhandledAttributes;\r
19 \r
20                 public XmlSchemaAnnotated()\r
21                 {}\r
22                 \r
23                 [System.Xml.Serialization.XmlAttribute("id")]\r
24                 public string Id \r
25                 { \r
26                         get{ return  id; } \r
27                         set{ id = value; } \r
28                 }\r
29                 \r
30                 [XmlElement("annotation",Namespace=XmlSchema.Namespace)]\r
31                 public XmlSchemaAnnotation Annotation \r
32                 { \r
33                         get{ return  annotation; } \r
34                         set{ annotation = value; } \r
35                 }\r
36                 \r
37                 [XmlAnyAttribute]\r
38                 public XmlAttribute[] UnhandledAttributes \r
39                 { \r
40                         get\r
41                         {\r
42                                 if(unhandledAttributeList != null)\r
43                                 {\r
44                                         unhandledAttributes = (XmlAttribute[]) unhandledAttributeList.ToArray(typeof(XmlAttribute));\r
45                                         unhandledAttributeList = null;\r
46                                 }\r
47                                 return unhandledAttributes;\r
48                         }\r
49                         set\r
50                         { \r
51                                 unhandledAttributes = value; \r
52                                 unhandledAttributeList = null;\r
53                         }\r
54                 }\r
55         }\r
56 }\r