Files
HopFrame/src/HopFrame.Core/Services/IConfigAccessor.cs
Leon Hoppe b2a029d50b
All checks were successful
HopFrame CI / build (push) Successful in 2m10s
HopFrame CI / test (push) Successful in 1m27s
Added configurators
2026-02-22 19:32:33 +01:00

33 lines
1.2 KiB
C#

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);
}