Update Reference Sources to .NET Framework 4.6.1
[mono.git] / mcs / class / referencesource / System.Xml / System / Xml / Serialization / XmlArrayItemAttribute.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="XmlArrayItemAttribute.cs" company="Microsoft">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 // <owner current="true" primary="true">[....]</owner>                                                                
6 //------------------------------------------------------------------------------
7
8 namespace System.Xml.Serialization {
9
10     using System;
11     using System.Xml.Schema;
12
13     /// <include file='doc\XmlArrayItemAttribute.uex' path='docs/doc[@for="XmlArrayItemAttribute"]/*' />
14     /// <devdoc>
15     ///    <para>[To be supplied.]</para>
16     /// </devdoc>
17     [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple=true)]
18     public class XmlArrayItemAttribute : System.Attribute {
19         string elementName;
20         Type type;
21         string ns;
22         string dataType;
23         bool nullable;
24         bool nullableSpecified = false;
25         XmlSchemaForm form = XmlSchemaForm.None;
26         int nestingLevel;
27         
28         /// <include file='doc\XmlArrayItemAttribute.uex' path='docs/doc[@for="XmlArrayItemAttribute.XmlArrayItemAttribute"]/*' />
29         /// <devdoc>
30         ///    <para>[To be supplied.]</para>
31         /// </devdoc>
32         public XmlArrayItemAttribute() {
33         }
34         
35         /// <include file='doc\XmlArrayItemAttribute.uex' path='docs/doc[@for="XmlArrayItemAttribute.XmlArrayItemAttribute1"]/*' />
36         /// <devdoc>
37         ///    <para>[To be supplied.]</para>
38         /// </devdoc>
39         public XmlArrayItemAttribute(string elementName) {
40             this.elementName = elementName;
41         }
42         
43         /// <include file='doc\XmlArrayItemAttribute.uex' path='docs/doc[@for="XmlArrayItemAttribute.XmlArrayItemAttribute2"]/*' />
44         /// <devdoc>
45         ///    <para>[To be supplied.]</para>
46         /// </devdoc>
47         public XmlArrayItemAttribute(Type type) {
48             this.type = type;
49         }
50         
51         /// <include file='doc\XmlArrayItemAttribute.uex' path='docs/doc[@for="XmlArrayItemAttribute.XmlArrayItemAttribute3"]/*' />
52         /// <devdoc>
53         ///    <para>[To be supplied.]</para>
54         /// </devdoc>
55         public XmlArrayItemAttribute(string elementName, Type type) {
56             this.elementName = elementName;
57             this.type = type;
58         }
59         
60         /// <include file='doc\XmlArrayItemAttribute.uex' path='docs/doc[@for="XmlArrayItemAttribute.Type"]/*' />
61         /// <devdoc>
62         ///    <para>[To be supplied.]</para>
63         /// </devdoc>
64         public Type Type {
65             get { return type; }
66             set { type = value; }
67         }
68         
69         /// <include file='doc\XmlArrayItemAttribute.uex' path='docs/doc[@for="XmlArrayItemAttribute.ElementName"]/*' />
70         /// <devdoc>
71         ///    <para>[To be supplied.]</para>
72         /// </devdoc>
73         public string ElementName {
74             get { return elementName == null ? string.Empty : elementName; }
75             set { elementName = value; }
76         }
77
78         /// <include file='doc\XmlArrayItemAttribute.uex' path='docs/doc[@for="XmlArrayItemAttribute.Namespace"]/*' />
79         /// <devdoc>
80         ///    <para>[To be supplied.]</para>
81         /// </devdoc>
82         public string Namespace {
83             get { return ns; }
84             set { ns = value; }
85         }
86
87         /// <include file='doc\XmlArrayItemAttribute.uex' path='docs/doc[@for="XmlArrayItemAttribute.NestingLevel"]/*' />
88         public int NestingLevel {
89             get { return nestingLevel; }
90             set { nestingLevel = value; }
91         }
92
93         /// <include file='doc\XmlArrayItemAttribute.uex' path='docs/doc[@for="XmlArrayItemAttribute.DataType"]/*' />
94         /// <devdoc>
95         ///    <para>[To be supplied.]</para>
96         /// </devdoc>
97         public string DataType {
98             get { return dataType == null ? string.Empty : dataType; }
99             set { dataType = value; }
100         }
101
102         /// <include file='doc\XmlArrayItemAttribute.uex' path='docs/doc[@for="XmlArrayItemAttribute.IsNullable"]/*' />
103         /// <devdoc>
104         ///    <para>[To be supplied.]</para>
105         /// </devdoc>
106         public bool IsNullable {
107             get { return nullable; }
108             set { nullable = value; nullableSpecified = true; }
109         }
110
111         internal bool IsNullableSpecified {
112             get { return nullableSpecified; }
113         }
114
115         /// <include file='doc\XmlArrayItemAttribute.uex' path='docs/doc[@for="XmlArrayItemAttribute.Form"]/*' />
116         /// <devdoc>
117         ///    <para>[To be supplied.]</para>
118         /// </devdoc>
119         public XmlSchemaForm Form {
120             get { return form; }
121             set { form = value; }
122         }
123     }
124  }