Class CachedComponentFilter<TFilterType, TRootType>
Class that allows for cached retrieval/filtering of multiple types of components into lists
Proper usage of this class is:
using (var componentFilter = new CachedComponentFilter<typeToFind,componentTypeThatContains>(instanceOfComponent))
{
}
Inheritance
CachedComponentFilter<TFilterType, TRootType>
Syntax
public class CachedComponentFilter<TFilterType, TRootType> : IDisposable where TFilterType : class where TRootType : Component
Type Parameters
Name |
Description |
TFilterType |
|
TRootType |
|
Constructors
CachedComponentFilter(TFilterType[], Boolean)
Declaration
public CachedComponentFilter(TFilterType[] componentList, bool includeDisabled = true)
Parameters
Type |
Name |
Description |
TFilterType[] |
componentList |
|
Boolean |
includeDisabled |
|
CachedComponentFilter(TRootType, CachedSearchType, Boolean)
Declaration
public CachedComponentFilter(TRootType componentRoot, CachedSearchType cachedSearchType = CachedSearchType.Children | CachedSearchType.Self, bool includeDisabled = true)
Parameters
Methods
Dispose()
Declaration
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
Boolean |
disposing |
|
GetMatchingComponents<TChildType>()
Declaration
public TChildType[] GetMatchingComponents<TChildType>()
where TChildType : class, TFilterType
Returns
Type |
Description |
TChildType[] |
|
Type Parameters
Name |
Description |
TChildType |
|
StoreMatchingComponents<TChildType>(List<TChildType>)
Declaration
public void StoreMatchingComponents<TChildType>(List<TChildType> outputList)
where TChildType : class, TFilterType
Parameters
Type |
Name |
Description |
List<TChildType> |
outputList |
|
Type Parameters
Name |
Description |
TChildType |
|