diff --git a/src/NET_9/HybridWebViewApp/App.xaml.cs b/src/NET_9/HybridWebViewApp/App.xaml.cs index 457f14d..cb69c18 100644 --- a/src/NET_9/HybridWebViewApp/App.xaml.cs +++ b/src/NET_9/HybridWebViewApp/App.xaml.cs @@ -1,14 +1,13 @@ -namespace HybridWebViewApp +namespace HybridWebViewApp; + +public partial class App : Application { - public partial class App : Application + public App() { - public App() - { - InitializeComponent(); - UserAppTheme = PlatformAppTheme; - } - - protected override Window CreateWindow(IActivationState? activationState) - => new MainWindow(); + InitializeComponent(); + UserAppTheme = PlatformAppTheme; } + + protected override Window CreateWindow(IActivationState? activationState) + => new MainWindow(); } diff --git a/src/NET_9/HybridWebViewApp/Imports.cs b/src/NET_9/HybridWebViewApp/Imports.cs index 211b801..8b43d9e 100644 --- a/src/NET_9/HybridWebViewApp/Imports.cs +++ b/src/NET_9/HybridWebViewApp/Imports.cs @@ -1,4 +1,5 @@ global using HybridWebViewApp; +global using HybridWebViewApp.Models; global using HybridWebViewApp.Views; // Static diff --git a/src/NET_9/HybridWebViewApp/MainWindow.xaml.cs b/src/NET_9/HybridWebViewApp/MainWindow.xaml.cs index 8f61f39..48a1f6d 100644 --- a/src/NET_9/HybridWebViewApp/MainWindow.xaml.cs +++ b/src/NET_9/HybridWebViewApp/MainWindow.xaml.cs @@ -1,15 +1,8 @@ -namespace HybridWebViewApp +namespace HybridWebViewApp; + +public partial class MainWindow : Window { - public partial class MainWindow : Window - { - public MainWindow() - { - InitializeComponent(); - } + public MainWindow() => InitializeComponent(); - public MainWindow(Page page) : base(page) - { - InitializeComponent(); - } - } + public MainWindow(Page page) : base(page) => InitializeComponent(); } diff --git a/src/NET_9/HybridWebViewApp/Models/IntContext.cs b/src/NET_9/HybridWebViewApp/Models/IntContext.cs new file mode 100644 index 0000000..5c0d755 --- /dev/null +++ b/src/NET_9/HybridWebViewApp/Models/IntContext.cs @@ -0,0 +1,7 @@ +using System.Text.Json.Serialization; + +namespace HybridWebViewApp.Models; + +//[JsonSourceGenerationOptions(WriteIndented = true)] +[JsonSerializable(typeof(int))] +internal partial class IntContext : JsonSerializerContext; diff --git a/src/NET_9/HybridWebViewApp/Resources/Raw/wwwroot/index.html b/src/NET_9/HybridWebViewApp/Resources/Raw/wwwroot/index.html index 9d03423..13a8943 100644 --- a/src/NET_9/HybridWebViewApp/Resources/Raw/wwwroot/index.html +++ b/src/NET_9/HybridWebViewApp/Resources/Raw/wwwroot/index.html @@ -21,6 +21,10 @@