Finished documentation

This commit is contained in:
2025-02-13 18:10:43 +01:00
parent 08d4ddb2c6
commit 93d41ad6d3
14 changed files with 520 additions and 19 deletions

View File

@@ -48,10 +48,20 @@ public class HopFrameConfigurator(HopFrameConfig config, IServiceCollection coll
return new DbContextConfigurator<TDbContext>(context);
}
/// <summary>
/// Check if a context is already registered in the HopFrame
/// </summary>
/// <typeparam name="TDbContext">The context that should be checked</typeparam>
/// <returns>true if the context is already registered, false if not</returns>
public bool HasDbContext<TDbContext>() where TDbContext : DbContext {
return InnerConfig.Contexts.Any(context => context.ContextType == typeof(TDbContext));
}
/// <summary>
/// Returns a configurator for the context if it was already defined
/// </summary>
/// <typeparam name="TDbContext"></typeparam>
/// <returns>The configurator of the context if it already was defined, null if not</returns>
public DbContextConfigurator<TDbContext>? GetDbContext<TDbContext>() where TDbContext : DbContext {
var config = InnerConfig.Contexts
.SingleOrDefault(context => context.ContextType == typeof(TDbContext));

View File

@@ -43,7 +43,7 @@ public sealed class CustomViewConfigurator(CustomView view) {
}
/// <summary>
/// Sets the rule for sidebar to determine if the link is active
/// Sets the rule for the sidebar to determine if the link is active
/// </summary>
/// <param name="match">The desired match rule</param>
public CustomViewConfigurator SetLinkMatch(NavLinkMatch match) {