-
Notifications
You must be signed in to change notification settings - Fork 0
/
IPlugin.cs
24 lines (22 loc) · 1 KB
/
IPlugin.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
namespace Shoko.Plugin.Abstractions
{
/// <summary>
/// This can specify the static method
/// <code>static void ConfigureServices(IServiceCollection serviceCollection)</code>
/// This will allow you to inject other services to the Shoko DI container which can be accessed via <see cref="ShokoServer.ServiceContainer">ShokoServer.ServiceContainer</see>
/// if you want a Logger, you can use <see cref="Microsoft.Extensions.Logging.ILogger<T>"/>
/// </summary>
public interface IPlugin
{
string Name { get; }
void Load();
/// <summary>
/// This will be called with the created settings object if you have an <see cref="IPluginSettings"/> in the Plugin.
/// You can cast to your desired type and set the settings within it.
/// </summary>
/// <param name="settings"></param>
void OnSettingsLoaded(IPluginSettings settings);
// static void ConfigureServices(IServiceCollection serviceCollection);
}
}