Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
InputScope.cs
Go to the documentation of this file.
1
using
System.Collections
;
2
3
namespace
System.Xml.Xsl.XsltOld
;
4
5
internal
sealed
class
InputScope
:
DocumentScope
6
{
7
private
InputScope
_parent
;
8
9
private
bool
_forwardCompatibility
;
10
11
private
bool
_canHaveApplyImports
;
12
13
private
Hashtable
_variables
;
14
15
private
Hashtable
_extensionNamespaces
;
16
17
private
Hashtable
_excludedNamespaces
;
18
19
internal
InputScope
Parent
=>
_parent
;
20
21
internal
Hashtable
Variables
=>
_variables
;
22
23
internal
bool
ForwardCompatibility
24
{
25
get
26
{
27
return
_forwardCompatibility
;
28
}
29
set
30
{
31
_forwardCompatibility
=
value
;
32
}
33
}
34
35
internal
bool
CanHaveApplyImports
36
{
37
get
38
{
39
return
_canHaveApplyImports
;
40
}
41
set
42
{
43
_canHaveApplyImports
=
value
;
44
}
45
}
46
47
internal
InputScope
(
InputScope
parent)
48
{
49
Init
(parent);
50
}
51
52
internal
void
Init
(
InputScope
parent)
53
{
54
scopes
=
null
;
55
_parent
= parent;
56
if
(
_parent
!=
null
)
57
{
58
_forwardCompatibility
=
_parent
.
_forwardCompatibility
;
59
_canHaveApplyImports
=
_parent
.
_canHaveApplyImports
;
60
}
61
}
62
63
internal
void
InsertExtensionNamespace
(
string
nspace
)
64
{
65
if
(
_extensionNamespaces
==
null
)
66
{
67
_extensionNamespaces
=
new
Hashtable
();
68
}
69
_extensionNamespaces
[
nspace
] =
null
;
70
}
71
72
internal
bool
IsExtensionNamespace
(
string
nspace
)
73
{
74
if
(
_extensionNamespaces
==
null
)
75
{
76
return
false
;
77
}
78
return
_extensionNamespaces
.
Contains
(
nspace
);
79
}
80
81
internal
void
InsertExcludedNamespace
(
string
nspace
)
82
{
83
if
(
_excludedNamespaces
==
null
)
84
{
85
_excludedNamespaces
=
new
Hashtable
();
86
}
87
_excludedNamespaces
[
nspace
] =
null
;
88
}
89
90
internal
bool
IsExcludedNamespace
(
string
nspace
)
91
{
92
if
(
_excludedNamespaces
==
null
)
93
{
94
return
false
;
95
}
96
return
_excludedNamespaces
.
Contains
(
nspace
);
97
}
98
99
internal
void
InsertVariable
(
VariableAction
variable
)
100
{
101
if
(
_variables
==
null
)
102
{
103
_variables
=
new
Hashtable
();
104
}
105
_variables
[
variable
.Name] =
variable
;
106
}
107
108
internal
int
GetVeriablesCount
()
109
{
110
if
(
_variables
==
null
)
111
{
112
return
0;
113
}
114
return
_variables
.
Count
;
115
}
116
117
public
VariableAction
ResolveVariable
(
XmlQualifiedName
qname)
118
{
119
for
(
InputScope
inputScope
=
this
;
inputScope
!=
null
;
inputScope
=
inputScope
.
Parent
)
120
{
121
if
(
inputScope
.Variables !=
null
)
122
{
123
VariableAction
variableAction
= (
VariableAction
)
inputScope
.Variables[qname];
124
if
(
variableAction
!=
null
)
125
{
126
return
variableAction
;
127
}
128
}
129
}
130
return
null
;
131
}
132
133
public
VariableAction
ResolveGlobalVariable
(
XmlQualifiedName
qname)
134
{
135
InputScope
inputScope
=
null
;
136
for
(
InputScope
inputScope2
=
this
;
inputScope2
!=
null
;
inputScope2
=
inputScope2
.
Parent
)
137
{
138
inputScope
=
inputScope2
;
139
}
140
return
inputScope
.
ResolveVariable
(qname);
141
}
142
}
System.Collections.Hashtable.Contains
virtual bool Contains(object key)
Definition
Hashtable.cs:719
System.Collections.Hashtable.Count
virtual int Count
Definition
Hashtable.cs:538
System.Collections.Hashtable
Definition
Hashtable.cs:13
System.Xml.XmlQualifiedName
Definition
XmlQualifiedName.cs:6
System.Xml.Xsl.XsltOld.DocumentScope.scopes
NamespaceDecl scopes
Definition
DocumentScope.cs:5
System.Xml.Xsl.XsltOld.DocumentScope
Definition
DocumentScope.cs:4
System.Xml.Xsl.XsltOld.InputScope._forwardCompatibility
bool _forwardCompatibility
Definition
InputScope.cs:9
System.Xml.Xsl.XsltOld.InputScope.Init
void Init(InputScope parent)
Definition
InputScope.cs:52
System.Xml.Xsl.XsltOld.InputScope.InsertExcludedNamespace
void InsertExcludedNamespace(string nspace)
Definition
InputScope.cs:81
System.Xml.Xsl.XsltOld.InputScope._extensionNamespaces
Hashtable _extensionNamespaces
Definition
InputScope.cs:15
System.Xml.Xsl.XsltOld.InputScope.CanHaveApplyImports
bool CanHaveApplyImports
Definition
InputScope.cs:36
System.Xml.Xsl.XsltOld.InputScope.GetVeriablesCount
int GetVeriablesCount()
Definition
InputScope.cs:108
System.Xml.Xsl.XsltOld.InputScope.Parent
InputScope Parent
Definition
InputScope.cs:19
System.Xml.Xsl.XsltOld.InputScope.IsExtensionNamespace
bool IsExtensionNamespace(string nspace)
Definition
InputScope.cs:72
System.Xml.Xsl.XsltOld.InputScope._excludedNamespaces
Hashtable _excludedNamespaces
Definition
InputScope.cs:17
System.Xml.Xsl.XsltOld.InputScope.ForwardCompatibility
bool ForwardCompatibility
Definition
InputScope.cs:24
System.Xml.Xsl.XsltOld.InputScope.InsertExtensionNamespace
void InsertExtensionNamespace(string nspace)
Definition
InputScope.cs:63
System.Xml.Xsl.XsltOld.InputScope._parent
InputScope _parent
Definition
InputScope.cs:7
System.Xml.Xsl.XsltOld.InputScope._variables
Hashtable _variables
Definition
InputScope.cs:13
System.Xml.Xsl.XsltOld.InputScope.Variables
Hashtable Variables
Definition
InputScope.cs:21
System.Xml.Xsl.XsltOld.InputScope.IsExcludedNamespace
bool IsExcludedNamespace(string nspace)
Definition
InputScope.cs:90
System.Xml.Xsl.XsltOld.InputScope.ResolveVariable
VariableAction ResolveVariable(XmlQualifiedName qname)
Definition
InputScope.cs:117
System.Xml.Xsl.XsltOld.InputScope.InsertVariable
void InsertVariable(VariableAction variable)
Definition
InputScope.cs:99
System.Xml.Xsl.XsltOld.InputScope.ResolveGlobalVariable
VariableAction ResolveGlobalVariable(XmlQualifiedName qname)
Definition
InputScope.cs:133
System.Xml.Xsl.XsltOld.InputScope._canHaveApplyImports
bool _canHaveApplyImports
Definition
InputScope.cs:11
System.Xml.Xsl.XsltOld.InputScope.InputScope
InputScope(InputScope parent)
Definition
InputScope.cs:47
System.Xml.Xsl.XsltOld.InputScope
Definition
InputScope.cs:6
System.Xml.Xsl.XsltOld.VariableAction
Definition
VariableAction.cs:6
System.Collections
Definition
BlockingCollection.cs:8
System.Xml.Xsl.XsltOld
Definition
IXsltDebugger.cs:1
System.Xml.ValueHandleType.Dictionary
@ Dictionary
System.ExceptionArgument.value
@ value
source
System.Private.Xml
System.Xml.Xsl.XsltOld
InputScope.cs
Generated by
1.10.0