Use DBreeze Impl Preferences/SettingsHost

fix StringExtensions.Trim
This commit is contained in:
Aigio Liu
2022-08-04 14:11:29 +08:00
parent aab89668a9
commit 48083a90d2
17 changed files with 889 additions and 486 deletions
+17 -17
View File
@@ -311,27 +311,27 @@ public abstract class CommandLineHost : IDisposable
// -clt show -config -cert
var show = new Command("show", "显示信息");
show.AddOption(new Option<bool>("-config", "显示 Config.mpo 值"));
//show.AddOption(new Option<bool>("-config", "显示 Config.mpo 值"));
show.AddOption(new Option<bool>("-cert", "显示当前根证书信息"));
show.Handler = CommandHandler.Create((bool config, bool cert) =>
show.Handler = CommandHandler.Create((/*bool config,*/ bool cert) =>
{
if (OperatingSystem.IsWindows()) if (!AttachConsole()) AllocConsole();
if (config)
{
Console.WriteLine("Config: ");
try
{
SettingsHost.Load();
var configValue = SettingsHostBase.Local.ToJsonString();
Console.WriteLine(configValue);
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
Console.WriteLine();
}
//if (config)
//{
// Console.WriteLine("Config: ");
// try
// {
// SettingsHost.Load();
// var configValue = SettingsHostBase.Local.ToJsonString();
// Console.WriteLine(configValue);
// }
// catch (Exception e)
// {
// Console.WriteLine(e.ToString());
// }
// Console.WriteLine();
//}
if (cert)
{