Nucleus .Net Core CMS

IAssemblyLoader Interface

Namespace: Nucleus.Abstractions
Assembly: Nucleus.Abstractions.dll
Interface which provides access to the core assembly loader. The an implementation of this interface is available via dependency injection.
This interface is used by the system information page.
GetTypes ()
Retrieves an enumerable collection of types defined in assemblies in the main application (/bin) folder and in extension (/Extensions/*/bin) folders.
Returns
An enumerable collection of T:System.Type objects representing the types defined in the assembly. The collection may be empty if no types are defined.
Remarks
This method can be used to dynamically discover types at runtime, which is useful for reflection-based operations. It does not include types from referenced assemblies.
GetTypes<T> ()
Return a list of types which implement the class specified by T, but are not T.
Type Parameters
T The type to search for.
Returns
A list of .Net types which implement T.
GetTypesWithAttribute<TAttribute> ()
Return a list of types which have the specified attribute assigned.
Type Parameters
TAttribute The System.Attribute type which is assigned to the returned classes.
Returns
A list of .Net types which have the attribute specified by TAttribute.
GetTypesWithAttribute<TAttribute> (Assembly assembly)
Return a list of types in the specified assembly which have the specified attribute assigned.
Type Parameters
TAttribute
Parameters
Name Type
assembly System.Reflection.Assembly
ListExtensionLoadContexts ()
List the T:System.Runtime.Loader.AssemblyLoadContext instances used to load extension assemblies. This is used by the system information page.