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
-
AssemblyRegistry
Methods
Find(IEnumerable<string>)
Finds registered assemblies that are associated with the specified categories.
public static HashSet<Assembly> Find(IEnumerable<string> categories)
Parameters
categories
IEnumerable<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
categories
string[]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
assembly
AssemblyThe assembly.
Returns
Exceptions
- ArgumentNullException
categories
GetScanTypes(Assembly)
public static AssemblyRegistry.ScanTypes GetScanTypes(Assembly assembly)
Parameters
assembly
Assembly
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
alias
string
Returns
Register(Assembly, IEnumerable<string>)
Registers an assembly with the specified categories.
public static void Register(Assembly assembly, IEnumerable<string> categories)
Parameters
assembly
AssemblyThe assembly.
categories
IEnumerable<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
assembly
Assemblytypes
AssemblyRegistry.ScanTypes
Unregister(Assembly)
Unregisters the specified assembly.
public static void Unregister(Assembly assembly)
Parameters
assembly
AssemblyThe 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