DD.WellWorkover.Cloud/ConsoleApp1/ServiceFactory.cs

43 lines
1.2 KiB
C#
Raw Normal View History

2022-04-12 10:01:56 +05:00
using AsbCloudDb.Model;
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;
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()
{
return Enumerable.Empty<IConfigurationSection>();
2022-04-12 10:01:56 +05:00
}
public IChangeToken? GetReloadToken()
2022-04-12 10:01:56 +05:00
{
return default;
2022-04-12 10:01:56 +05:00
}
public IConfigurationSection GetSection(string key) => this;
}
}