mscorlib(4.0.0.0) API with additions
XmlArrayAttribute.cs
1 using System.Xml.Schema;
2 
4 {
6  [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = false)]
7  [global::__DynamicallyInvokable]
8  public class XmlArrayAttribute : Attribute
9  {
10  private string elementName;
11 
12  private string ns;
13 
14  private bool nullable;
15 
16  private XmlSchemaForm form;
17 
18  private int order = -1;
19 
22  [global::__DynamicallyInvokable]
23  public string ElementName
24  {
25  [global::__DynamicallyInvokable]
26  get
27  {
28  if (elementName != null)
29  {
30  return elementName;
31  }
32  return string.Empty;
33  }
34  [global::__DynamicallyInvokable]
35  set
36  {
37  elementName = value;
38  }
39  }
40 
43  [global::__DynamicallyInvokable]
44  public string Namespace
45  {
46  [global::__DynamicallyInvokable]
47  get
48  {
49  return ns;
50  }
51  [global::__DynamicallyInvokable]
52  set
53  {
54  ns = value;
55  }
56  }
57 
61  [global::__DynamicallyInvokable]
62  public bool IsNullable
63  {
64  [global::__DynamicallyInvokable]
65  get
66  {
67  return nullable;
68  }
69  [global::__DynamicallyInvokable]
70  set
71  {
72  nullable = value;
73  }
74  }
75 
78  [global::__DynamicallyInvokable]
79  public XmlSchemaForm Form
80  {
81  [global::__DynamicallyInvokable]
82  get
83  {
84  return form;
85  }
86  [global::__DynamicallyInvokable]
87  set
88  {
89  form = value;
90  }
91  }
92 
95  [global::__DynamicallyInvokable]
96  public int Order
97  {
98  [global::__DynamicallyInvokable]
99  get
100  {
101  return order;
102  }
103  [global::__DynamicallyInvokable]
104  set
105  {
106  if (value < 0)
107  {
108  throw new ArgumentException(Res.GetString("XmlDisallowNegativeValues"), "Order");
109  }
110  order = value;
111  }
112  }
113 
115  [global::__DynamicallyInvokable]
117  {
118  }
119 
122  [global::__DynamicallyInvokable]
123  public XmlArrayAttribute(string elementName)
124  {
125  this.elementName = elementName;
126  }
127  }
128 }
XmlSchemaForm Form
Gets or sets a value that indicates whether the XML element name generated by the T:System....
XmlSchemaForm
Indicates if attributes or elements need to be qualified with a namespace prefix.
Definition: XmlSchemaForm.cs:7
Represents the base class for custom attributes.
Definition: Attribute.cs:15
Definition: __Canon.cs:3
string Namespace
Gets or sets the namespace of the XML element.
XmlArrayAttribute(string elementName)
Initializes a new instance of the T:System.Xml.Serialization.XmlArrayAttribute class and specifies th...
bool IsNullable
Gets or sets a value that indicates whether the T:System.Xml.Serialization.XmlSerializer must seriali...
AttributeTargets
Specifies the application elements on which it is valid to apply an attribute.
The exception that is thrown when one of the arguments provided to a method is not valid.
string ElementName
Gets or sets the XML element name given to the serialized array.
XmlArrayAttribute()
Initializes a new instance of the T:System.Xml.Serialization.XmlArrayAttribute class.
int Order
Gets or sets the explicit order in which the elements are serialized or deserialized.
Specifies that the T:System.Xml.Serialization.XmlSerializer must serialize a particular class member ...