NuGet ยท nuget

Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.Plugins

Core Feature for Plugins for Eltheon Framework

Install

Install-Kommandos

dotnet add package Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.Plugins --version 0.9.1.38
<PackageReference Include="Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.Plugins" Version="0.9.1.38" />
paket add Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.Plugins --version 0.9.1.38
Install-Package Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.Plugins -Version 0.9.1.38

README

Vorschau

Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.Plugins

Overview

This feature provides the plugin infrastructure for Eltheon hosts. It discovers plugin assemblies, registers their services, Razor Pages and SignalR hubs, and exposes conventions so plugins can contribute UI while remaining isolated.

Note: v2 host runtime (WIP) lives under v2/ and will supersede the current loader. It introduces manifest-driven installs, registry (EF-backed or in-memory), AssemblyLoadContext isolation and lifecycle aligned with the new SDK (IEltheonPlugin). Static file mounts, ApplicationParts, localization/config/routing extensions and a store/registry integration are scaffolded; weight-based routing overrides, full localization/config wiring, admin API/UI and store client still need to be completed.

Core Elements

  • PluginLoader scans the GlobalConfig.PluginPath, loads plugin assemblies, resolves satellite resource assemblies and instantiates any types that implement IPlugin.
  • PluginManager keeps track of loaded plugins, their Razor parts and any admin/user navigation metadata. It also exposes APIs to register plugin endpoints (RegisterPluginRoutes) and invoke plugin lifecycle hooks after the host has built.
  • Route conventions (PluginPageRouteModelConvention) prepend plugin slugs to Razor Page routes so that each plugin lives under its own URL namespace.
  • Middleware and services coordinate plugin initialization, dependency injection and error handling.

Usage

builder.Services.AddSingleton(provider =>
{
    var logger = provider.GetRequiredService<ILogger<PluginManager>>();
    var manager = new PluginManager(builder.Services, logger);
    manager.LoadAllPlugins();
    manager.RegisterPluginRoutes(app);
    return manager;
});
  1. Ensure GlobalConfig.PluginPath points to a directory containing one subfolder per plugin, each with a <PluginName>.dll.
  2. Call LoadAllPlugins during startup to configure DI and navigation metadata.
  3. Call AfterBuildExecuteAllPlugins once the service provider is available so plugins can run finalization code (seeding, route registration, etc).

Diagnostics

PluginLoader logs every assembly load and initialization, including timing information. Enable Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.Plugins logging to spot missing files, dependency issues or other runtime failures while loading plugins.