Added BuildAvaloniaApp
This commit is contained in:
Родитель
e8c34ee6ed
Коммит
bc57cc7975
|
@ -21,14 +21,16 @@ namespace ColorBlenderAvalonia
|
|||
}
|
||||
}
|
||||
|
||||
public static AppBuilder BuildAvaloniaApp()
|
||||
=> AppBuilder.Configure<App>()
|
||||
.UsePlatformDetect()
|
||||
.LogToDebug();
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
InitializeLogging();
|
||||
AppBuilder.Configure<App>()
|
||||
.UsePlatformDetect()
|
||||
.Start<MainWindow>(() => new ColorMatch(213, 46, 49));
|
||||
BuildAvaloniaApp().Start<MainWindow>(() => new ColorMatch(213, 46, 49));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -36,16 +38,6 @@ namespace ColorBlenderAvalonia
|
|||
}
|
||||
}
|
||||
|
||||
static void InitializeLogging()
|
||||
{
|
||||
#if DEBUG
|
||||
SerilogLogger.Initialize(new LoggerConfiguration()
|
||||
.MinimumLevel.Warning()
|
||||
.WriteTo.Trace(outputTemplate: "{Area}: {Message}")
|
||||
.CreateLogger());
|
||||
#endif
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
|
|
Загрузка…
Ссылка в новой задаче