Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XmlILIndex.cs
Go to the documentation of this file.
1
using
System.Collections.Generic
;
2
using
System.ComponentModel
;
3
using
System.Xml.XPath
;
4
5
namespace
System.Xml.Xsl.Runtime
;
6
7
[
EditorBrowsable
(
EditorBrowsableState
.Never)]
8
public
sealed
class
XmlILIndex
9
{
10
private
readonly
Dictionary<string, XmlQueryNodeSequence>
_table
;
11
12
internal
XmlILIndex
()
13
{
14
_table
=
new
Dictionary<string, XmlQueryNodeSequence>
();
15
}
16
17
public
void
Add
(
string
key
,
XPathNavigator
navigator
)
18
{
19
if
(!
_table
.
TryGetValue
(
key
,
out
var
value
))
20
{
21
value
=
new
XmlQueryNodeSequence
();
22
value
.AddClone(
navigator
);
23
_table
.
Add
(
key
,
value
);
24
}
25
else
if
(!
navigator
.IsSamePosition(
value
[
value
.Count - 1]))
26
{
27
value
.AddClone(
navigator
);
28
}
29
}
30
31
public
XmlQueryNodeSequence
Lookup
(
string
key
)
32
{
33
if
(!
_table
.
TryGetValue
(
key
,
out
var
value
))
34
{
35
return
new
XmlQueryNodeSequence
();
36
}
37
return
value
;
38
}
39
}
System.Collections.Generic.Dictionary.TryGetValue
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
Definition
Dictionary.cs:1419
System.Collections.Generic.Dictionary.Add
void Add(TKey key, TValue value)
Definition
Dictionary.cs:873
System.Collections.Generic.Dictionary
Definition
Dictionary.cs:14
System.Xml.XPath.XPathNavigator
Definition
XPathNavigator.cs:15
System.Xml.Xsl.Runtime.XmlILIndex._table
readonly Dictionary< string, XmlQueryNodeSequence > _table
Definition
XmlILIndex.cs:10
System.Xml.Xsl.Runtime.XmlILIndex.Lookup
XmlQueryNodeSequence Lookup(string key)
Definition
XmlILIndex.cs:31
System.Xml.Xsl.Runtime.XmlILIndex.Add
void Add(string key, XPathNavigator navigator)
Definition
XmlILIndex.cs:17
System.Xml.Xsl.Runtime.XmlILIndex.XmlILIndex
XmlILIndex()
Definition
XmlILIndex.cs:12
System.Xml.Xsl.Runtime.XmlILIndex
Definition
XmlILIndex.cs:9
System.Xml.Xsl.Runtime.XmlQueryNodeSequence
Definition
XmlQueryNodeSequence.cs:10
System.Collections.Generic
Definition
IHashKeyCollection.cs:1
System.ComponentModel.EditorBrowsableState
EditorBrowsableState
Definition
EditorBrowsableState.cs:4
System.ComponentModel
Definition
ColumnAttribute.cs:3
System.Xml.XPath
Definition
Extensions.cs:5
System.Xml.Xsl.Runtime
Definition
AncestorDocOrderIterator.cs:4
System.Xml.ValueHandleType.Dictionary
@ Dictionary
System.ExceptionArgument.value
@ value
System.ExceptionArgument.key
@ key
source
System.Private.Xml
System.Xml.Xsl.Runtime
XmlILIndex.cs
Generated by
1.10.0