Table of Contents

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

HashSet<Assembly>

A set of assembly associated with the specified categories.

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

HashSet<Assembly>

A set of assemblies associated with the specified categories.

Exceptions

ArgumentNullException

categories

FindAll()

Finds all registered assemblies.

public static HashSet<Assembly> FindAll()

Returns

HashSet<Assembly>

A set of all assembly registered.

Exceptions

ArgumentNullException

categories

FindCategories(Assembly)

Finds registered categories that are associated with the specified assembly.

public static HashSet<string> FindCategories(Assembly assembly)

Parameters

assembly Assembly

The assembly.

Returns

HashSet<string>

A set of category associated with the specified assembly.

Exceptions

ArgumentNullException

categories

GetScanTypes(Assembly)

public static AssemblyRegistry.ScanTypes GetScanTypes(Assembly assembly)

Parameters

assembly Assembly

Returns

AssemblyRegistry.ScanTypes

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

fullyQualifiedTypeName string

The typename

throwOnError bool

Returns

Type

The type instance or null if not found.

See Also

GetTypeFromAlias(string)

Gets a type from its Alias or Name.

public static Type GetTypeFromAlias(string alias)

Parameters

alias string

Returns

Type

Register(Assembly, IEnumerable<string>)

Registers an assembly with the specified categories.

public static void Register(Assembly assembly, IEnumerable<string> categories)

Parameters

assembly Assembly

The 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

assembly Assembly

The assembly.

categories string[]

The categories to associate with this assembly.

Exceptions

ArgumentNullException

assembly or categories

RegisterScanTypes(Assembly, ScanTypes)

public static void RegisterScanTypes(Assembly assembly, AssemblyRegistry.ScanTypes types)

Parameters

assembly Assembly
types AssemblyRegistry.ScanTypes

Unregister(Assembly)

Unregisters the specified assembly.

public static void Unregister(Assembly assembly)

Parameters

assembly Assembly

The assembly.

Events

AssemblyRegistered

Occurs when an assembly is registered.

public static event EventHandler<AssemblyRegisteredEventArgs> AssemblyRegistered

Event Type

EventHandler<AssemblyRegisteredEventArgs>

AssemblyUnregistered

Occurs when an assembly is registered.

public static event EventHandler<AssemblyRegisteredEventArgs> AssemblyUnregistered

Event Type

EventHandler<AssemblyRegisteredEventArgs>