namespace System.Xml {
///
/// Represents an XML element of type Attribute.
///
public class XMLIRWAttribute : XMLIRW, ITextValue {
private bool disposedValue;
///
[Obsolete("Use the Text property.")]
public XMLIRWValue Value {get; set;}
///
public XMLIRWText Text { get; 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 XMLIRWAttribute(XMLIRWElement, string, object) constructor.")]
public XMLIRWAttribute(XMLIRWElement parent, string name, XMLIRWValue value) {}
///
[Obsolete("Use the XMLIRWAttribute(string, object) constructor.")]
public XMLIRWAttribute(string name, XMLIRWValue value) {}
///
public XMLIRWAttribute(XMLIRWElement parent, string name, object value) :
base(parent, name, XmlNodeType.Attribute) { Text = new XMLIRWText(value); }
///
public XMLIRWAttribute(string name, object value) : this(default, name, value) {}
/// Called when the object is finished.
~XMLIRWAttribute() => 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;
}
}
}
}