Table of Contents

Class EngineManager

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

Manages the lifecycle and dependencies of game engines.

public class EngineManager : TypeMapManager<IEngine, EngineManager>, IManager<IEngine, EngineManager>, IManager, IPluginComponent, IManageable<PluginComponentsManager>, IManageable
Inheritance
EngineManager
Implements
Inherited Members
Extension Methods

Properties

AllowAutoLoad

Should we allot auto-loading of dependencies

public bool AllowAutoLoad { get; set; }

Property Value

bool

Log

protected override Logger Log { get; }

Property Value

Logger

Methods

AddEngine<T>(IPlugin, bool)

public T? AddEngine<T>(IPlugin plugin, bool failIfExists = true) where T : IEngine

Parameters

plugin IPlugin
failIfExists bool

Returns

T

Type Parameters

T

AddEngine<T>(IPlugin, T, bool)

public void AddEngine<T>(IPlugin plugin, T engine, bool failIfExists = true) where T : IEngine

Parameters

plugin IPlugin
engine T
failIfExists bool

Type Parameters

T

AddEngine<T>(bool)

public T? AddEngine<T>(bool failIfExists = true) where T : IEngine

Parameters

failIfExists bool

Returns

T

Type Parameters

T

AddEngine<T>(T, bool)

public void AddEngine<T>(T engine, bool failIfExists = true) where T : IEngine

Parameters

engine T
failIfExists bool

Type Parameters

T

CheckDependencies(IPlugin, bool)

Checks the dependencies of the engine and attempts to auto-load them if allowed.

public Map<Type, List<(Type, IManager)>> CheckDependencies(IPlugin plugin, bool logMissing = true)

Parameters

plugin IPlugin
logMissing bool

Returns

Map<Type, List<(Type, IManager)>>

CheckRecommended(IPlugin, bool)

Checks the recommended manageables for the engine and logs any missing ones.

public Map<Type, List<(Type, IManager)>> CheckRecommended(IPlugin plugin, bool logMissing = true)

Parameters

plugin IPlugin
logMissing bool

Returns

Map<Type, List<(Type, IManager)>>

GetEngine<T>(bool)

public T? GetEngine<T>(bool required = true) where T : IEngine

Parameters

required bool

Returns

T

Type Parameters

T

GetMissingManageables(IPlugin, IEngine, List<Dependency>)

Gets the missing manageable dependencies for a given engine.

public List<(Type, IManager)> GetMissingManageables(IPlugin plugin, IEngine engine, List<Dependency> dependencies)

Parameters

plugin IPlugin
engine IEngine
dependencies List<Dependency>

Returns

List<(Type, IManager)>

List of missing manageable dependencies as tuples of (Type, IManager).

Ready(IPlugin)

Ready the manager with the given plugin including its manageable objects. This should be called after all other Managers have been loaded.

public override void Ready(IPlugin plugin)

Parameters

plugin IPlugin

Reload(IPlugin, ReloadReason)

Reload the manager with the given plugin including its manageable objects. The manageable objects should be unloaded before calling their Reload method and should then be loaded after.

public override void Reload(IPlugin plugin, ReloadReason reason)

Parameters

plugin IPlugin
reason ReloadReason

RemoveEngine<T>(IPlugin)

public void RemoveEngine<T>(IPlugin plugin) where T : IEngine

Parameters

plugin IPlugin

Type Parameters

T

TryReady(IEngine, IPlugin)

public bool TryReady(IEngine engine, IPlugin plugin)

Parameters

engine IEngine
plugin IPlugin

Returns

bool