forked from ddrilling/AsbCloudServer
43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
using AsbCloudDb.Model;
|
|
using AsbCloudInfrastructure.Repository;
|
|
using AsbCloudInfrastructure.Services;
|
|
using AsbCloudInfrastructure.Services.SAUB;
|
|
using AsbCloudInfrastructure.Services.WellOperationService;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.Extensions.Caching.Memory;
|
|
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.Primitives;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace ConsoleApp1
|
|
{
|
|
class ConfigurationService : IConfigurationSection
|
|
{
|
|
public string this[string key]
|
|
{
|
|
get => "Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True";
|
|
set { }
|
|
}
|
|
|
|
public string Key => "";
|
|
|
|
public string Path => "";
|
|
|
|
public string Value { get; set; } = "Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True";
|
|
|
|
public IEnumerable<IConfigurationSection> GetChildren()
|
|
{
|
|
return Enumerable.Empty<IConfigurationSection>();
|
|
}
|
|
|
|
public IChangeToken? GetReloadToken()
|
|
{
|
|
return default;
|
|
}
|
|
|
|
public IConfigurationSection GetSection(string key) => this;
|
|
|
|
}
|
|
}
|