namespace System.Xml { /// Represents an XML element of type Comment. public class XMLIRWComment : XMLIRW, ITextValue, IDisposable { private bool disposedValue; /// public XMLIRWText Text { get; set; } /// [Obsolete("Use the Text property.")] public XMLIRWValue Value { get; private set; } /// public override XmlNodeType Type { get; set; } /// public override XMLIRW Parent { get; set; } = default; /// public override string Name { get; set; } = string.Empty; /// [Obsolete("Use the XMLIRWComment(XMLIRW, object) constructor.")] public XMLIRWComment(XMLIRW parent, XMLIRWValue value) {} /// [Obsolete("Use the XMLIRWComment(object) constructor.")] public XMLIRWComment(XMLIRWValue value) {} /// public XMLIRWComment(XMLIRW parent, object value) : base(parent, "#comment", XmlNodeType.Comment) { Text = new XMLIRWText(value); } /// public XMLIRWComment(object value) : this((XMLIRW)null, value) {} /// Called when the object is finished. ~XMLIRWComment() => Dispose(disposing: false); /// public override void Dispose() { Dispose(disposing: true); GC.SuppressFinalize(this); } /// protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { Name = string.Empty; Parent = default; Type = default; Text = default; } disposedValue = true; } } } }