A helper class for reflections and type handling, such as finding parent types with generic arguments
More...
|
static Type | FindChildOfAncestor (Type descendant, Type ancestorToFind) |
| Find the direct child of the desired ancestorToFind More...
|
|
static Type | FindGenericTypeOfParentClassAtIndex (Type descendant, Type ancestorToFind, int i=0) |
| Find a certain generic type at index i in the ancestorToFind More...
|
|
static List< Type > | FindAllDerivedTypesAcrossAllAssemblies (Type rootType) |
| Finds all from the given rootType derived types across all assemblies in this project. Note: Doesn't work with interfaces More...
|
|
static List< Type > | FindAllDerivedTypes (Type rootType) |
| Finds all from the given rootType derived types within the same assembly, the rootType is in. Note: Doesn't work with interfaces More...
|
|
static List< Type > | FindAllDerivedTypes (Type rootType, Assembly assembly) |
| Finds all from the given rootType derived types within the given assembly . Note: Doesn't work with interfaces More...
|
|
static List< Type > | FindDirectChildrenOfTypeAcrossAllAssemblies (Type parentType) |
| Finds all direct (first generation) child Types of the given parentType across all assemblies of this project. Note: Doesn't work with interfaces More...
|
|
static List< Type > | FindDirectChildrenOfType (Type parentType) |
| Finds all direct (first generation) child Types of the given parentType within its assembly. Note: Doesn't work with interfaces More...
|
|
static List< Type > | FindDirectChildrenOfType (Type parentType, Assembly assembly) |
| Finds all direct (first generation) child Types of the given parentType within the given assembly Note: Doesn't work with interfaces More...
|
|
static List< Type > | FindInterfacesAcrossAllAssemblies (Type parentInterface, int maxInterfaces=1) |
| Find "child" interfaces of the given parentInterface that contain a limited amount of other interfaces across all assemblies for this project More...
|
|
static List< Type > | FindInterfaces (Type parentInterface, int maxInterfaces=1) |
| Find "child" interfaces of the given parentInterface that contain a limited amount of other interfaces within the parentInterface 's assembly More...
|
|
static List< Type > | FindInterfaces (Type parentInterface, Assembly assembly, int maxInterfaces=1) |
| Find "child" interfaces of the given parentInterface that contain a limited amount of other interfaces within the given assembly More...
|
|
A helper class for reflections and type handling, such as finding parent types with generic arguments
◆ FindAllDerivedTypes() [1/2]
static List< Type > NikosAssets.Helpers.ReflectionHelper.FindAllDerivedTypes |
( |
Type |
rootType | ) |
|
|
static |
Finds all from the given rootType derived types within the same assembly, the rootType is in. Note: Doesn't work with interfaces
- Parameters
-
- Returns
- A list of the found child Types
◆ FindAllDerivedTypes() [2/2]
static List< Type > NikosAssets.Helpers.ReflectionHelper.FindAllDerivedTypes |
( |
Type |
rootType, |
|
|
Assembly |
assembly |
|
) |
| |
|
static |
Finds all from the given rootType derived types within the given assembly . Note: Doesn't work with interfaces
- Parameters
-
- Returns
- A list of the found child Types
◆ FindAllDerivedTypesAcrossAllAssemblies()
static List< Type > NikosAssets.Helpers.ReflectionHelper.FindAllDerivedTypesAcrossAllAssemblies |
( |
Type |
rootType | ) |
|
|
static |
Finds all from the given rootType derived types across all assemblies in this project. Note: Doesn't work with interfaces
- Parameters
-
- Returns
- A list of the found child Types
◆ FindChildOfAncestor()
static Type NikosAssets.Helpers.ReflectionHelper.FindChildOfAncestor |
( |
Type |
descendant, |
|
|
Type |
ancestorToFind |
|
) |
| |
|
static |
Find the direct child of the desired ancestorToFind
- Parameters
-
descendant | The (grand) child we want to move up from |
ancestorToFind | The child of this to find |
- Returns
- null on fail, otherwise the first child Type of ancestorToFind
◆ FindDirectChildrenOfType() [1/2]
static List< Type > NikosAssets.Helpers.ReflectionHelper.FindDirectChildrenOfType |
( |
Type |
parentType | ) |
|
|
static |
Finds all direct (first generation) child Types of the given parentType within its assembly. Note: Doesn't work with interfaces
- Parameters
-
- Returns
- A list of the found child Types
◆ FindDirectChildrenOfType() [2/2]
static List< Type > NikosAssets.Helpers.ReflectionHelper.FindDirectChildrenOfType |
( |
Type |
parentType, |
|
|
Assembly |
assembly |
|
) |
| |
|
static |
Finds all direct (first generation) child Types of the given parentType within the given assembly Note: Doesn't work with interfaces
- Parameters
-
- Returns
- A list of the found child Types
◆ FindDirectChildrenOfTypeAcrossAllAssemblies()
static List< Type > NikosAssets.Helpers.ReflectionHelper.FindDirectChildrenOfTypeAcrossAllAssemblies |
( |
Type |
parentType | ) |
|
|
static |
Finds all direct (first generation) child Types of the given parentType across all assemblies of this project. Note: Doesn't work with interfaces
- Parameters
-
- Returns
- A list of the found child Types
◆ FindGenericTypeOfParentClassAtIndex()
static Type NikosAssets.Helpers.ReflectionHelper.FindGenericTypeOfParentClassAtIndex |
( |
Type |
descendant, |
|
|
Type |
ancestorToFind, |
|
|
int |
i = 0 |
|
) |
| |
|
static |
Find a certain generic type at index i in the ancestorToFind
- Parameters
-
descendant | |
ancestorToFind | |
i | |
- Returns
- null on fail, otherwise the generic Type at index i
◆ FindInterfaces() [1/2]
static List< Type > NikosAssets.Helpers.ReflectionHelper.FindInterfaces |
( |
Type |
parentInterface, |
|
|
Assembly |
assembly, |
|
|
int |
maxInterfaces = 1 |
|
) |
| |
|
static |
Find "child" interfaces of the given parentInterface that contain a limited amount of other interfaces within the given assembly
- Parameters
-
parentInterface | The "parent" interface to start the search from |
assembly | The assembly to search the interfaces |
maxInterfaces | You can interpret this value as a maximum "child/ancestor" depth. It checks how many interfaces the current traversed interface contains/ implements |
- Returns
- A list of the found "child" Type interfaces
◆ FindInterfaces() [2/2]
static List< Type > NikosAssets.Helpers.ReflectionHelper.FindInterfaces |
( |
Type |
parentInterface, |
|
|
int |
maxInterfaces = 1 |
|
) |
| |
|
static |
Find "child" interfaces of the given parentInterface that contain a limited amount of other interfaces within the parentInterface 's assembly
- Parameters
-
parentInterface | The "parent" interface to start the search from |
maxInterfaces | You can interpret this value as a maximum "child/ancestor" depth. It checks how many interfaces the current traversed interface contains/ implements |
- Returns
- A list of the found "child" Type interfaces
◆ FindInterfacesAcrossAllAssemblies()
static List< Type > NikosAssets.Helpers.ReflectionHelper.FindInterfacesAcrossAllAssemblies |
( |
Type |
parentInterface, |
|
|
int |
maxInterfaces = 1 |
|
) |
| |
|
static |
Find "child" interfaces of the given parentInterface that contain a limited amount of other interfaces across all assemblies for this project
- Parameters
-
parentInterface | The "parent" interface to start the search from |
maxInterfaces | You can interpret this value as a maximum "child/ancestor" depth. It checks how many interfaces the current traversed interface contains/ implements |
- Returns
- A list of the found "child" Type interfaces