Class PluginExtensions
Namespace: Void.Proxy.Api.Plugins.Extensions
Assembly: Void.Proxy.Api.dll
Provides assembly-based plugin lookup operations.
public static class PluginExtensionsInheritance
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
GetPluginFromType<T>(IPluginService)
Gets the loaded plugin defined in the same assembly as T.
public static IPlugin GetPluginFromType<T>(this IPluginService plugins)Parameters
plugins IPluginService
The plugin service to search.
Returns
The plugin whose implementation assembly contains T.
Type Parameters
T
A type from the target plugin assembly.
Exceptions
No loaded plugin is defined in the assembly containing T.
GetPluginFromType(IPluginService, Type)
Gets the loaded plugin defined in the same assembly as a runtime type.
public static IPlugin GetPluginFromType(this IPluginService plugins, Type type)Parameters
plugins IPluginService
The plugin service to search.
type Type
A type from the target plugin assembly.
Returns
The plugin whose implementation assembly contains type.
Exceptions
No loaded plugin is defined in the assembly containing type.
TryGetPluginFromType(IPluginService, Type, out IPlugin)
Attempts to find the loaded plugin defined in the same assembly as a runtime type.
public static bool TryGetPluginFromType(this IPluginService plugins, Type type, out IPlugin plugin)Parameters
plugins IPluginService
The plugin service to search.
type Type
A type from the target plugin assembly.
plugin IPlugin
When this method returns true, the first matching loaded plugin; otherwise, null.