More changes to support BollingerBands.
This commit is contained in:
@@ -9,32 +9,45 @@ namespace PortfolioManager;
|
||||
|
||||
sealed class Program
|
||||
{
|
||||
// Initialization code. Don't use any Avalonia, third-party APIs or any
|
||||
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
|
||||
// yet and stuff might break.
|
||||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
// Initialization code. Don't use any Avalonia, third-party APIs or any
|
||||
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
|
||||
// yet and stuff might break.
|
||||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
MDTrace.LogLevel = LogLevel.VERBOSE;
|
||||
String strLogFile = "portfolio_manager.log";
|
||||
Trace.Listeners.Add(new TextWriterTraceListener(strLogFile));
|
||||
MDTrace.WriteLine(LogLevel.DEBUG, "[MAIN:STARTING]");
|
||||
|
||||
IConfigurationBuilder builder = new ConfigurationBuilder()
|
||||
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
|
||||
IConfigurationRoot configurationRoot = builder.Build();
|
||||
GlobalConfig.Instance.Configuration = configurationRoot; // This call sets up configuration stuff so it needs to be first.
|
||||
try
|
||||
{
|
||||
MDTrace.LogLevel = LogLevel.VERBOSE;
|
||||
String strLogFile = "portfolio_manager.log";
|
||||
Trace.Listeners.Add(new TextWriterTraceListener(strLogFile));
|
||||
MDTrace.WriteLine(LogLevel.DEBUG, "[STARTING]");
|
||||
|
||||
IConfigurationBuilder builder = new ConfigurationBuilder()
|
||||
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
|
||||
IConfigurationRoot configurationRoot = builder.Build();
|
||||
GlobalConfig.Instance.Configuration = configurationRoot; // This call sets up configuration stuff so it needs to be first.
|
||||
try { BuildAvaloniaApp().StartWithClassicDesktopLifetime(args); }
|
||||
catch (Exception exception) { MDTrace.WriteLine(LogLevel.DEBUG, exception.ToString()); }
|
||||
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
MDTrace.WriteLine(LogLevel.DEBUG, exception.ToString());
|
||||
}
|
||||
// public static void Main(string[] args) => BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
|
||||
|
||||
// Avalonia configuration, don't remove; also used by visual designer.
|
||||
public static AppBuilder BuildAvaloniaApp()
|
||||
=> AppBuilder.Configure<App>()
|
||||
.UsePlatformDetect()
|
||||
.WithInterFont()
|
||||
.LogToTrace();
|
||||
ProcessThreadCollection currentThreads = Process.GetCurrentProcess().Threads;
|
||||
if (null != currentThreads && 0 != currentThreads.Count)
|
||||
{
|
||||
MDTrace.WriteLine(LogLevel.DEBUG, $"There were {currentThreads.Count} threads still running at application shutdown.");
|
||||
}
|
||||
MDTrace.WriteLine(LogLevel.DEBUG, "[MAIN:EXIT]");
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
// Avalonia configuration, don't remove; also used by visual designer.
|
||||
public static AppBuilder BuildAvaloniaApp()
|
||||
=> AppBuilder.Configure<App>()
|
||||
.UsePlatformDetect()
|
||||
.WithInterFont()
|
||||
.LogToTrace();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user