2 //------------------------------------------------------------------------------
3 // <copyright file="XmlRootAttribute.cs" company="Microsoft">
4 // Copyright (c) Microsoft Corporation. All rights reserved.
6 // <owner current="true" primary="true">Microsoft</owner>
7 //------------------------------------------------------------------------------
9 namespace System
.Xml
.Serialization
{
11 using System
.Xml
.Schema
;
13 /// <include file='doc\XmlRootAttribute.uex' path='docs/doc[@for="XmlRootAttribute"]/*' />
15 /// <para>[To be supplied.]</para>
17 [AttributeUsage(AttributeTargets
.ReturnValue
| AttributeTargets
.Class
| AttributeTargets
.Enum
| AttributeTargets
.Interface
| AttributeTargets
.Struct
)]
18 public class XmlRootAttribute
: System
.Attribute
{
23 bool nullableSpecified
;
25 /// <include file='doc\XmlRootAttribute.uex' path='docs/doc[@for="XmlRootAttribute.XmlRootAttribute"]/*' />
27 /// <para>[To be supplied.]</para>
29 public XmlRootAttribute() {
32 /// <include file='doc\XmlRootAttribute.uex' path='docs/doc[@for="XmlRootAttribute.XmlRootAttribute1"]/*' />
34 /// <para>[To be supplied.]</para>
36 public XmlRootAttribute(string elementName
) {
37 this.elementName
= elementName
;
40 /// <include file='doc\XmlRootAttribute.uex' path='docs/doc[@for="XmlRootAttribute.ElementName"]/*' />
42 /// <para>[To be supplied.]</para>
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"]/*' />
51 /// <para>[To be supplied.]</para>
53 public string Namespace
{
58 /// <include file='doc\XmlRootAttribute.uex' path='docs/doc[@for="XmlRootAttribute.DataType"]/*' />
60 /// <para>[To be supplied.]</para>
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"]/*' />
69 /// <para>[To be supplied.]</para>
71 public bool IsNullable
{
72 get { return nullable; }
75 nullableSpecified
= true;
79 internal bool IsNullableSpecified
{
80 get { return nullableSpecified; }
84 get { return (ns == null ? String.Empty : ns) + ":" + ElementName + ":" + nullable.ToString(); }