This commit is contained in:
2023-10-15 12:15:22 -07:00
parent 37b7ad2a1f
commit d17b051da7
10 changed files with 247 additions and 234 deletions

View File

@ -16,7 +16,8 @@ public abstract class Configuration
Binder.Configuration? configuration = configurationSection.Get<Binder.Configuration>();
string json = JsonSerializer.Serialize(configuration, new JsonSerializerOptions() { WriteIndented = true });
result = JsonSerializer.Deserialize<Models.Configuration>(json);
if (result is null) throw new Exception(json);
if (result is null)
throw new Exception(json);
string jsonThis = result.ToString();
if (jsonThis != json)
{
@ -29,10 +30,11 @@ public abstract class Configuration
check = i;
break;
}
if (check is null) throw new Exception();
if (check is null)
throw new Exception();
string a = json[..check.Value].Split(',')[^1];
string b = json[check.Value..].Split(',')[0];
throw new Exception($"{a}{b}");
throw new Exception($"{a}{b}");
}
return result;
}