2022-04-12 10:01:56 +05:00
|
|
|
|
using AsbCloudDb.Model;
|
2022-12-28 17:38:53 +05:00
|
|
|
|
using AsbCloudInfrastructure.Repository;
|
2022-04-12 10:01:56 +05:00
|
|
|
|
using AsbCloudInfrastructure.Services;
|
|
|
|
|
using AsbCloudInfrastructure.Services.SAUB;
|
|
|
|
|
using AsbCloudInfrastructure.Services.WellOperationService;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
2022-11-18 15:49:04 +05:00
|
|
|
|
using Microsoft.Extensions.Caching.Memory;
|
2022-04-12 10:01:56 +05:00
|
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
|
using Microsoft.Extensions.Primitives;
|
|
|
|
|
using System.Collections.Generic;
|
2023-02-17 15:30:17 +05:00
|
|
|
|
using System.Linq;
|
2022-04-12 10:01:56 +05:00
|
|
|
|
|
|
|
|
|
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()
|
|
|
|
|
{
|
2023-02-17 15:30:17 +05:00
|
|
|
|
return Enumerable.Empty<IConfigurationSection>();
|
2022-04-12 10:01:56 +05:00
|
|
|
|
}
|
|
|
|
|
|
2023-02-17 15:30:17 +05:00
|
|
|
|
public IChangeToken? GetReloadToken()
|
2022-04-12 10:01:56 +05:00
|
|
|
|
{
|
2023-02-17 15:30:17 +05:00
|
|
|
|
return default;
|
2022-04-12 10:01:56 +05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IConfigurationSection GetSection(string key) => this;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|