2002-06-27 Ajay kumar Dwivedi <adwiv@yahoo.com>
[mono.git] / mcs / class / System.XML / System.Xml.Serialization / XmlArrayItemAttribute.cs
1 //
2 // XmlArrayItemAttribute.cs: 
3 //
4 // Author:
5 //   John Donagher (john@webmeta.com)
6 //
7 // (C) 2002 John Donagher
8 //
9
10 using System.Xml.Schema;\r
11 using System;\r
12 \r
13 namespace System.Xml.Serialization\r
14 {\r
15         /// <summary>\r
16         /// Summary description for XmlArrayItemAttribute.\r
17         /// </summary>\r
18         [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field\r
19                  | AttributeTargets.Parameter | AttributeTargets.ReturnValue)]\r
20         public class XmlArrayItemAttribute : Attribute\r
21         {\r
22                 private string dataType;\r
23                 private string elementName;\r
24                 private XmlSchemaForm form;\r
25                 private string ns;\r
26                 private bool isNullable;\r
27                 private int nestingLevel;\r
28                 private Type type;\r
29                 private int order;\r
30 \r
31                 public XmlArrayItemAttribute ()\r
32                 {\r
33                 }\r
34                 public XmlArrayItemAttribute (string elementName)\r
35                 {\r
36                         ElementName = elementName;\r
37                 }\r
38                 public XmlArrayItemAttribute (Type type)\r
39                 {\r
40                         Type = type;\r
41                 }\r
42                 public XmlArrayItemAttribute (string elementName, Type type)\r
43                 {\r
44                         ElementName = elementName;\r
45                         Type = type;\r
46                 }\r
47 \r
48                 public string DataType {\r
49                         get { return dataType; }\r
50                         set { dataType = value; }\r
51                 }\r
52                 public string ElementName {\r
53                         get { return elementName; }\r
54                         set { elementName = value; }\r
55                 }\r
56                 public XmlSchemaForm Form {\r
57                         get { return form; }\r
58                         set { form = value; }\r
59                 }\r
60                 public string Namespace {\r
61                         get { return ns; }\r
62                         set { ns = value; }\r
63                 }\r
64                 public bool IsNullable {\r
65                         get { return isNullable; } \r
66                         set { isNullable = value; }\r
67                 }\r
68                 public Type Type {\r
69                         get { return type; }\r
70                         set { type = value; }\r
71                 }\r
72                 public int NestingLevel {\r
73                         get { return nestingLevel; }\r
74                         set { nestingLevel = value; }\r
75                 }\r
76                 /// <summary>\r
77                 /// Specifies Order in which Memberswill be serialized as Elements.\r
78                 /// </summary>\r
79                 public int Order\r
80                 {\r
81                         get{ return  order; }\r
82                         set{ order = value; }\r
83                 }\r
84         }\r
85 }\r