[LoongArch64] Part-5:add loongarch support in some files for LoongArch64. (#21769)
[mono-project.git] / mcs / class / referencesource / System.Xml / System / Xml / Serialization / XmlRootAttribute.cs
blob6225393033316136ed134890ded0ebf9b1899cfe
2 //------------------------------------------------------------------------------
3 // <copyright file="XmlRootAttribute.cs" company="Microsoft">
4 // Copyright (c) Microsoft Corporation. All rights reserved.
5 // </copyright>
6 // <owner current="true" primary="true">Microsoft</owner>
7 //------------------------------------------------------------------------------
9 namespace System.Xml.Serialization {
10 using System;
11 using System.Xml.Schema;
13 /// <include file='doc\XmlRootAttribute.uex' path='docs/doc[@for="XmlRootAttribute"]/*' />
14 /// <devdoc>
15 /// <para>[To be supplied.]</para>
16 /// </devdoc>
17 [AttributeUsage(AttributeTargets.ReturnValue | AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Interface | AttributeTargets.Struct)]
18 public class XmlRootAttribute : System.Attribute {
19 string elementName;
20 string ns;
21 string dataType;
22 bool nullable = true;
23 bool nullableSpecified;
25 /// <include file='doc\XmlRootAttribute.uex' path='docs/doc[@for="XmlRootAttribute.XmlRootAttribute"]/*' />
26 /// <devdoc>
27 /// <para>[To be supplied.]</para>
28 /// </devdoc>
29 public XmlRootAttribute() {
32 /// <include file='doc\XmlRootAttribute.uex' path='docs/doc[@for="XmlRootAttribute.XmlRootAttribute1"]/*' />
33 /// <devdoc>
34 /// <para>[To be supplied.]</para>
35 /// </devdoc>
36 public XmlRootAttribute(string elementName) {
37 this.elementName = elementName;
40 /// <include file='doc\XmlRootAttribute.uex' path='docs/doc[@for="XmlRootAttribute.ElementName"]/*' />
41 /// <devdoc>
42 /// <para>[To be supplied.]</para>
43 /// </devdoc>
44 public string ElementName {
45 get { return elementName == null ? string.Empty : elementName; }
46 set { elementName = value; }
49 /// <include file='doc\XmlRootAttribute.uex' path='docs/doc[@for="XmlRootAttribute.Namespace"]/*' />
50 /// <devdoc>
51 /// <para>[To be supplied.]</para>
52 /// </devdoc>
53 public string Namespace {
54 get { return ns; }
55 set { ns = value; }
58 /// <include file='doc\XmlRootAttribute.uex' path='docs/doc[@for="XmlRootAttribute.DataType"]/*' />
59 /// <devdoc>
60 /// <para>[To be supplied.]</para>
61 /// </devdoc>
62 public string DataType {
63 get { return dataType == null ? string.Empty : dataType; }
64 set { dataType = value; }
67 /// <include file='doc\XmlRootAttribute.uex' path='docs/doc[@for="XmlRootAttribute.IsNullable"]/*' />
68 /// <devdoc>
69 /// <para>[To be supplied.]</para>
70 /// </devdoc>
71 public bool IsNullable {
72 get { return nullable; }
73 set {
74 nullable = value;
75 nullableSpecified = true;
79 internal bool IsNullableSpecified {
80 get { return nullableSpecified; }
83 internal string Key {
84 get { return (ns == null ? String.Empty : ns) + ":" + ElementName + ":" + nullable.ToString(); }