Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ComponentCollection.cs
Go to the documentation of this file.
1
using
System.Collections
;
2
3
namespace
System.ComponentModel
;
4
5
public
class
ComponentCollection
:
ReadOnlyCollectionBase
6
{
7
public
virtual
IComponent
?
this
[
string
? name]
8
{
9
get
10
{
11
if
(name !=
null
)
12
{
13
IList
innerList = base.InnerList;
14
foreach
(
IComponent
item
in
innerList)
15
{
16
if
(
item
!=
null
&&
item
.Site !=
null
&&
item
.Site.Name !=
null
&&
string
.Equals(
item
.Site.Name, name,
StringComparison
.OrdinalIgnoreCase))
17
{
18
return
item
;
19
}
20
}
21
}
22
return
null
;
23
}
24
}
25
26
public
virtual
IComponent
?
this
[
int
index
] => (
IComponent
)base.InnerList[
index
];
27
28
public
ComponentCollection
(
IComponent
[] components)
29
{
30
base.InnerList.AddRange(components);
31
}
32
33
public
void
CopyTo
(
IComponent
[]
array
,
int
index
)
34
{
35
base.InnerList.CopyTo(
array
,
index
);
36
}
37
}
System.Collections.ReadOnlyCollectionBase
Definition
ReadOnlyCollectionBase.cs:4
System.ComponentModel.ComponentCollection.ComponentCollection
ComponentCollection(IComponent[] components)
Definition
ComponentCollection.cs:28
System.ComponentModel.ComponentCollection.CopyTo
void CopyTo(IComponent[] array, int index)
Definition
ComponentCollection.cs:33
System.ComponentModel.ComponentCollection
Definition
ComponentCollection.cs:6
System.Collections.IList
Definition
IList.cs:4
System.ComponentModel.IComponent
Definition
IComponent.cs:7
System.Collections
Definition
BlockingCollection.cs:8
System.ComponentModel
Definition
ColumnAttribute.cs:3
System.ExceptionArgument.item
@ item
System.ExceptionArgument.index
@ index
System.ExceptionArgument.array
@ array
System.StringComparison
StringComparison
Definition
StringComparison.cs:4
source
System.ComponentModel.Primitives
System.ComponentModel
ComponentCollection.cs
Generated by
1.10.0