All checks were successful
Restart Docker Container on Production / build (pull_request) Successful in 3m2s
20 lines
484 B
C#
20 lines
484 B
C#
using Microsoft.Extensions.Configuration;
|
|
|
|
using RBLNews.Shared.Models;
|
|
using RBLNews.Shared.Services.Contracts;
|
|
|
|
namespace RBLNews.Maui.Services;
|
|
|
|
public class ConfigService : IConfigService
|
|
{
|
|
public AppSettingsModel? AppSettings { get; }
|
|
|
|
public ConfigService(IConfiguration configuration)
|
|
{
|
|
this.AppSettings = configuration.GetSection("App").Get<AppSettingsModel>();
|
|
if(this.AppSettings == null)
|
|
{
|
|
throw new NullReferenceException("App settings not found");
|
|
}
|
|
}
|
|
} |