Table of Contents

Class RisingSharedPlugin<TContext>

Namespace
RisingV.Shared.Plugins
Assembly
RisingV.Shared.dll

Base class for shared RisingV plugins with a specific context.

public class RisingSharedPlugin<TContext> : RisingPluginBase, IPlugin<TContext>, IPlugin, IManageable<PluginManager>, IReloadable<PluginManager>, IReloadable, IDisposable, IHasPluginContext<TContext>, IPluginContext, IPluginComponent, IManageable<PluginComponentsManager>, IManageable where TContext : PluginContext

Type Parameters

TContext

The type of the plugin context, which must inherit from PluginContext.

Inheritance
RisingSharedPlugin<TContext>
Implements
IPlugin<TContext>
Derived
Inherited Members
Extension Methods

Constructors

RisingSharedPlugin()

public RisingSharedPlugin()

RisingSharedPlugin(TContext)

public RisingSharedPlugin(TContext context)

Parameters

context TContext

Properties

Context

Gets the context for the plugin, which contains information about the plugin's configuration, target, and other details.

public TContext Context { get; }

Property Value

TContext

Methods

Get()

Gets the current instance of the RisingPlugin.

public static RisingSharedPlugin<TContext>? Get()

Returns

RisingSharedPlugin<TContext>

Returns the current instance of the RisingPlugin, or null if it has not been initialized.

Get<TX>()

Gets the current instance of the RisingPlugin as a specific type.

public static TX Get<TX>() where TX : RisingSharedPlugin<TContext>

Returns

TX

Returns the current instance of the RisingPlugin as the specified type, or throws an exception if it is not loaded.

Type Parameters

TX

The type of the plugin to retrieve, which must inherit from RisingSharedPlugin<TContext>.

Exceptions

InvalidOperationException

Thrown if the plugin of the specified type is not loaded.

OnPluginsLoaded(OnPluginsLoadedEvent)

Called when all the plugins are loaded. This method is triggered by the EventBridge.OnPluginsLoadedEvent.

protected override void OnPluginsLoaded(EventBridge.OnPluginsLoadedEvent @event)

Parameters

event EventBridge.OnPluginsLoadedEvent

The event containing the state of the plugins are loaded.