XmlEntity.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. //
  2. // System.Xml.XmlEntity.cs
  3. //
  4. // Author:
  5. // Duncan Mak ([email protected])
  6. //
  7. // (C) Ximian, Inc.
  8. //
  9. namespace System.Xml
  10. {
  11. public class XmlEntity : XmlNode
  12. {
  13. #region Constructors
  14. internal XmlEntity (string name, string NDATA, string publicId, string systemId,
  15. XmlDocument doc)
  16. : base (doc)
  17. {
  18. this.name = name;
  19. this.NDATA = NDATA;
  20. this.publicId = publicId;
  21. this.systemId = systemId;
  22. }
  23. #endregion
  24. #region Fields
  25. string name;
  26. string NDATA;
  27. string publicId;
  28. string systemId;
  29. #endregion
  30. #region Properties
  31. [MonoTODO]
  32. public override string BaseURI {
  33. get { throw new NotImplementedException (); }
  34. }
  35. [MonoTODO]
  36. public override string InnerText {
  37. get { throw new NotImplementedException (); }
  38. set { throw new InvalidOperationException ("This operation is not supported."); }
  39. }
  40. public override string InnerXml {
  41. get { return String.Empty; }
  42. set { throw new InvalidOperationException ("This operation is not supported."); }
  43. }
  44. public override bool IsReadOnly {
  45. get { return true; } // always read-only.
  46. }
  47. public override string LocalName {
  48. get { return name; }
  49. }
  50. public override string Name {
  51. get { return name; }
  52. }
  53. public override XmlNodeType NodeType {
  54. get { return XmlNodeType.Entity; }
  55. }
  56. public string NotationName {
  57. get {
  58. if (NDATA == null)
  59. return null;
  60. else
  61. return NDATA;
  62. }
  63. }
  64. public override string OuterXml {
  65. get { return String.Empty; }
  66. }
  67. public string PublicId {
  68. get {
  69. if (publicId == null)
  70. return null;
  71. else
  72. return publicId;
  73. }
  74. }
  75. public string SystemId {
  76. get {
  77. if (publicId == null)
  78. return null;
  79. else
  80. return systemId;
  81. }
  82. }
  83. #endregion
  84. #region Methods
  85. public override XmlNode CloneNode (bool deep)
  86. {
  87. throw new InvalidOperationException ("This operation is not supported.");
  88. }
  89. public override void WriteContentTo (XmlWriter w)
  90. {
  91. // No effect.
  92. }
  93. public override void WriteTo (XmlWriter w)
  94. {
  95. // No effect.
  96. }
  97. #endregion
  98. }
  99. }