blob: 2b9ffd3cb6236d90cf63c5761e76e1edb166f6a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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
}
}
|