* XmlAnyElementAttribute.cs, XmlArrayItemAttribute.cs: Added AllowMultiple flag.
[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;
11 using System;
12
13 namespace System.Xml.Serialization
14 {
15         /// <summary>
16         /// Summary description for XmlArrayItemAttribute.
17         /// </summary>
18         [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field
19                  | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple=true)]
20         public class XmlArrayItemAttribute : Attribute
21         {
22                 private string dataType;
23                 private string elementName;
24                 private XmlSchemaForm form;
25                 private string ns;
26                 private bool isNullable;
27                 private int nestingLevel;
28                 private Type type;
29                 private int order;
30
31                 public XmlArrayItemAttribute ()
32                 {
33                 }
34                 public XmlArrayItemAttribute (string elementName)
35                 {
36                         ElementName = elementName;
37                 }
38                 public XmlArrayItemAttribute (Type type)
39                 {
40                         Type = type;
41                 }
42                 public XmlArrayItemAttribute (string elementName, Type type)
43                 {
44                         ElementName = elementName;
45                         Type = type;
46                 }
47
48                 public string DataType {
49                         get { return dataType; }
50                         set { dataType = value; }
51                 }
52                 public string ElementName {
53                         get { return elementName; }
54                         set { elementName = value; }
55                 }
56                 public XmlSchemaForm Form {
57                         get { return form; }
58                         set { form = value; }
59                 }
60                 public string Namespace {
61                         get { return ns; }
62                         set { ns = value; }
63                 }
64                 public bool IsNullable {
65                         get { return isNullable; } 
66                         set { isNullable = value; }
67                 }
68                 public Type Type {
69                         get { return type; }
70                         set { type = value; }
71                 }
72                 public int NestingLevel {
73                         get { return nestingLevel; }
74                         set { nestingLevel = value; }
75                 }
76                 /// <summary>
77                 /// Specifies Order in which Memberswill be serialized as Elements.
78                 /// </summary>
79                 public int Order
80                 {
81                         get{ return  order; }
82                         set{ order = value; }
83                 }
84         }
85 }