Table of Contents

Class Engine<TConfig>

Namespace
RisingV.Shared.Engines
Assembly
RisingV.Shared.dll

Represents a base class for engines

public abstract class Engine<TConfig> : IEngine<TConfig>, IEngine, IManageableLifecycle<EngineManager>, IManageableLifecycle, IReloadable, IManageable<EngineManager>, IManageable, IEnableable where TConfig : IEngineConfig

Type Parameters

TConfig

The type of the engine configuration.

Inheritance
Engine<TConfig>
Implements
IEngine<TConfig>
Inherited Members
Extension Methods

Constructors

Engine()

protected Engine()

Engine(TConfig)

Represents a base class for engines

protected Engine(TConfig config)

Parameters

config TConfig

The configuration for the engine.

Properties

Config

public TConfig Config { get; }

Property Value

TConfig

Dependencies

protected virtual List<Dependency> Dependencies { get; }

Property Value

List<Dependency>

Enabled

public virtual bool Enabled { get; }

Property Value

bool
protected virtual List<Recommendation> Recommended { get; }

Property Value

List<Recommendation>

Methods

GetDependencies()

Gets the dependencies of the engine.

public List<Dependency> GetDependencies()

Returns

List<Dependency>

GetDependencies<TX>()

Gets the dependencies of the engine, excluding those that are assignable to the specified type.

public List<Dependency> GetDependencies<TX>()

Returns

List<Dependency>

Type Parameters

TX

GetRecommended()

Gets the recommended dependencies of the engine.

public List<Recommendation> GetRecommended()

Returns

List<Recommendation>

GetRecommendedAsDependencies()

public (List<Dependency>, List<Recommendation>) GetRecommendedAsDependencies()

Returns

(List<Dependency>, List<Recommendation>)

GetRecommended<TX>()

Gets the recommended dependencies of the engine, excluding those that are assignable to the specified type.

public List<Recommendation> GetRecommended<TX>()

Returns

List<Recommendation>

Type Parameters

TX

Initialize(EngineManager, List<IPlugin>)

Initializes the lifecycle of the manager with a specific type.

public virtual void Initialize(EngineManager manager, List<IPlugin> plugins)

Parameters

manager EngineManager
plugins List<IPlugin>

Load(EngineManager, List<IPlugin>)

Loads the manager and its dependencies with a specific type.

public virtual void Load(EngineManager manager, List<IPlugin> plugins)

Parameters

manager EngineManager
plugins List<IPlugin>

OnDependencyLoaded(Type, EngineManager, List<IPlugin>)

Called when a dependency is loaded.

public virtual void OnDependencyLoaded(Type dependency, EngineManager manager, List<IPlugin> plugins)

Parameters

dependency Type

The type of the dependency that was loaded.

manager EngineManager

The engine manager that loaded the dependency.

plugins List<IPlugin>

The list of plugins that are currently loaded.

OnReload(EngineManager, ReloadReason)

Called when the engine is reloaded.

public bool OnReload(EngineManager manager, ReloadReason reason)

Parameters

manager EngineManager
reason ReloadReason

Returns

bool

Ready(EngineManager, List<IPlugin>)

Prepares the manager for use with a specific type, typically after loading.

public abstract void Ready(EngineManager manager, List<IPlugin> plugins)

Parameters

manager EngineManager
plugins List<IPlugin>

Reload(EngineManager, List<IPlugin>, ReloadReason)

Reloads the manager and its dependencies with a specific type.

public void Reload(EngineManager manager, List<IPlugin> plugins, ReloadReason reason)

Parameters

manager EngineManager
plugins List<IPlugin>
reason ReloadReason

Terminate(EngineManager, List<IPlugin>)

Terminates the manager and cleans up resources with a specific type.

public virtual void Terminate(EngineManager manager, List<IPlugin> plugins)

Parameters

manager EngineManager
plugins List<IPlugin>

Unload(EngineManager, List<IPlugin>)

Unloads the manager and its dependencies with a specific type.

public void Unload(EngineManager manager, List<IPlugin> plugins)

Parameters

manager EngineManager
plugins List<IPlugin>