Refactor: Remove GlobalVar and replace with IAppSettings; restructure affected infrastructure, services, and view models for dependency injection.

This commit is contained in:
2025-12-26 11:43:20 +01:00
parent 1ee0fc61f6
commit 4d5b093ea0
15 changed files with 103 additions and 463 deletions

View File

@@ -1,5 +1,8 @@
namespace Jugenddienst_Stunden.Interfaces;
/// <summary>
/// Defines methods for making HTTP requests to a specified API.
/// </summary>
internal interface IApiClient {
Task<T> GetAsync<T>(string path, IDictionary<string, string?>? query = null, CancellationToken ct = default);

View File

@@ -1,5 +1,10 @@
using Jugenddienst_Stunden.Types;
namespace Jugenddienst_Stunden.Interfaces;
/// <summary>
/// Represents the application settings required for configuration and operation of the application.
/// </summary>
public interface IAppSettings {
string ApiUrl { get; set; }
string ApiKey { get; set; }
@@ -7,4 +12,6 @@ public interface IAppSettings {
int EmployeeId { get; set; }
string Name { get; set; }
string Surname { get; set; }
Settings? Settings { get; set; }
}