Class AssemblyRegistry
- Namespace
- Stride.Core.Reflection
- Assembly
- Stride.Core.dll
Provides a basic infrastructure to associate an assembly with some categories and to query and register on new registered assembly event.
public static class AssemblyRegistry
- Inheritance
-
objectAssemblyRegistry
Methods
Find(IEnumerable<string>)
Finds registered assemblies that are associated with the specified categories.
public static HashSet<Assembly> Find(IEnumerable<string> categories)
Parameters
categoriesIEnumerable<string>The categories.
Returns
Exceptions
- ArgumentNullException
categories
Find(params string[])
Finds registered assemblies that are associated with the specified categories.
public static HashSet<Assembly> Find(params string[] categories)
Parameters
categoriesstring[]The categories.
Returns
Exceptions
- ArgumentNullException
categories
FindAll()
Finds all registered assemblies.
public static HashSet<Assembly> FindAll()
Returns
Exceptions
- ArgumentNullException
categories
FindCategories(Assembly)
Finds registered categories that are associated with the specified assembly.
public static HashSet<string> FindCategories(Assembly assembly)
Parameters
assemblyAssemblyThe assembly.
Returns
Exceptions
- ArgumentNullException
categories
GetScanTypes(Assembly)
public static AssemblyRegistry.ScanTypes? GetScanTypes(Assembly assembly)
Parameters
assemblyAssembly
Returns
GetType(string, bool)
Gets a type by its typename already loaded in the assembly registry.
public static Type? GetType(string fullyQualifiedTypeName, bool throwOnError = true)
Parameters
Returns
- Type
The type instance or null if not found.
- See Also
GetTypeFromAlias(string)
public static Type? GetTypeFromAlias(string alias)
Parameters
aliasstring
Returns
Register(Assembly, IEnumerable<string>)
Registers an assembly with the specified categories.
public static void Register(Assembly assembly, IEnumerable<string> categories)
Parameters
assemblyAssemblyThe assembly.
categoriesIEnumerable<string>The categories to associate with this assembly.
Exceptions
- ArgumentNullException
assembly or categories
Register(Assembly, params string[])
Registers an assembly with the specified categories.
public static void Register(Assembly assembly, params string[] categories)
Parameters
Exceptions
- ArgumentNullException
assembly or categories
RegisterScanTypes(Assembly, ScanTypes)
public static void RegisterScanTypes(Assembly assembly, AssemblyRegistry.ScanTypes types)
Parameters
assemblyAssemblytypesAssemblyRegistry.ScanTypes
Unregister(Assembly)
Unregisters the specified assembly.
public static void Unregister(Assembly assembly)
Parameters
assemblyAssemblyThe assembly.
Events
AssemblyRegistered
Occurs when an assembly is registered.
public static event EventHandler<AssemblyRegisteredEventArgs>? AssemblyRegistered
Event Type
AssemblyUnregistered
Occurs when an assembly is registered.
public static event EventHandler<AssemblyRegisteredEventArgs>? AssemblyUnregistered