Table of Contents

Interface IManager<T, TM>

Namespace
RisingV.Shared.Managers
Assembly
RisingV.Shared.dll

Interface for a manager that handles manageable objects of a specific type.

public interface IManager<T, TM> : IManager, IManageable where T : class, IManageable<TM> where TM : class, IManager

Type Parameters

T

The type of manageable objects this manager handles.

TM

The type of manager that this manageable object is associated with.

Inherited Members
Extension Methods

Methods

Add<TX>(IPlugin, bool)

Add a manageable object of the given type to the manager.

TX? Add<TX>(IPlugin plugin, bool failIfExists = true) where TX : T

Parameters

plugin IPlugin
failIfExists bool

Returns

TX

Type Parameters

TX

Add<TX>(IPlugin, TX, bool)

Add a manageable object of the given type to the manager.

void Add<TX>(IPlugin plugin, TX obj, bool failIfExists = true) where TX : T

Parameters

plugin IPlugin
obj TX
failIfExists bool

Type Parameters

TX

ForEach(Action<T>)

Execute an action for each manageable object in the manager.

void ForEach(Action<T> action)

Parameters

action Action<T>

The action to execute for each manageable object.

GetDependentPlugins<TX>(params IPlugin[]?)

Get a list of plugins that depend on the given type.

List<IPlugin> GetDependentPlugins<TX>(params IPlugin[]? additionalPlugins) where TX : T

Parameters

additionalPlugins IPlugin[]

Returns

List<IPlugin>

Type Parameters

TX

GetList()

Get a manageable object of the given type from the manager.

List<T> GetList()

Returns

List<T>

GetOrCreate<TX>(IPlugin)

Get a manageable object of the given type from the manager.

TX GetOrCreate<TX>(IPlugin plugin) where TX : T

Parameters

plugin IPlugin

Returns

TX

Type Parameters

TX

Get<TX>(bool)

Get a manageable object of the given type from the manager.

TX? Get<TX>(bool required = true) where TX : T

Parameters

required bool

Returns

TX

Type Parameters

TX

Has<TX>(bool)

Check if the manager has a manageable object of the given type.

bool Has<TX>(bool checkEnabled = true) where TX : T

Parameters

checkEnabled bool

Returns

bool

Type Parameters

TX

IsEnabled<TX>(TX?)

Is the manageable object enabled.

bool IsEnabled<TX>(TX? manageable) where TX : T

Parameters

manageable TX

Returns

bool

Type Parameters

TX

Remove<TX>(IPlugin)

Remove a manageable object of the given type from the manager.

void Remove<TX>(IPlugin plugin) where TX : T

Parameters

plugin IPlugin

Type Parameters

TX

Remove<TX>(IPlugin, TX)

Remove a manageable object of the given type from the manager.

void Remove<TX>(IPlugin plugin, TX obj) where TX : T

Parameters

plugin IPlugin
obj TX

Type Parameters

TX

Select(Func<KeyValuePair<Type, T>, T>)

Select manageable objects using a selector function.

IEnumerable<T> Select(Func<KeyValuePair<Type, T>, T> selector)

Parameters

selector Func<KeyValuePair<Type, T>, T>

The function to select manageable objects.

Returns

IEnumerable<T>