XmlSchemaAnnotated.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // Author: Dwivedi, Ajay kumar
  2. // [email protected]
  3. using System;
  4. using System.Collections;
  5. using System.Xml;
  6. using System.Xml.Serialization;
  7. namespace System.Xml.Schema
  8. {
  9. /// <summary>
  10. /// Summary description for XmlSchemaAnnotated.
  11. /// </summary>
  12. public class XmlSchemaAnnotated : XmlSchemaObject
  13. {
  14. private XmlSchemaAnnotation annotation;
  15. private string id;
  16. private XmlAttribute[] unhandledAttributes;
  17. public XmlSchemaAnnotated()
  18. {}
  19. [System.Xml.Serialization.XmlAttribute("id")]
  20. public string Id
  21. {
  22. get{ return id; }
  23. set{ id = value; }
  24. }
  25. [XmlElement("annotation",Namespace="http://www.w3.org/2001/XMLSchema")]
  26. public XmlSchemaAnnotation Annotation
  27. {
  28. get{ return annotation; }
  29. set{ annotation = value; }
  30. }
  31. [XmlAnyAttribute]
  32. public XmlAttribute[] UnhandledAttributes
  33. {
  34. get
  35. {
  36. if(unhandledAttributeList != null)
  37. {
  38. unhandledAttributes = (XmlAttribute[]) unhandledAttributeList.ToArray(typeof(XmlAttribute));
  39. unhandledAttributeList = null;
  40. }
  41. return unhandledAttributes;
  42. }
  43. set
  44. {
  45. unhandledAttributes = value;
  46. unhandledAttributeList = null;
  47. }
  48. }
  49. }
  50. }