Add compile options to turn off features

This commit is contained in:
Frank A. Krueger 2018-03-02 22:29:46 -08:00
parent 6fe8b41ca4
commit 961fc34b4d
No known key found for this signature in database
GPG Key ID: 0471C67474FFE664
4 changed files with 16 additions and 0 deletions

View File

@ -232,6 +232,8 @@ namespace Ooui
protected virtual bool HtmlNeedsFullEndElement => false; protected virtual bool HtmlNeedsFullEndElement => false;
#if !NO_XML
public override void WriteOuterHtml (System.Xml.XmlWriter w) public override void WriteOuterHtml (System.Xml.XmlWriter w)
{ {
w.WriteStartElement (TagName); w.WriteStartElement (TagName);
@ -262,5 +264,7 @@ namespace Ooui
c.WriteOuterHtml (w); c.WriteOuterHtml (w);
} }
} }
#endif
} }
} }

View File

@ -188,6 +188,8 @@ namespace Ooui
return false; return false;
} }
#if !NO_XML
public virtual string OuterHtml { public virtual string OuterHtml {
get { get {
using (var stream = new System.IO.MemoryStream ()) { using (var stream = new System.IO.MemoryStream ()) {
@ -206,6 +208,8 @@ namespace Ooui
} }
public abstract void WriteOuterHtml (System.Xml.XmlWriter w); public abstract void WriteOuterHtml (System.Xml.XmlWriter w);
#endif
} }
class ReadOnlyList<T> : IReadOnlyList<T> class ReadOnlyList<T> : IReadOnlyList<T>

View File

@ -55,9 +55,13 @@ namespace Ooui
return base.TriggerEventFromMessage (message); return base.TriggerEventFromMessage (message);
} }
#if !NO_XML
public override void WriteInnerHtml (System.Xml.XmlWriter w) public override void WriteInnerHtml (System.Xml.XmlWriter w)
{ {
w.WriteString (val ?? ""); w.WriteString (val ?? "");
} }
#endif
} }
} }

View File

@ -21,9 +21,13 @@ namespace Ooui
Text = text; Text = text;
} }
#if !NO_XML
public override void WriteOuterHtml (System.Xml.XmlWriter w) public override void WriteOuterHtml (System.Xml.XmlWriter w)
{ {
w.WriteString (text); w.WriteString (text);
} }
#endif
} }
} }