public virtual string Data {
get { return data; }
- set { data = value; }
+ set {
+ OwnerDocument.onNodeChanging (this, this.ParentNode);
+
+ if (IsReadOnly)
+ throw new ArgumentException ("Node is read-only.");
+
+ data = value;
+
+ OwnerDocument.onNodeChanged (this, this.ParentNode);
+ }
}
public override string InnerText {
get { return data; }
- set { data = value; }
+ set { Data = value; } // invokes events
}
public virtual int Length {
get { return data; }
set {
- OwnerDocument.onNodeChanging (this, this.ParentNode);
-
- if (IsReadOnly)
- throw new ArgumentException ("Node is read-only.");
-
- data = value;
-
- OwnerDocument.onNodeChanged (this, this.ParentNode);
+ Data = value;
}
}