Table of Contents

Class ModuleLoader

Namespace
Shard.Server.Modules
Assembly
Shard.Server.dll

Discovers modules from all configured providers, disposes modules disabled by configuration, resolves one immutable load plan, and transfers that plan to the host.

public sealed class ModuleLoader
Inheritance
ModuleLoader
Inherited Members

Constructors

ModuleLoader(IEnumerable<IModuleProvider>)

Discovers modules from all configured providers, disposes modules disabled by configuration, resolves one immutable load plan, and transfers that plan to the host.

public ModuleLoader(IEnumerable<IModuleProvider> providers)

Parameters

providers IEnumerable<IModuleProvider>

Methods

Discover(ModuleProviderContext, IReadOnlySet<string>?)

Discovers modules and disposes any whose name or fully-qualified id is disabled. Providers transfer each module immediately so any later discovery failure can roll back every acquired lifetime in reverse order. The caller must dispose the returned plan; disposal is a no-op after a module host claims it.

public ModuleLoadPlan Discover(ModuleProviderContext context, IReadOnlySet<string>? disabledModules = null)

Parameters

context ModuleProviderContext
disabledModules IReadOnlySet<string>

Returns

ModuleLoadPlan