sql日志打印输出配置
This commit is contained in:
@@ -52,10 +52,14 @@ namespace Yi.Framework.WebCore.BuilderExtend
|
||||
{
|
||||
var property = apolloProvider.GetType().BaseType?.GetProperty("Data", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
var data = property?.GetValue(apolloProvider) as IDictionary<string, string>;
|
||||
foreach (var item in data)
|
||||
if (data is not null)
|
||||
{
|
||||
Console.WriteLine($"key {item.Key} value {item.Value}");
|
||||
foreach (var item in data)
|
||||
{
|
||||
Console.WriteLine($"key {item.Key} value {item.Value}");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,12 +15,12 @@ internal class JsonOptionsWritable<TOptions> : FileOptionsWritableBase<TOptions>
|
||||
|
||||
public override void Update(Action<TOptions> configuration)
|
||||
{
|
||||
JObject jObject = JsonConvert.DeserializeObject<JObject>(File.ReadAllText(this.FileName));
|
||||
JObject? jObject = JsonConvert.DeserializeObject<JObject>(File.ReadAllText(this.FileName));
|
||||
if (jObject != null)
|
||||
{
|
||||
TOptions option = this.Monitor.CurrentValue ?? new TOptions();
|
||||
|
||||
if (jObject.TryGetValue(this.Section, out JToken jtoken))
|
||||
if (jObject.TryGetValue(this.Section, out JToken? jtoken))
|
||||
{
|
||||
option = JsonConvert.DeserializeObject<TOptions>(jtoken.ToString()) ?? new TOptions();
|
||||
configuration?.Invoke(option);
|
||||
|
||||
Reference in New Issue
Block a user