From e773871dc0ee53d39f8fa8a0cf8efff6be452e5a Mon Sep 17 00:00:00 2001 From: Leon Hoppe Date: Fri, 28 Feb 2025 12:23:11 +0100 Subject: [PATCH] Updated documentation --- .idea/.idea.HopFrame/.idea/workspace.xml | 28 ++++++++++--------- README.md | 2 +- docs/Writerside/topics/Plugins.md | 20 +++++++++++-- .../Plugins/Internal/ExporterPlugin.cs | 2 +- 4 files changed, 35 insertions(+), 17 deletions(-) diff --git a/.idea/.idea.HopFrame/.idea/workspace.xml b/.idea/.idea.HopFrame/.idea/workspace.xml index 26305db..c82bd6e 100644 --- a/.idea/.idea.HopFrame/.idea/workspace.xml +++ b/.idea/.idea.HopFrame/.idea/workspace.xml @@ -12,17 +12,9 @@ - - - - - - - - + - @@ -660,7 +662,6 @@ \ No newline at end of file diff --git a/README.md b/README.md index 02d5454..7d7fa4b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Welcome to the **HopFrame**! This project aims to provide a comprehensive and modular framework for easy management of your database. The framework is designed to be highly configurable, ensuring that developers either quickly add the framework for simple data editing or -configure it to their needs to implement it fully in their data management pipeline. +configure it to their needs to implement it fully in their data management pipeline. Read more in the project [docs](https://hopframe.leon-hoppe.de). ## Features diff --git a/docs/Writerside/topics/Plugins.md b/docs/Writerside/topics/Plugins.md index d3c7f14..3d96ba2 100644 --- a/docs/Writerside/topics/Plugins.md +++ b/docs/Writerside/topics/Plugins.md @@ -5,10 +5,10 @@ by using Plugins. They are registered as scoped services so you can use DI like ## Add a plugin -Create a class that extends the `HopFramePlugin` class: +Create a class that represents the plugin: ```C# -public class SearchExtension : HopFramePlugin { +public class SearchExtension { } ``` @@ -60,3 +60,19 @@ public void OnDelete(DeleteEntryEvent e) { cacheHandler.ClearCache(e.Entity); } ``` + +## Useful services + +### IFileService + +If you want to deal with file uploading / downloading, you can use the `IFileService`: + +```C# +public interface IFileService { + + public Task DownloadFile(string name, byte[] data); + + public Task UploadFile(); + +} +``` diff --git a/src/HopFrame.Web/Plugins/Internal/ExporterPlugin.cs b/src/HopFrame.Web/Plugins/Internal/ExporterPlugin.cs index 64eb65a..8746ad9 100644 --- a/src/HopFrame.Web/Plugins/Internal/ExporterPlugin.cs +++ b/src/HopFrame.Web/Plugins/Internal/ExporterPlugin.cs @@ -12,7 +12,7 @@ using Microsoft.FluentUI.AspNetCore.Components; namespace HopFrame.Web.Plugins.Internal; -internal sealed class ExporterPlugin(IContextExplorer explorer, IToastService toasts, IFileService files, IServiceProvider provider) { +internal sealed class ExporterPlugin(IContextExplorer explorer, IToastService toasts, IFileService files) { public const char Separator = ';'; [EventHandler]