More work in this Configuration Manager

This commit is contained in:
Janus Knudsen 2025-01-31 22:08:54 +01:00
parent 8e6492e979
commit 21d7128e74
11 changed files with 299 additions and 79 deletions

View file

@ -4,7 +4,7 @@ using Microsoft.Extensions.Primitives;
using System.Data;
namespace Core.Configurations.SmartConfiguration;
public class JsonConfiguration : IConfiguration
public class JsonConfiguration : Microsoft.Extensions.Configuration.IConfiguration
{
private readonly JObject _data;
@ -19,11 +19,16 @@ public class JsonConfiguration : IConfiguration
set => throw new NotImplementedException();
}
public IConfigurationSection GetSection(string key) =>
new JsonConfigurationSection(_data, key);
public Microsoft.Extensions.Configuration.IConfigurationSection GetSection(string key) => null;
//new JsonConfigurationSection(_data, key);
public IEnumerable<IConfigurationSection> GetChildren() =>
_data.Properties().Select(p => new JsonConfigurationSection(_data, p.Name));
public IChangeToken GetReloadToken() => throw new NotImplementedException();
IEnumerable<Microsoft.Extensions.Configuration.IConfigurationSection> IConfiguration.GetChildren()
{
throw new NotImplementedException();
}
}