Added configurators
All checks were successful
HopFrame CI / build (push) Successful in 2m10s
HopFrame CI / test (push) Successful in 1m27s

This commit is contained in:
2026-02-22 19:32:33 +01:00
parent 79ed400185
commit b2a029d50b
40 changed files with 1837 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
using HopFrame.Core.Configuration;
using HopFrame.Core.Repositories;
namespace HopFrame.Core.Services;
/** A service used to access configs and repositories provided by the <see cref="HopFrameConfig"/> */
public interface IConfigAccessor {
/// <summary>
/// Searches through the config and returns the table with the specified identifier if it exists
/// </summary>
/// <param name="identifier">The identifier of the table</param>
public TableConfig? GetTableByIdentifier(string identifier);
/// <summary>
/// Searches through the config and returns the table with the specified route if it exists
/// </summary>
/// <param name="route">The route of the table</param>
public TableConfig? GetTableByRoute(string route);
/// <summary>
/// Searches through the config and returns the table with the specified type if it exists
/// </summary>
/// <param name="type">The model type for the table</param>
public TableConfig? GetTableByType(Type type);
/// <summary>
/// Loads the repository for the specified table
/// </summary>
/// <param name="table">The table to load the repository for</param>
public IHopFrameRepository LoadRepository(TableConfig table);
}