2 // XmlRootAttribute.cs:
5 // John Donagher (john@webmeta.com)
7 // (C) 2002 John Donagher
12 namespace System.Xml.Serialization
\r
15 /// Summary description for XmlRootAttribute.
\r
17 [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct |
\r
18 AttributeTargets.Enum | AttributeTargets.Interface |
\r
19 AttributeTargets.ReturnValue)]
\r
20 public class XmlRootAttribute : Attribute
\r
22 private string dataType;
\r
23 private string elementName;
\r
24 private bool isNullable = true;
\r
27 public XmlRootAttribute ()
\r
31 public XmlRootAttribute (string elementName)
\r
33 ElementName = elementName;
\r
36 public string DataType
\r
45 public string ElementName
\r
48 return elementName;
\r
51 elementName = value;
\r
54 public bool IsNullable
\r
60 isNullable = value;
\r
63 public string Namespace
\r
73 internal void AddKeyHash (System.Text.StringBuilder sb)
\r
76 KeyHelper.AddField (sb, 1, ns);
\r
77 KeyHelper.AddField (sb, 2, elementName);
\r
78 KeyHelper.AddField (sb, 3, dataType);
\r
79 KeyHelper.AddField (sb, 4, isNullable);
\r