Added plugin events

This commit is contained in:
2025-02-02 19:06:41 +01:00
parent 4cfeaab652
commit 13e9af892c
28 changed files with 415 additions and 87 deletions

View File

@@ -1,8 +1,10 @@
using HopFrame.Core;
using HopFrame.Core.Config;
using HopFrame.Core.Events;
using HopFrame.Core.Callbacks;
using HopFrame.Web.Components;
using HopFrame.Web.Components.Pages;
using HopFrame.Web.Plugins;
using HopFrame.Web.Plugins.Internal;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.FluentUI.AspNetCore.Components;
using Microsoft.AspNetCore.Builder;
@@ -21,7 +23,7 @@ public static class ServiceCollectionExtensions {
/// <returns>The same service collection that is passed in</returns>
public static IServiceCollection AddHopFrame(this IServiceCollection services, Action<HopFrameConfigurator> configurator, LibraryConfiguration? fluentUiLibraryConfiguration = null, bool addRazorComponents = true) {
var config = new HopFrameConfig();
configurator.Invoke(new HopFrameConfigurator(config));
configurator.Invoke(new HopFrameConfigurator(config, services));
return AddHopFrame(services, config, fluentUiLibraryConfiguration, addRazorComponents);
}
@@ -38,6 +40,8 @@ public static class ServiceCollectionExtensions {
services.AddHopFrameServices();
services.AddFluentUIComponents(fluentUiLibraryConfiguration);
services.AddScoped<IPluginOrchestrator, PluginOrchestrator>();
if (addRazorComponents) {
services.AddRazorComponents()
.AddInteractiveServerComponents();