More work on SeqBackgroundService, next step is tests for it.
This commit is contained in:
parent
a139b1ad08
commit
67207cf90b
27 changed files with 237 additions and 190 deletions
|
|
@ -3,7 +3,7 @@ using Core.Exceptions;
|
|||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace Core.Configurations.SmartConfig
|
||||
namespace Core.Configurations.SmartConfigProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Configuration provider that loads configuration from a smart configuration source (e.g. database).
|
||||
|
|
@ -22,7 +22,7 @@ namespace Core.Configurations.SmartConfig
|
|||
string _path;
|
||||
IConfigurationBuilder _builder;
|
||||
|
||||
Newtonsoft.Json.Linq.JObject _configuration;
|
||||
JObject _configuration;
|
||||
SmartConfigOptions _smartConfigOptions;
|
||||
|
||||
public SmartConfigProvider() { }
|
||||
|
|
@ -59,7 +59,7 @@ namespace Core.Configurations.SmartConfig
|
|||
using (StreamReader file = File.OpenText(_path))
|
||||
using (JsonTextReader reader = new JsonTextReader(file))
|
||||
{
|
||||
var jsonConfiguration = (Newtonsoft.Json.Linq.JObject)Newtonsoft.Json.Linq.JToken.ReadFrom(reader);
|
||||
var jsonConfiguration = (JObject)JToken.ReadFrom(reader);
|
||||
|
||||
_connectionString = jsonConfiguration.SelectToken($"ConnectionStrings.{_configKey}")?.ToString();
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ namespace Core.Configurations.SmartConfig
|
|||
|
||||
}
|
||||
|
||||
public Newtonsoft.Json.Linq.JObject Configuration()
|
||||
public JObject Configuration()
|
||||
{
|
||||
return _configuration;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue