diff --git a/Wino.Server.NET8/Program.cs b/Wino.Server.NET8/Program.cs index f7933cc0..0af86fd2 100644 --- a/Wino.Server.NET8/Program.cs +++ b/Wino.Server.NET8/Program.cs @@ -24,7 +24,7 @@ namespace Wino.Server var context = new DispatcherQueueSynchronizationContext( DispatcherQueue.GetForCurrentThread()); SynchronizationContext.SetSynchronizationContext(context); - new App(); + new ServerApp(); }); } } diff --git a/Wino.Server.NET8/App.xaml b/Wino.Server.NET8/ServerApp.xaml similarity index 93% rename from Wino.Server.NET8/App.xaml rename to Wino.Server.NET8/ServerApp.xaml index 5058d6b7..62f2c276 100644 --- a/Wino.Server.NET8/App.xaml +++ b/Wino.Server.NET8/ServerApp.xaml @@ -1,6 +1,6 @@ (App)Application.Current; + public new static ServerApp Current => (ServerApp)Application.Current; private const string WinoServerAppName = "Wino.Server"; public TaskbarIcon TrayIcon { get; private set; } public bool HandleClosedEvents { get; set; } = true; public IServiceProvider Services { get; private set; } - public App() + public ServerApp() { InitializeComponent(); } diff --git a/Wino.Server.NET8/ServerContext.cs b/Wino.Server.NET8/ServerContext.cs index 5471c501..d6c19a3e 100644 --- a/Wino.Server.NET8/ServerContext.cs +++ b/Wino.Server.NET8/ServerContext.cs @@ -108,13 +108,13 @@ namespace Wino.Server public async Task TestOutlookSynchronizer() { - var accountService = App.Current.Services.GetService(); + var accountService = ServerApp.Current.Services.GetService(); var accs = await accountService.GetAccountsAsync(); var acc = accs.ElementAt(0); - var authenticator = App.Current.Services.GetService(); - var processor = App.Current.Services.GetService(); + var authenticator = ServerApp.Current.Services.GetService(); + var processor = ServerApp.Current.Services.GetService(); var sync = new OutlookSynchronizer(acc, authenticator, processor); diff --git a/Wino.Server.NET8/Wino.Server.NET8.csproj b/Wino.Server.NET8/Wino.Server.NET8.csproj index 7a31aadc..ee14cc28 100644 --- a/Wino.Server.NET8/Wino.Server.NET8.csproj +++ b/Wino.Server.NET8/Wino.Server.NET8.csproj @@ -1,18 +1,22 @@  WinExe - net8.0-windows10.0.19041.0 + net8.0-windows10.0.22621.0 10.0.17763.0 Wino.Server app.manifest + x86;x64;ARM64 - true - win-x86;win-x64;win-arm64 - win10-x86;win10-x64;win10-arm64 + win-x86;win-x64;win-arm64 + win10-x86;win10-x64;win10-arm64 + 10.0.19041.35-preview + win-$(Platform).pubxml true + true - false + + 10.0.22621.0 @@ -36,13 +40,15 @@ + - + +