From 39c8b861c0de844ab24b8b56431f60fdbc0d50c3 Mon Sep 17 00:00:00 2001 From: Mike Schumann Date: Fri, 13 Mar 2026 10:23:47 +0100 Subject: [PATCH] Initial commit. --- .gitignore | 6 +- ApiClient/ApiClient.csproj | 45 +++++++ ApiClient/App.xaml | 8 ++ ApiClient/App.xaml.cs | 33 +++++ ApiClient/AssemblyInfo.cs | 10 ++ ApiClient/MainWindow.xaml | 62 ++++++++++ ApiClient/MainWindow.xaml.cs | 10 ++ ApiClient/MainWindowViewModel.cs | 92 ++++++++++++++ .../PublishProfiles/FolderProfile.pubxml | 15 +++ ApiService/ApiService.csproj | 41 +++++++ .../Controllers/ExampleRequestController.cs | 27 +++++ ApiService/Program.cs | 34 ++++++ .../PublishProfiles/FolderProfile.pubxml | 20 +++ ApiService/Properties/launchSettings.json | 14 +++ ApiService/TunnelServer.cs | 24 ++++ ApiService/appsettings.Development.json | 8 ++ ApiService/appsettings.json | 16 +++ ApiService/dotnet-tools.json | 13 ++ ClientApiPoC.slnx | 7 ++ OnPremiseApp/App.xaml | 8 ++ OnPremiseApp/App.xaml.cs | 36 ++++++ OnPremiseApp/AssemblyInfo.cs | 10 ++ OnPremiseApp/MainWindow.xaml | 76 ++++++++++++ OnPremiseApp/MainWindow.xaml.cs | 9 ++ OnPremiseApp/MainWindowViewModel.cs | 114 ++++++++++++++++++ OnPremiseApp/OnPremiseApp.csproj | 45 +++++++ .../PublishProfiles/FolderProfile.pubxml | 15 +++ OnPremiseApp/Services/ClientDataService.cs | 21 ++++ README.md | 21 +++- Shared.Wpf/BaseViewModel.cs | 11 ++ Shared.Wpf/MvvmWindow.cs | 13 ++ Shared.Wpf/Shared.Wpf.csproj | 23 ++++ Shared/Models/ClientDataModel.cs | 9 ++ Shared/Models/ClientResultModel.cs | 7 ++ Shared/Models/ExampleRequestResultModel.cs | 7 ++ Shared/NotifyPropertyChangedBase.cs | 12 ++ Shared/Routes.cs | 9 ++ Shared/Shared.csproj | 23 ++++ Shared/SignalR/ClientTracker.cs | 18 +++ Shared/SignalR/TunnelClient.cs | 84 +++++++++++++ Shared/SignalR/TunnelHub.cs | 20 +++ Shared/SignalR/TunnelHubExtensions.cs | 21 ++++ Shared/SignalR/TunnelServerBase.cs | 36 ++++++ Shared/Tools.cs | 15 +++ 44 files changed, 1144 insertions(+), 4 deletions(-) create mode 100644 ApiClient/ApiClient.csproj create mode 100644 ApiClient/App.xaml create mode 100644 ApiClient/App.xaml.cs create mode 100644 ApiClient/AssemblyInfo.cs create mode 100644 ApiClient/MainWindow.xaml create mode 100644 ApiClient/MainWindow.xaml.cs create mode 100644 ApiClient/MainWindowViewModel.cs create mode 100644 ApiClient/Properties/PublishProfiles/FolderProfile.pubxml create mode 100644 ApiService/ApiService.csproj create mode 100644 ApiService/Controllers/ExampleRequestController.cs create mode 100644 ApiService/Program.cs create mode 100644 ApiService/Properties/PublishProfiles/FolderProfile.pubxml create mode 100644 ApiService/Properties/launchSettings.json create mode 100644 ApiService/TunnelServer.cs create mode 100644 ApiService/appsettings.Development.json create mode 100644 ApiService/appsettings.json create mode 100644 ApiService/dotnet-tools.json create mode 100644 ClientApiPoC.slnx create mode 100644 OnPremiseApp/App.xaml create mode 100644 OnPremiseApp/App.xaml.cs create mode 100644 OnPremiseApp/AssemblyInfo.cs create mode 100644 OnPremiseApp/MainWindow.xaml create mode 100644 OnPremiseApp/MainWindow.xaml.cs create mode 100644 OnPremiseApp/MainWindowViewModel.cs create mode 100644 OnPremiseApp/OnPremiseApp.csproj create mode 100644 OnPremiseApp/Properties/PublishProfiles/FolderProfile.pubxml create mode 100644 OnPremiseApp/Services/ClientDataService.cs create mode 100644 Shared.Wpf/BaseViewModel.cs create mode 100644 Shared.Wpf/MvvmWindow.cs create mode 100644 Shared.Wpf/Shared.Wpf.csproj create mode 100644 Shared/Models/ClientDataModel.cs create mode 100644 Shared/Models/ClientResultModel.cs create mode 100644 Shared/Models/ExampleRequestResultModel.cs create mode 100644 Shared/NotifyPropertyChangedBase.cs create mode 100644 Shared/Routes.cs create mode 100644 Shared/Shared.csproj create mode 100644 Shared/SignalR/ClientTracker.cs create mode 100644 Shared/SignalR/TunnelClient.cs create mode 100644 Shared/SignalR/TunnelHub.cs create mode 100644 Shared/SignalR/TunnelHubExtensions.cs create mode 100644 Shared/SignalR/TunnelServerBase.cs create mode 100644 Shared/Tools.cs diff --git a/.gitignore b/.gitignore index ed6d1d2..b491d6a 100644 --- a/.gitignore +++ b/.gitignore @@ -180,15 +180,15 @@ DocProject/Help/Html2 DocProject/Help/html # Click-Once directory -publish/ +[Pp]ublish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # Note: Comment the next line if you want to checkin your web deploy settings, # but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj +#*.pubxml +#*.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained diff --git a/ApiClient/ApiClient.csproj b/ApiClient/ApiClient.csproj new file mode 100644 index 0000000..6cc66f4 --- /dev/null +++ b/ApiClient/ApiClient.csproj @@ -0,0 +1,45 @@ + + + + WinExe + net10.0-windows + enable + enable + true + + ClientApiPoC.ApiClient + + true + true + true + win-x64 + true + false + + Mike Schumann + Copyright © 2026 $(Company) + 0.1.0 + $(AssemblyVersion) + en-US + + + + portable + + + + none + + + + + + + + + + + + + + diff --git a/ApiClient/App.xaml b/ApiClient/App.xaml new file mode 100644 index 0000000..2059c88 --- /dev/null +++ b/ApiClient/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/ApiClient/App.xaml.cs b/ApiClient/App.xaml.cs new file mode 100644 index 0000000..b003b04 --- /dev/null +++ b/ApiClient/App.xaml.cs @@ -0,0 +1,33 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using System.Windows; + +namespace ClientApiPoC.ApiClient { + public partial class App : Application { + private IHost _host; + + public App() { + _host = Host.CreateDefaultBuilder().ConfigureServices(services => { + // ViewModels: + services.AddTransient(); + // Views: + services.AddSingleton(); + }).Build(); + } + + protected override async void OnStartup(StartupEventArgs e) { + await _host.StartAsync(); + + var window = _host.Services.GetRequiredService(); + window.Show(); + + base.OnStartup(e); + } + + protected override async void OnExit(ExitEventArgs e) { + await _host.StopAsync(); + _host.Dispose(); + base.OnExit(e); + } + } +} \ No newline at end of file diff --git a/ApiClient/AssemblyInfo.cs b/ApiClient/AssemblyInfo.cs new file mode 100644 index 0000000..b0ec827 --- /dev/null +++ b/ApiClient/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/ApiClient/MainWindow.xaml b/ApiClient/MainWindow.xaml new file mode 100644 index 0000000..12fdf09 --- /dev/null +++ b/ApiClient/MainWindow.xaml @@ -0,0 +1,62 @@ + + + + + + + + + + + +