Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ComponentCollection.cs
Go to the documentation of this file.
2
4
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}
void CopyTo(IComponent[] array, int index)