Updates referencesource to .NET 4.7
[mono.git] / mcs / class / referencesource / System.Xml / System / Xml / Serialization / XmlAttributeAttribute.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="XmlAttributeAttribute.cs" company="Microsoft">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 // <owner current="true" primary="true">Microsoft</owner>                                                                
6 //------------------------------------------------------------------------------
7
8 namespace System.Xml.Serialization {
9
10     using System;
11     using System.Xml.Schema;
12
13     /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute"]/*' />
14     /// <devdoc>
15     ///    <para>[To be supplied.]</para>
16     /// </devdoc>
17     [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
18     public class XmlAttributeAttribute : System.Attribute {
19         string attributeName;
20         Type type;
21         string ns;
22         string dataType;
23         XmlSchemaForm form = XmlSchemaForm.None;
24         
25         /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute.XmlAttributeAttribute"]/*' />
26         /// <devdoc>
27         ///    <para>[To be supplied.]</para>
28         /// </devdoc>
29         public XmlAttributeAttribute() {
30         }
31         
32         /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute.XmlAttributeAttribute1"]/*' />
33         /// <devdoc>
34         ///    <para>[To be supplied.]</para>
35         /// </devdoc>
36         public XmlAttributeAttribute(string attributeName) {
37             this.attributeName = attributeName;
38         }
39         
40         /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute.XmlAttributeAttribute2"]/*' />
41         /// <devdoc>
42         ///    <para>[To be supplied.]</para>
43         /// </devdoc>
44         public XmlAttributeAttribute(Type type) {
45             this.type = type;
46         }
47         
48         /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute.XmlAttributeAttribute3"]/*' />
49         /// <devdoc>
50         ///    <para>[To be supplied.]</para>
51         /// </devdoc>
52         public XmlAttributeAttribute(string attributeName, Type type) {
53             this.attributeName = attributeName;
54             this.type = type;
55         }
56
57         /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute.Type"]/*' />
58         /// <devdoc>
59         ///    <para>[To be supplied.]</para>
60         /// </devdoc>
61         public Type Type {
62             get { return type; }
63             set { type = value; }
64         }
65        
66         /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute.AttributeName"]/*' />
67         /// <devdoc>
68         ///    <para>[To be supplied.]</para>
69         /// </devdoc>
70         public string AttributeName {
71             get { return attributeName == null ? string.Empty : attributeName; }
72             set { attributeName = value; }
73         }
74         
75         /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute.Namespace"]/*' />
76         /// <devdoc>
77         ///    <para>[To be supplied.]</para>
78         /// </devdoc>
79         public string Namespace {
80             get { return ns; }
81             set { ns = value; }
82         }
83
84         /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute.DataType"]/*' />
85         /// <devdoc>
86         ///    <para>[To be supplied.]</para>
87         /// </devdoc>
88         public string DataType {
89             get { return dataType == null ? string.Empty : dataType; }
90             set { dataType = value; }
91         }
92
93         /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute.Form"]/*' />
94         /// <devdoc>
95         ///    <para>[To be supplied.]</para>
96         /// </devdoc>
97         public XmlSchemaForm Form {
98             get { return form; }
99             set { form = value; }
100         }
101     }
102 }