Contracts for building SquidStd plugins. A plugin declares its identity through PluginMetadata and
registers its services into the host's DryIoc container via Configure, receiving a PluginContext
with shared boot data.
dotnet add package SquidStd.Plugin.Abstractionsusing DryIoc;
using SquidStd.Plugin.Abstractions.Data;
using SquidStd.Plugin.Abstractions.Interfaces.Plugins;
public sealed class MyPlugin : ISquidStdPlugin
{
public PluginMetadata Metadata { get; } = new()
{
Id = "com.example.myplugin",
Name = "My Plugin",
Version = new Version(1, 0, 0),
Author = "me"
};
public void Configure(IContainer container, PluginContext context)
{
// register the plugin's services / config sections here
}
}| Type | Purpose |
|---|---|
ISquidStdPlugin |
Plugin entry point (Metadata, Configure). |
PluginMetadata |
Plugin identity and dependency declarations. |
PluginContext |
Shared boot data passed to the plugin. |
- Tutorial: Plugins
- Loader: these contracts are loaded by the SquidStd.Plugin package via
UsePlugins.
MIT - part of SquidStd.