diff options
Diffstat (limited to 'docs/HtmlAgilityPack/HtmlNameTable.cs')
-rw-r--r-- | docs/HtmlAgilityPack/HtmlNameTable.cs | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/docs/HtmlAgilityPack/HtmlNameTable.cs b/docs/HtmlAgilityPack/HtmlNameTable.cs new file mode 100644 index 00000000000..2b9ffd3cb62 --- /dev/null +++ b/docs/HtmlAgilityPack/HtmlNameTable.cs @@ -0,0 +1,52 @@ +// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
+using System.Xml;
+
+namespace HtmlAgilityPack
+{
+ internal class HtmlNameTable : XmlNameTable
+ {
+ #region Fields
+
+ private NameTable _nametable = new NameTable();
+
+ #endregion
+
+ #region Public Methods
+
+ public override string Add(string array)
+ {
+ return _nametable.Add(array);
+ }
+
+ public override string Add(char[] array, int offset, int length)
+ {
+ return _nametable.Add(array, offset, length);
+ }
+
+ public override string Get(string array)
+ {
+ return _nametable.Get(array);
+ }
+
+ public override string Get(char[] array, int offset, int length)
+ {
+ return _nametable.Get(array, offset, length);
+ }
+
+ #endregion
+
+ #region Internal Methods
+
+ internal string GetOrAdd(string array)
+ {
+ string s = Get(array);
+ if (s == null)
+ {
+ return Add(array);
+ }
+ return s;
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file |