Interface IPlugin
Represents a plugin in the RisingV framework.
public interface IPlugin : IPluginContext, IPluginComponent, IManageable<PluginComponentsManager>, IManageable<PluginManager>, IManageable, IReloadable<PluginManager>, IReloadable, IDisposable
- Inherited Members
- Extension Methods
Properties
DatabaseManager
The database manager for the plugin.
DatabaseManager DatabaseManager { get; }
Property Value
EngineManager
The engine manager for the plugin.
EngineManager EngineManager { get; }
Property Value
ProcessorManager
The processor manager for the plugin.
ProcessorManager ProcessorManager { get; }
Property Value
SystemManager
The system manager for the plugin.
SystemManager SystemManager { get; }
Property Value
Methods
AddSharedComponent<T>(IPlugin, bool)
Adds a shared component to the plugin context.
T? AddSharedComponent<T>(IPlugin plugin, bool failIfExists = true) where T : class, IPluginComponent
Parameters
plugin
IPluginThe plugin to which the component belongs.
failIfExists
boolThrow an exception if the shared component already exists. Default: true
Returns
- T
The added plugin component of the specified type, or null if it was not added.
Type Parameters
T
The type of the plugin component to add.
AddSharedComponent<T>(IPlugin, T, bool)
Adds a shared component to the plugin context with an instance of the component.
void AddSharedComponent<T>(IPlugin plugin, T obj, bool failIfExists = true) where T : class, IPluginComponent
Parameters
plugin
IPluginThe plugin to which the component belongs.
obj
TThe instance of the plugin component to add.
failIfExists
boolThrow an exception if the shared component already exists. Default: true
Type Parameters
T
The type of the plugin component to add.
GetSharedComponent(Type)
Gets a shared component of the specified type from the plugin context.
IPluginComponent? GetSharedComponent(Type type)
Parameters
type
TypeThe type of the plugin context to retrieve.
Returns
- IPluginComponent
The plugin context of the specified type, or null if not found.
GetSharedComponent<TX>()
Gets a shared component of the specified type from the plugin context.
TX? GetSharedComponent<TX>() where TX : class, IPluginComponent
Returns
- TX
The plugin component of the specified type, or null if not found.
Type Parameters
TX
The type of the plugin component to retrieve.
Load()
Loads the plugin, initializing it and registering necessary components and events.
void Load()
OnInitialize()
void OnInitialize()
OnLoad()
void OnLoad()
OnPreLoad()
void OnPreLoad()
OnUnload()
bool OnUnload()
Returns
SetupConfiguration(PluginConfig?)
void SetupConfiguration(PluginConfig? pluginConfig)
Parameters
pluginConfig
PluginConfig
SetupSharedEventBus(ManagedEventBus)
void SetupSharedEventBus(ManagedEventBus eventBus)
Parameters
eventBus
ManagedEventBus