Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XDeferredAxis.cs
Go to the documentation of this file.
1
using
System
;
2
using
System.Collections
;
3
using
System.Collections.Generic
;
4
using
System.Linq
;
5
using
System.Xml.Linq
;
6
7
namespace
MS.Internal.Xml.Linq.ComponentModel
;
8
9
internal
sealed
class
XDeferredAxis
<T> :
IEnumerable
<T>,
IEnumerable
where
T :
XObject
10
{
11
private
readonly
Func<XElement, XName, IEnumerable<T>
>
_func
;
12
13
internal
XElement
element
;
14
15
internal
XName
name
;
16
17
public
IEnumerable<T>
this
[
string
expandedName
]
18
{
19
get
20
{
21
if
(
expandedName
==
null
)
22
{
23
throw
new
ArgumentNullException
(
"expandedName"
);
24
}
25
if
(
name
==
null
)
26
{
27
name
=
expandedName
;
28
}
29
else
if
(
name
!=
expandedName
)
30
{
31
return
Enumerable
.Empty<T>();
32
}
33
return
this
;
34
}
35
}
36
37
public
XDeferredAxis
(Func<
XElement
,
XName
,
IEnumerable<T>
>
func
,
XElement
element
,
XName
name
)
38
{
39
if
(
func
==
null
)
40
{
41
throw
new
ArgumentNullException
(
"func"
);
42
}
43
if
(
element
==
null
)
44
{
45
throw
new
ArgumentNullException
(
"element"
);
46
}
47
_func
=
func
;
48
this.element =
element
;
49
this.name =
name
;
50
}
51
52
public
IEnumerator<T>
GetEnumerator
()
53
{
54
return
_func
(
element
,
name
).
GetEnumerator
();
55
}
56
57
IEnumerator
IEnumerable
.
GetEnumerator
()
58
{
59
return
GetEnumerator
();
60
}
61
}
MS.Internal.Xml.Linq.ComponentModel.XDeferredAxis._func
readonly Func< XElement, XName, IEnumerable< T > > _func
Definition
XDeferredAxis.cs:11
MS.Internal.Xml.Linq.ComponentModel.XDeferredAxis.XDeferredAxis
XDeferredAxis(Func< XElement, XName, IEnumerable< T > > func, XElement element, XName name)
Definition
XDeferredAxis.cs:37
MS.Internal.Xml.Linq.ComponentModel.XDeferredAxis.element
XElement element
Definition
XDeferredAxis.cs:13
MS.Internal.Xml.Linq.ComponentModel.XDeferredAxis.GetEnumerator
IEnumerator< T > GetEnumerator()
Definition
XDeferredAxis.cs:52
MS.Internal.Xml.Linq.ComponentModel.XDeferredAxis.name
XName name
Definition
XDeferredAxis.cs:15
MS.Internal.Xml.Linq.ComponentModel.XDeferredAxis
Definition
XDeferredAxis.cs:10
System.ArgumentNullException
Definition
ArgumentNullException.cs:10
System.Collections.Generic.Dictionary.GetEnumerator
Enumerator GetEnumerator()
Definition
Dictionary.cs:984
System.Collections.Generic.Dictionary
Definition
Dictionary.cs:14
System.Linq.Enumerable
Definition
Enumerable.cs:9
System.Xml.Linq.XElement
Definition
XElement.cs:19
System.Xml.Linq.XName
Definition
XName.cs:7
System.Xml.Linq.XObject
Definition
XObject.cs:6
System.Collections.Generic.IEnumerable.GetEnumerator
new IEnumerator< T > GetEnumerator()
System.Collections.Generic.IEnumerable
Definition
IEnumerable.cs:4
System.Collections.Generic.IEnumerator
Definition
IEnumerator.cs:4
MS.Internal.Xml.Linq.ComponentModel
Definition
XAttributeValuePropertyDescriptor.cs:4
System.Collections.Generic
Definition
IHashKeyCollection.cs:1
System.Collections
Definition
BlockingCollection.cs:8
System.Linq.ExceptionArgument.func
@ func
System.Linq
Definition
ImmutableArrayExtensions.cs:4
System.Xml.Linq
Definition
BaseUriAnnotation.cs:1
System
Definition
BlockingCollection.cs:8
source
System.ComponentModel.TypeConverter
MS.Internal.Xml.Linq.ComponentModel
XDeferredAxis.cs
Generated by
1.10.0