Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Components

virtual ComponentCollection System.ComponentModel.Container.Components
getinherited

Implements System.ComponentModel.IContainer.

Definition at line 63 of file Container.cs.

64 {
65 get
66 {
67 lock (_syncObj)
68 {
69 if (_components == null)
70 {
71 IComponent[] array = new IComponent[_siteCount];
72 for (int i = 0; i < _siteCount; i++)
73 {
75 }
76 _components = new ComponentCollection(array);
77 if (_filter == null && _checkedFilter)
78 {
79 _checkedFilter = false;
80 }
81 }
82 if (!_checkedFilter)
83 {
84 _filter = GetService(typeof(ContainerFilterService)) as ContainerFilterService;
85 _checkedFilter = true;
86 }
87 if (_filter != null)
88 {
89 ComponentCollection componentCollection = _filter.FilterComponents(_components);
90 if (componentCollection != null)
91 {
92 _components = componentCollection;
93 }
94 }
95 return _components;
96 }
97 }
98 }
virtual ComponentCollection FilterComponents(ComponentCollection components)
virtual ? object GetService(Type service)
Definition Container.cs:177
ContainerFilterService _filter
Definition Container.cs:57
ComponentCollection _components
Definition Container.cs:55