CLI now runs on linux as well as windows, changes required migrated from System.Data.SqlClient to Microsoft.Data.SqlClient and fixing server cert issue (it expired in 2020)

This commit is contained in:
2026-04-30 00:01:16 +01:00
parent f921e79671
commit 8e8c4138e3
61 changed files with 69 additions and 70 deletions
+15 -1
View File
@@ -12,7 +12,21 @@ namespace bnhtrade.Core
{
public string GetAppDataPath()
{
string path = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\bnhtrade\";
string path = null;
if (OperatingSystem.IsWindows())
{
path = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
+ @"\bnhtrade\";
}
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS())
{
path = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
+ "/.bnhtrade/";
}
else
{
throw new PlatformNotSupportedException("Unsupported operating system");
}
return path;
}