View Source
Class TypeFinderExtensions
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
public static class TypeFinderExtensions
Methods
View Source
FindClassesOfType<T>(ITypeFinder, Nullable<IEnumerable<Assembly>>, Boolean)
Returns all types found of in the assemblies specified of type T
Declaration
public static IEnumerable<Type> FindClassesOfType<T>(this ITypeFinder typeFinder, IEnumerable<Assembly>? assemblies = null, bool onlyConcreteClasses = true)
Parameters
Type |
Name |
Description |
ITypeFinder |
typeFinder |
|
System.Nullable<IEnumerable<System.Reflection.Assembly>> |
assemblies |
|
System.Boolean |
onlyConcreteClasses |
|
Returns
Type |
Description |
IEnumerable<Type> |
|
Type Parameters
View Source
FindClassesOfTypeWithAttribute<T, TAttribute>(ITypeFinder, Nullable<IEnumerable<Assembly>>, Boolean)
Finds any classes derived from the type T that contain the attribute TAttribute
Declaration
public static IEnumerable<Type> FindClassesOfTypeWithAttribute<T, TAttribute>(this ITypeFinder typeFinder, IEnumerable<Assembly>? assemblies = null, bool onlyConcreteClasses = true)
where TAttribute : Attribute
Parameters
Type |
Name |
Description |
ITypeFinder |
typeFinder |
|
System.Nullable<IEnumerable<System.Reflection.Assembly>> |
assemblies |
|
System.Boolean |
onlyConcreteClasses |
|
Returns
Type |
Description |
IEnumerable<Type> |
|
Type Parameters
Name |
Description |
T |
|
TAttribute |
|
View Source
FindClassesWithAttribute<T>(ITypeFinder, Nullable<IEnumerable<Assembly>>, Boolean)
Finds the classes with attribute.
Declaration
public static IEnumerable<Type> FindClassesWithAttribute<T>(this ITypeFinder typeFinder, IEnumerable<Assembly>? assemblies = null, bool onlyConcreteClasses = true)
where T : Attribute
Parameters
Type |
Name |
Description |
ITypeFinder |
typeFinder |
|
System.Nullable<IEnumerable<System.Reflection.Assembly>> |
assemblies |
The assemblies.
|
System.Boolean |
onlyConcreteClasses |
if set to true only concrete classes.
|
Returns
Type |
Description |
IEnumerable<Type> |
|
Type Parameters