Files
Michal Vrba 8bfcc3617b Add DI, config, and API service for Blazor frontend
Introduce configuration classes and environment-specific settings files. Add DI extensions for registering API/app settings and HttpClient. Implement ITuneRipperApiService with robust error handling and logging. Update Program.cs for config loading and startup logging. Add usage documentation and update imports for new services and extensions. Improves maintainability and developer experience.
2025-12-11 14:37:38 +01:00

25 lines
781 B
C#

namespace TuneRipper.Shared.Configuration;
public class ApiSettings
{
public const string SectionName = "ApiSettings";
public string? BaseUrl { get; set; }
public string? HttpBaseUrl { get; set; }
public string? ApiKey { get; set; }
public int TimeoutSeconds { get; set; } = 30;
public bool EnableLogging { get; set; } = true;
public int RetryAttempts { get; set; } = 3;
public int RetryDelaySeconds { get; set; } = 2;
}
public class AppSettings
{
public const string SectionName = "AppSettings";
public string? AppName { get; set; }
public string? Version { get; set; }
public string? Environment { get; set; }
public bool EnableDetailedErrors { get; set; } = true;
public bool DebugMode { get; set; } = false;
}