From 36be779ce7d596cae6f70d5e8eeb11cbd7fd5c1c Mon Sep 17 00:00:00 2001 From: Fredrik <50200428+fredrik-instech@users.noreply.github.com> Date: Thu, 11 Dec 2025 15:08:03 +0100 Subject: [PATCH 01/11] Add initial solution --- AnchorageFiller/.gitignore | 428 ++++++++++++++++++ .../AnchorageFiller.Client.csproj | 16 + .../Layout/MainLayout.razor | 9 + .../Layout/MainLayout.razor.css | 20 + .../AnchorageFiller.Client/Pages/Home.razor | 7 + .../Pages/NotFound.razor | 5 + .../AnchorageFiller.Client/Program.cs | 5 + .../AnchorageFiller.Client/Routes.razor | 6 + .../AnchorageFiller.Client/_Imports.razor | 10 + AnchorageFiller/AnchorageFiller.sln | 50 ++ .../AnchorageFiller/AnchorageFiller.csproj | 15 + .../AnchorageFiller/Components/App.razor | 20 + .../Components/Pages/Error.razor | 36 ++ .../AnchorageFiller/Components/_Imports.razor | 11 + AnchorageFiller/AnchorageFiller/Program.cs | 32 ++ .../Properties/launchSettings.json | 25 + .../appsettings.Development.json | 8 + .../AnchorageFiller/appsettings.json | 9 + .../AnchorageFiller/wwwroot/app.css | 38 ++ 19 files changed, 750 insertions(+) create mode 100644 AnchorageFiller/.gitignore create mode 100644 AnchorageFiller/AnchorageFiller.Client/AnchorageFiller.Client.csproj create mode 100644 AnchorageFiller/AnchorageFiller.Client/Layout/MainLayout.razor create mode 100644 AnchorageFiller/AnchorageFiller.Client/Layout/MainLayout.razor.css create mode 100644 AnchorageFiller/AnchorageFiller.Client/Pages/Home.razor create mode 100644 AnchorageFiller/AnchorageFiller.Client/Pages/NotFound.razor create mode 100644 AnchorageFiller/AnchorageFiller.Client/Program.cs create mode 100644 AnchorageFiller/AnchorageFiller.Client/Routes.razor create mode 100644 AnchorageFiller/AnchorageFiller.Client/_Imports.razor create mode 100644 AnchorageFiller/AnchorageFiller.sln create mode 100644 AnchorageFiller/AnchorageFiller/AnchorageFiller.csproj create mode 100644 AnchorageFiller/AnchorageFiller/Components/App.razor create mode 100644 AnchorageFiller/AnchorageFiller/Components/Pages/Error.razor create mode 100644 AnchorageFiller/AnchorageFiller/Components/_Imports.razor create mode 100644 AnchorageFiller/AnchorageFiller/Program.cs create mode 100644 AnchorageFiller/AnchorageFiller/Properties/launchSettings.json create mode 100644 AnchorageFiller/AnchorageFiller/appsettings.Development.json create mode 100644 AnchorageFiller/AnchorageFiller/appsettings.json create mode 100644 AnchorageFiller/AnchorageFiller/wwwroot/app.css diff --git a/AnchorageFiller/.gitignore b/AnchorageFiller/.gitignore new file mode 100644 index 0000000..ba7a514 --- /dev/null +++ b/AnchorageFiller/.gitignore @@ -0,0 +1,428 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates +*.env + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ + +[Dd]ebug/x64/ +[Dd]ebugPublic/x64/ +[Rr]elease/x64/ +[Rr]eleases/x64/ +bin/x64/ +obj/x64/ + +[Dd]ebug/x86/ +[Dd]ebugPublic/x86/ +[Rr]elease/x86/ +[Rr]eleases/x86/ +bin/x86/ +obj/x86/ + +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +[Aa][Rr][Mm]64[Ee][Cc]/ +bld/ +[Oo]bj/ +[Oo]ut/ +[Ll]og/ +[Ll]ogs/ + +# Build results on 'Bin' directories +**/[Bb]in/* +# Uncomment if you have tasks that rely on *.refresh files to move binaries +# (https://github.com/github/gitignore/pull/3736) +#!**/[Bb]in/*.refresh + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* +*.trx + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Approval Tests result files +*.received.* + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.idb +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +# but not Directory.Build.rsp, as it configures directory-level build defaults +!Directory.Build.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# 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 + +# 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 +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +**/.paket/paket.exe +paket-files/ + +# FAKE - F# Make +**/.fake/ + +# CodeRush personal settings +**/.cr/personal + +# Python Tools for Visual Studio (PTVS) +**/__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +#tools/** +#!tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog +MSBuild_Logs/ + +# AWS SAM Build and Temporary Artifacts folder +.aws-sam + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +**/.mfractor/ + +# Local History for Visual Studio +**/.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +**/.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp \ No newline at end of file diff --git a/AnchorageFiller/AnchorageFiller.Client/AnchorageFiller.Client.csproj b/AnchorageFiller/AnchorageFiller.Client/AnchorageFiller.Client.csproj new file mode 100644 index 0000000..1d8eff4 --- /dev/null +++ b/AnchorageFiller/AnchorageFiller.Client/AnchorageFiller.Client.csproj @@ -0,0 +1,16 @@ + + + + net10.0 + enable + enable + true + Default + true + + + + + + + diff --git a/AnchorageFiller/AnchorageFiller.Client/Layout/MainLayout.razor b/AnchorageFiller/AnchorageFiller.Client/Layout/MainLayout.razor new file mode 100644 index 0000000..96fbbe6 --- /dev/null +++ b/AnchorageFiller/AnchorageFiller.Client/Layout/MainLayout.razor @@ -0,0 +1,9 @@ +@inherits LayoutComponentBase + +@Body + +
+ An unhandled error has occurred. + Reload + 🗙 +
diff --git a/AnchorageFiller/AnchorageFiller.Client/Layout/MainLayout.razor.css b/AnchorageFiller/AnchorageFiller.Client/Layout/MainLayout.razor.css new file mode 100644 index 0000000..60cec92 --- /dev/null +++ b/AnchorageFiller/AnchorageFiller.Client/Layout/MainLayout.razor.css @@ -0,0 +1,20 @@ +#blazor-error-ui { + color-scheme: light only; + background: lightyellow; + bottom: 0; + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); + box-sizing: border-box; + display: none; + left: 0; + padding: 0.6rem 1.25rem 0.7rem 1.25rem; + position: fixed; + width: 100%; + z-index: 1000; +} + + #blazor-error-ui .dismiss { + cursor: pointer; + position: absolute; + right: 0.75rem; + top: 0.5rem; + } diff --git a/AnchorageFiller/AnchorageFiller.Client/Pages/Home.razor b/AnchorageFiller/AnchorageFiller.Client/Pages/Home.razor new file mode 100644 index 0000000..9001e0b --- /dev/null +++ b/AnchorageFiller/AnchorageFiller.Client/Pages/Home.razor @@ -0,0 +1,7 @@ +@page "/" + +Home + +

Hello, world!

+ +Welcome to your new app. diff --git a/AnchorageFiller/AnchorageFiller.Client/Pages/NotFound.razor b/AnchorageFiller/AnchorageFiller.Client/Pages/NotFound.razor new file mode 100644 index 0000000..917ada1 --- /dev/null +++ b/AnchorageFiller/AnchorageFiller.Client/Pages/NotFound.razor @@ -0,0 +1,5 @@ +@page "/not-found" +@layout MainLayout + +

Not Found

+

Sorry, the content you are looking for does not exist.

\ No newline at end of file diff --git a/AnchorageFiller/AnchorageFiller.Client/Program.cs b/AnchorageFiller/AnchorageFiller.Client/Program.cs new file mode 100644 index 0000000..519269f --- /dev/null +++ b/AnchorageFiller/AnchorageFiller.Client/Program.cs @@ -0,0 +1,5 @@ +using Microsoft.AspNetCore.Components.WebAssembly.Hosting; + +var builder = WebAssemblyHostBuilder.CreateDefault(args); + +await builder.Build().RunAsync(); diff --git a/AnchorageFiller/AnchorageFiller.Client/Routes.razor b/AnchorageFiller/AnchorageFiller.Client/Routes.razor new file mode 100644 index 0000000..105855d --- /dev/null +++ b/AnchorageFiller/AnchorageFiller.Client/Routes.razor @@ -0,0 +1,6 @@ + + + + + + diff --git a/AnchorageFiller/AnchorageFiller.Client/_Imports.razor b/AnchorageFiller/AnchorageFiller.Client/_Imports.razor new file mode 100644 index 0000000..6f4e56c --- /dev/null +++ b/AnchorageFiller/AnchorageFiller.Client/_Imports.razor @@ -0,0 +1,10 @@ +@using System.Net.Http +@using System.Net.Http.Json +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using static Microsoft.AspNetCore.Components.Web.RenderMode +@using Microsoft.AspNetCore.Components.Web.Virtualization +@using Microsoft.JSInterop +@using AnchorageFiller.Client +@using AnchorageFiller.Client.Layout diff --git a/AnchorageFiller/AnchorageFiller.sln b/AnchorageFiller/AnchorageFiller.sln new file mode 100644 index 0000000..de5ae4b --- /dev/null +++ b/AnchorageFiller/AnchorageFiller.sln @@ -0,0 +1,50 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.0.0 +MinimumVisualStudioVersion = 16.0.0.0 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AnchorageFiller", "AnchorageFiller\AnchorageFiller.csproj", "{3875A7AC-5E2B-4775-8E60-91492BA72641}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AnchorageFiller.Client", "AnchorageFiller.Client\AnchorageFiller.Client.csproj", "{8D1FBD47-0F96-4529-97A0-300A7BBA34EB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Debug|x64.ActiveCfg = Debug|Any CPU + {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Debug|x64.Build.0 = Debug|Any CPU + {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Debug|x86.ActiveCfg = Debug|Any CPU + {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Debug|x86.Build.0 = Debug|Any CPU + {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Release|Any CPU.Build.0 = Release|Any CPU + {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Release|x64.ActiveCfg = Release|Any CPU + {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Release|x64.Build.0 = Release|Any CPU + {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Release|x86.ActiveCfg = Release|Any CPU + {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Release|x86.Build.0 = Release|Any CPU + {3875A7AC-5E2B-4775-8E60-91492BA72641}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3875A7AC-5E2B-4775-8E60-91492BA72641}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3875A7AC-5E2B-4775-8E60-91492BA72641}.Debug|x64.ActiveCfg = Debug|Any CPU + {3875A7AC-5E2B-4775-8E60-91492BA72641}.Debug|x64.Build.0 = Debug|Any CPU + {3875A7AC-5E2B-4775-8E60-91492BA72641}.Debug|x86.ActiveCfg = Debug|Any CPU + {3875A7AC-5E2B-4775-8E60-91492BA72641}.Debug|x86.Build.0 = Debug|Any CPU + {3875A7AC-5E2B-4775-8E60-91492BA72641}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3875A7AC-5E2B-4775-8E60-91492BA72641}.Release|Any CPU.Build.0 = Release|Any CPU + {3875A7AC-5E2B-4775-8E60-91492BA72641}.Release|x64.ActiveCfg = Release|Any CPU + {3875A7AC-5E2B-4775-8E60-91492BA72641}.Release|x64.Build.0 = Release|Any CPU + {3875A7AC-5E2B-4775-8E60-91492BA72641}.Release|x86.ActiveCfg = Release|Any CPU + {3875A7AC-5E2B-4775-8E60-91492BA72641}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4E68DE82-CC9E-4B2E-BBB5-7E4D57EC1C4B} + EndGlobalSection +EndGlobal diff --git a/AnchorageFiller/AnchorageFiller/AnchorageFiller.csproj b/AnchorageFiller/AnchorageFiller/AnchorageFiller.csproj new file mode 100644 index 0000000..fdac9a5 --- /dev/null +++ b/AnchorageFiller/AnchorageFiller/AnchorageFiller.csproj @@ -0,0 +1,15 @@ + + + + net10.0 + enable + enable + true + + + + + + + + diff --git a/AnchorageFiller/AnchorageFiller/Components/App.razor b/AnchorageFiller/AnchorageFiller/Components/App.razor new file mode 100644 index 0000000..2dbff1e --- /dev/null +++ b/AnchorageFiller/AnchorageFiller/Components/App.razor @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/AnchorageFiller/AnchorageFiller/Components/Pages/Error.razor b/AnchorageFiller/AnchorageFiller/Components/Pages/Error.razor new file mode 100644 index 0000000..576cc2d --- /dev/null +++ b/AnchorageFiller/AnchorageFiller/Components/Pages/Error.razor @@ -0,0 +1,36 @@ +@page "/Error" +@using System.Diagnostics + +Error + +

Error.

+

An error occurred while processing your request.

+ +@if (ShowRequestId) +{ +

+ Request ID: @RequestId +

+} + +

Development Mode

+

+ Swapping to Development environment will display more detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

+ +@code{ + [CascadingParameter] + private HttpContext? HttpContext { get; set; } + + private string? RequestId { get; set; } + private bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + protected override void OnInitialized() => + RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier; +} diff --git a/AnchorageFiller/AnchorageFiller/Components/_Imports.razor b/AnchorageFiller/AnchorageFiller/Components/_Imports.razor new file mode 100644 index 0000000..89a3b1e --- /dev/null +++ b/AnchorageFiller/AnchorageFiller/Components/_Imports.razor @@ -0,0 +1,11 @@ +@using System.Net.Http +@using System.Net.Http.Json +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using static Microsoft.AspNetCore.Components.Web.RenderMode +@using Microsoft.AspNetCore.Components.Web.Virtualization +@using Microsoft.JSInterop +@using AnchorageFiller +@using AnchorageFiller.Client +@using AnchorageFiller.Components diff --git a/AnchorageFiller/AnchorageFiller/Program.cs b/AnchorageFiller/AnchorageFiller/Program.cs new file mode 100644 index 0000000..2e9a333 --- /dev/null +++ b/AnchorageFiller/AnchorageFiller/Program.cs @@ -0,0 +1,32 @@ +using AnchorageFiller.Components; + +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. +builder.Services.AddRazorComponents() + .AddInteractiveWebAssemblyComponents(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (app.Environment.IsDevelopment()) +{ + app.UseWebAssemblyDebugging(); +} +else +{ + app.UseExceptionHandler("/Error", createScopeForErrors: true); + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); +} +app.UseStatusCodePagesWithReExecute("/not-found", createScopeForStatusCodePages: true); +app.UseHttpsRedirection(); + +app.UseAntiforgery(); + +app.MapStaticAssets(); +app.MapRazorComponents() + .AddInteractiveWebAssemblyRenderMode() + .AddAdditionalAssemblies(typeof(AnchorageFiller.Client._Imports).Assembly); + +app.Run(); diff --git a/AnchorageFiller/AnchorageFiller/Properties/launchSettings.json b/AnchorageFiller/AnchorageFiller/Properties/launchSettings.json new file mode 100644 index 0000000..871a89d --- /dev/null +++ b/AnchorageFiller/AnchorageFiller/Properties/launchSettings.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", + "applicationUrl": "http://localhost:5113", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", + "applicationUrl": "https://localhost:7108;http://localhost:5113", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } + } diff --git a/AnchorageFiller/AnchorageFiller/appsettings.Development.json b/AnchorageFiller/AnchorageFiller/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/AnchorageFiller/AnchorageFiller/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/AnchorageFiller/AnchorageFiller/appsettings.json b/AnchorageFiller/AnchorageFiller/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/AnchorageFiller/AnchorageFiller/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/AnchorageFiller/AnchorageFiller/wwwroot/app.css b/AnchorageFiller/AnchorageFiller/wwwroot/app.css new file mode 100644 index 0000000..5388357 --- /dev/null +++ b/AnchorageFiller/AnchorageFiller/wwwroot/app.css @@ -0,0 +1,38 @@ +h1:focus { + outline: none; +} + +.valid.modified:not([type=checkbox]) { + outline: 1px solid #26b050; +} + +.invalid { + outline: 1px solid #e50000; +} + +.validation-message { + color: #e50000; +} + +.blazor-error-boundary { + background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121; + padding: 1rem 1rem 1rem 3.7rem; + color: white; +} + + .blazor-error-boundary::after { + content: "An error has occurred." + } + +.darker-border-checkbox.form-check-input { + border-color: #929292; +} + +.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder { + color: var(--bs-secondary-color); + text-align: end; +} + +.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder { + text-align: start; +} \ No newline at end of file From f0ee2b02b6a0a7ee41a4c0eba03d53727bb2976b Mon Sep 17 00:00:00 2001 From: Fredrik <50200428+fredrik-instech@users.noreply.github.com> Date: Thu, 11 Dec 2025 15:09:04 +0100 Subject: [PATCH 02/11] Migrate to slnx --- AnchorageFiller/AnchorageFiller.sln | 50 ---------------------------- AnchorageFiller/AnchorageFiller.slnx | 9 +++++ 2 files changed, 9 insertions(+), 50 deletions(-) delete mode 100644 AnchorageFiller/AnchorageFiller.sln create mode 100644 AnchorageFiller/AnchorageFiller.slnx diff --git a/AnchorageFiller/AnchorageFiller.sln b/AnchorageFiller/AnchorageFiller.sln deleted file mode 100644 index de5ae4b..0000000 --- a/AnchorageFiller/AnchorageFiller.sln +++ /dev/null @@ -1,50 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.0.0 -MinimumVisualStudioVersion = 16.0.0.0 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AnchorageFiller", "AnchorageFiller\AnchorageFiller.csproj", "{3875A7AC-5E2B-4775-8E60-91492BA72641}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AnchorageFiller.Client", "AnchorageFiller.Client\AnchorageFiller.Client.csproj", "{8D1FBD47-0F96-4529-97A0-300A7BBA34EB}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Debug|x64.ActiveCfg = Debug|Any CPU - {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Debug|x64.Build.0 = Debug|Any CPU - {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Debug|x86.ActiveCfg = Debug|Any CPU - {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Debug|x86.Build.0 = Debug|Any CPU - {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Release|Any CPU.Build.0 = Release|Any CPU - {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Release|x64.ActiveCfg = Release|Any CPU - {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Release|x64.Build.0 = Release|Any CPU - {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Release|x86.ActiveCfg = Release|Any CPU - {8D1FBD47-0F96-4529-97A0-300A7BBA34EB}.Release|x86.Build.0 = Release|Any CPU - {3875A7AC-5E2B-4775-8E60-91492BA72641}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3875A7AC-5E2B-4775-8E60-91492BA72641}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3875A7AC-5E2B-4775-8E60-91492BA72641}.Debug|x64.ActiveCfg = Debug|Any CPU - {3875A7AC-5E2B-4775-8E60-91492BA72641}.Debug|x64.Build.0 = Debug|Any CPU - {3875A7AC-5E2B-4775-8E60-91492BA72641}.Debug|x86.ActiveCfg = Debug|Any CPU - {3875A7AC-5E2B-4775-8E60-91492BA72641}.Debug|x86.Build.0 = Debug|Any CPU - {3875A7AC-5E2B-4775-8E60-91492BA72641}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3875A7AC-5E2B-4775-8E60-91492BA72641}.Release|Any CPU.Build.0 = Release|Any CPU - {3875A7AC-5E2B-4775-8E60-91492BA72641}.Release|x64.ActiveCfg = Release|Any CPU - {3875A7AC-5E2B-4775-8E60-91492BA72641}.Release|x64.Build.0 = Release|Any CPU - {3875A7AC-5E2B-4775-8E60-91492BA72641}.Release|x86.ActiveCfg = Release|Any CPU - {3875A7AC-5E2B-4775-8E60-91492BA72641}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {4E68DE82-CC9E-4B2E-BBB5-7E4D57EC1C4B} - EndGlobalSection -EndGlobal diff --git a/AnchorageFiller/AnchorageFiller.slnx b/AnchorageFiller/AnchorageFiller.slnx new file mode 100644 index 0000000..9885f63 --- /dev/null +++ b/AnchorageFiller/AnchorageFiller.slnx @@ -0,0 +1,9 @@ + + + + + + + + + From 553c6183205a684e367ae5ba74b92d2cc81d8c45 Mon Sep 17 00:00:00 2001 From: Fredrik <50200428+fredrik-instech@users.noreply.github.com> Date: Thu, 11 Dec 2025 15:54:53 +0100 Subject: [PATCH 03/11] Rename server project --- .../AnchorageFiller.Server.csproj} | 0 .../Components/App.razor | 2 +- .../Components/Pages/Error.razor | 0 .../Components/_Imports.razor | 4 ++-- .../{AnchorageFiller => AnchorageFiller.Server}/Program.cs | 2 +- .../Properties/launchSettings.json | 0 .../appsettings.Development.json | 0 .../appsettings.json | 0 .../wwwroot/app.css | 0 AnchorageFiller/AnchorageFiller.slnx | 2 +- 10 files changed, 5 insertions(+), 5 deletions(-) rename AnchorageFiller/{AnchorageFiller/AnchorageFiller.csproj => AnchorageFiller.Server/AnchorageFiller.Server.csproj} (100%) rename AnchorageFiller/{AnchorageFiller => AnchorageFiller.Server}/Components/App.razor (85%) rename AnchorageFiller/{AnchorageFiller => AnchorageFiller.Server}/Components/Pages/Error.razor (100%) rename AnchorageFiller/{AnchorageFiller => AnchorageFiller.Server}/Components/_Imports.razor (83%) rename AnchorageFiller/{AnchorageFiller => AnchorageFiller.Server}/Program.cs (95%) rename AnchorageFiller/{AnchorageFiller => AnchorageFiller.Server}/Properties/launchSettings.json (100%) rename AnchorageFiller/{AnchorageFiller => AnchorageFiller.Server}/appsettings.Development.json (100%) rename AnchorageFiller/{AnchorageFiller => AnchorageFiller.Server}/appsettings.json (100%) rename AnchorageFiller/{AnchorageFiller => AnchorageFiller.Server}/wwwroot/app.css (100%) diff --git a/AnchorageFiller/AnchorageFiller/AnchorageFiller.csproj b/AnchorageFiller/AnchorageFiller.Server/AnchorageFiller.Server.csproj similarity index 100% rename from AnchorageFiller/AnchorageFiller/AnchorageFiller.csproj rename to AnchorageFiller/AnchorageFiller.Server/AnchorageFiller.Server.csproj diff --git a/AnchorageFiller/AnchorageFiller/Components/App.razor b/AnchorageFiller/AnchorageFiller.Server/Components/App.razor similarity index 85% rename from AnchorageFiller/AnchorageFiller/Components/App.razor rename to AnchorageFiller/AnchorageFiller.Server/Components/App.razor index 2dbff1e..90ab425 100644 --- a/AnchorageFiller/AnchorageFiller/Components/App.razor +++ b/AnchorageFiller/AnchorageFiller.Server/Components/App.razor @@ -7,7 +7,7 @@ - + diff --git a/AnchorageFiller/AnchorageFiller/Components/Pages/Error.razor b/AnchorageFiller/AnchorageFiller.Server/Components/Pages/Error.razor similarity index 100% rename from AnchorageFiller/AnchorageFiller/Components/Pages/Error.razor rename to AnchorageFiller/AnchorageFiller.Server/Components/Pages/Error.razor diff --git a/AnchorageFiller/AnchorageFiller/Components/_Imports.razor b/AnchorageFiller/AnchorageFiller.Server/Components/_Imports.razor similarity index 83% rename from AnchorageFiller/AnchorageFiller/Components/_Imports.razor rename to AnchorageFiller/AnchorageFiller.Server/Components/_Imports.razor index 89a3b1e..10a0ff5 100644 --- a/AnchorageFiller/AnchorageFiller/Components/_Imports.razor +++ b/AnchorageFiller/AnchorageFiller.Server/Components/_Imports.razor @@ -6,6 +6,6 @@ @using static Microsoft.AspNetCore.Components.Web.RenderMode @using Microsoft.AspNetCore.Components.Web.Virtualization @using Microsoft.JSInterop -@using AnchorageFiller +@using AnchorageFiller.Server @using AnchorageFiller.Client -@using AnchorageFiller.Components +@using AnchorageFiller.Server.Components diff --git a/AnchorageFiller/AnchorageFiller/Program.cs b/AnchorageFiller/AnchorageFiller.Server/Program.cs similarity index 95% rename from AnchorageFiller/AnchorageFiller/Program.cs rename to AnchorageFiller/AnchorageFiller.Server/Program.cs index 2e9a333..de71583 100644 --- a/AnchorageFiller/AnchorageFiller/Program.cs +++ b/AnchorageFiller/AnchorageFiller.Server/Program.cs @@ -1,4 +1,4 @@ -using AnchorageFiller.Components; +using AnchorageFiller.Server.Components; var builder = WebApplication.CreateBuilder(args); diff --git a/AnchorageFiller/AnchorageFiller/Properties/launchSettings.json b/AnchorageFiller/AnchorageFiller.Server/Properties/launchSettings.json similarity index 100% rename from AnchorageFiller/AnchorageFiller/Properties/launchSettings.json rename to AnchorageFiller/AnchorageFiller.Server/Properties/launchSettings.json diff --git a/AnchorageFiller/AnchorageFiller/appsettings.Development.json b/AnchorageFiller/AnchorageFiller.Server/appsettings.Development.json similarity index 100% rename from AnchorageFiller/AnchorageFiller/appsettings.Development.json rename to AnchorageFiller/AnchorageFiller.Server/appsettings.Development.json diff --git a/AnchorageFiller/AnchorageFiller/appsettings.json b/AnchorageFiller/AnchorageFiller.Server/appsettings.json similarity index 100% rename from AnchorageFiller/AnchorageFiller/appsettings.json rename to AnchorageFiller/AnchorageFiller.Server/appsettings.json diff --git a/AnchorageFiller/AnchorageFiller/wwwroot/app.css b/AnchorageFiller/AnchorageFiller.Server/wwwroot/app.css similarity index 100% rename from AnchorageFiller/AnchorageFiller/wwwroot/app.css rename to AnchorageFiller/AnchorageFiller.Server/wwwroot/app.css diff --git a/AnchorageFiller/AnchorageFiller.slnx b/AnchorageFiller/AnchorageFiller.slnx index 9885f63..51e13d1 100644 --- a/AnchorageFiller/AnchorageFiller.slnx +++ b/AnchorageFiller/AnchorageFiller.slnx @@ -5,5 +5,5 @@ - + From d9f363b81373fffbfa46be78feb8a20de6e810e7 Mon Sep 17 00:00:00 2001 From: Fredrik <50200428+fredrik-instech@users.noreply.github.com> Date: Thu, 11 Dec 2025 16:33:52 +0100 Subject: [PATCH 04/11] Add client and proxy API --- .../AnchorageFiller.Client.csproj | 5 +++++ .../AnchorageFiller.Client/Pages/Home.razor | 10 ++++++++++ .../AnchorageFiller.Client/Program.cs | 8 ++++++++ .../AnchorageFiller.Clients.csproj | 9 +++++++++ .../AnchorageFiller.Clients/FleetsClient.cs | 13 +++++++++++++ .../AnchorageFiller.Clients/IFleetsClient.cs | 8 ++++++++ .../Responses/GetFleetResponse.cs | 7 +++++++ .../AnchorageFiller.Server.csproj | 1 + .../AnchorageFiller.Server/Program.cs | 17 +++++++++++++++++ AnchorageFiller/AnchorageFiller.slnx | 1 + 10 files changed, 79 insertions(+) create mode 100644 AnchorageFiller/AnchorageFiller.Clients/AnchorageFiller.Clients.csproj create mode 100644 AnchorageFiller/AnchorageFiller.Clients/FleetsClient.cs create mode 100644 AnchorageFiller/AnchorageFiller.Clients/IFleetsClient.cs create mode 100644 AnchorageFiller/AnchorageFiller.Clients/Responses/GetFleetResponse.cs diff --git a/AnchorageFiller/AnchorageFiller.Client/AnchorageFiller.Client.csproj b/AnchorageFiller/AnchorageFiller.Client/AnchorageFiller.Client.csproj index 1d8eff4..9022d2c 100644 --- a/AnchorageFiller/AnchorageFiller.Client/AnchorageFiller.Client.csproj +++ b/AnchorageFiller/AnchorageFiller.Client/AnchorageFiller.Client.csproj @@ -11,6 +11,11 @@ + + + + + diff --git a/AnchorageFiller/AnchorageFiller.Client/Pages/Home.razor b/AnchorageFiller/AnchorageFiller.Client/Pages/Home.razor index 9001e0b..d9f631d 100644 --- a/AnchorageFiller/AnchorageFiller.Client/Pages/Home.razor +++ b/AnchorageFiller/AnchorageFiller.Client/Pages/Home.razor @@ -1,7 +1,17 @@ @page "/" +@using AnchorageFiller.Clients Home

Hello, world!

Welcome to your new app. + +@code { + [Inject] public required IFleetsClient FleetsClient { get; set; } + + protected override async Task OnInitializedAsync() + { + var fleets = await FleetsClient.GetRandomFleetAsync(); + } +} diff --git a/AnchorageFiller/AnchorageFiller.Client/Program.cs b/AnchorageFiller/AnchorageFiller.Client/Program.cs index 519269f..38b041c 100644 --- a/AnchorageFiller/AnchorageFiller.Client/Program.cs +++ b/AnchorageFiller/AnchorageFiller.Client/Program.cs @@ -1,5 +1,13 @@ +using AnchorageFiller.Clients; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; var builder = WebAssemblyHostBuilder.CreateDefault(args); + +builder.Services + .AddHttpClient(client => + { + client.BaseAddress = new(builder.HostEnvironment.BaseAddress, UriKind.Absolute); + }); + await builder.Build().RunAsync(); diff --git a/AnchorageFiller/AnchorageFiller.Clients/AnchorageFiller.Clients.csproj b/AnchorageFiller/AnchorageFiller.Clients/AnchorageFiller.Clients.csproj new file mode 100644 index 0000000..b760144 --- /dev/null +++ b/AnchorageFiller/AnchorageFiller.Clients/AnchorageFiller.Clients.csproj @@ -0,0 +1,9 @@ + + + + net10.0 + enable + enable + + + diff --git a/AnchorageFiller/AnchorageFiller.Clients/FleetsClient.cs b/AnchorageFiller/AnchorageFiller.Clients/FleetsClient.cs new file mode 100644 index 0000000..9c14c68 --- /dev/null +++ b/AnchorageFiller/AnchorageFiller.Clients/FleetsClient.cs @@ -0,0 +1,13 @@ +using System.Net.Http.Json; +using AnchorageFiller.Clients.Responses; + +namespace AnchorageFiller.Clients; + +public class FleetsClient(HttpClient client) : IFleetsClient +{ + public async Task GetRandomFleetAsync(CancellationToken cancellationToken = default) + { + var response = await client.GetFromJsonAsync("/api/fleets/random", cancellationToken); + return response ?? throw new("Failed to retrieve fleet data."); + } +} diff --git a/AnchorageFiller/AnchorageFiller.Clients/IFleetsClient.cs b/AnchorageFiller/AnchorageFiller.Clients/IFleetsClient.cs new file mode 100644 index 0000000..aec4cd4 --- /dev/null +++ b/AnchorageFiller/AnchorageFiller.Clients/IFleetsClient.cs @@ -0,0 +1,8 @@ +using AnchorageFiller.Clients.Responses; + +namespace AnchorageFiller.Clients; + +public interface IFleetsClient +{ + Task GetRandomFleetAsync(CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/AnchorageFiller/AnchorageFiller.Clients/Responses/GetFleetResponse.cs b/AnchorageFiller/AnchorageFiller.Clients/Responses/GetFleetResponse.cs new file mode 100644 index 0000000..1466a09 --- /dev/null +++ b/AnchorageFiller/AnchorageFiller.Clients/Responses/GetFleetResponse.cs @@ -0,0 +1,7 @@ +namespace AnchorageFiller.Clients.Responses; + +public record GetFleetResponse(Size AnchorageSize, IReadOnlyList Fleets); + +public record FleetItem(Size SingleShipDimensions, string ShipDesignation, int ShipCount); + +public record Size(int Width, int Height); \ No newline at end of file diff --git a/AnchorageFiller/AnchorageFiller.Server/AnchorageFiller.Server.csproj b/AnchorageFiller/AnchorageFiller.Server/AnchorageFiller.Server.csproj index fdac9a5..6bc4132 100644 --- a/AnchorageFiller/AnchorageFiller.Server/AnchorageFiller.Server.csproj +++ b/AnchorageFiller/AnchorageFiller.Server/AnchorageFiller.Server.csproj @@ -10,6 +10,7 @@ +
diff --git a/AnchorageFiller/AnchorageFiller.Server/Program.cs b/AnchorageFiller/AnchorageFiller.Server/Program.cs index de71583..299d2b5 100644 --- a/AnchorageFiller/AnchorageFiller.Server/Program.cs +++ b/AnchorageFiller/AnchorageFiller.Server/Program.cs @@ -1,4 +1,7 @@ +using AnchorageFiller.Clients; using AnchorageFiller.Server.Components; +using Microsoft.AspNetCore.Mvc; +using System.Text.Json; var builder = WebApplication.CreateBuilder(args); @@ -6,6 +9,17 @@ builder.Services.AddRazorComponents() .AddInteractiveWebAssemblyComponents(); + +builder.Services + .AddHttpClient(client => + { + client.BaseAddress = new("https://esa.instech.no", UriKind.Absolute); + }); +builder.Services.ConfigureHttpJsonOptions(options => +{ + options.SerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase; +}); + var app = builder.Build(); // Configure the HTTP request pipeline. @@ -29,4 +43,7 @@ .AddInteractiveWebAssemblyRenderMode() .AddAdditionalAssemblies(typeof(AnchorageFiller.Client._Imports).Assembly); +// API Endpoints +app.MapGet("/api/fleets/random", ([FromServices] IFleetsClient client) => client.GetRandomFleetAsync()); + app.Run(); diff --git a/AnchorageFiller/AnchorageFiller.slnx b/AnchorageFiller/AnchorageFiller.slnx index 51e13d1..645e151 100644 --- a/AnchorageFiller/AnchorageFiller.slnx +++ b/AnchorageFiller/AnchorageFiller.slnx @@ -5,5 +5,6 @@ + From fa0f4a792e17d1a0bd6becd672fd6fe8a3298783 Mon Sep 17 00:00:00 2001 From: Fredrik <50200428+fredrik-instech@users.noreply.github.com> Date: Thu, 11 Dec 2025 16:41:12 +0100 Subject: [PATCH 05/11] Cleanup --- AnchorageFiller/AnchorageFiller.Clients/FleetsClient.cs | 7 ++----- AnchorageFiller/AnchorageFiller.Clients/IFleetsClient.cs | 2 +- .../AnchorageFiller.Server/AnchorageFiller.Server.csproj | 1 - AnchorageFiller/AnchorageFiller.Server/Program.cs | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/AnchorageFiller/AnchorageFiller.Clients/FleetsClient.cs b/AnchorageFiller/AnchorageFiller.Clients/FleetsClient.cs index 9c14c68..9f40a5b 100644 --- a/AnchorageFiller/AnchorageFiller.Clients/FleetsClient.cs +++ b/AnchorageFiller/AnchorageFiller.Clients/FleetsClient.cs @@ -5,9 +5,6 @@ namespace AnchorageFiller.Clients; public class FleetsClient(HttpClient client) : IFleetsClient { - public async Task GetRandomFleetAsync(CancellationToken cancellationToken = default) - { - var response = await client.GetFromJsonAsync("/api/fleets/random", cancellationToken); - return response ?? throw new("Failed to retrieve fleet data."); - } + public Task GetRandomFleetAsync(CancellationToken cancellationToken = default) => + client.GetFromJsonAsync("/api/fleets/random", cancellationToken); } diff --git a/AnchorageFiller/AnchorageFiller.Clients/IFleetsClient.cs b/AnchorageFiller/AnchorageFiller.Clients/IFleetsClient.cs index aec4cd4..2c026eb 100644 --- a/AnchorageFiller/AnchorageFiller.Clients/IFleetsClient.cs +++ b/AnchorageFiller/AnchorageFiller.Clients/IFleetsClient.cs @@ -4,5 +4,5 @@ namespace AnchorageFiller.Clients; public interface IFleetsClient { - Task GetRandomFleetAsync(CancellationToken cancellationToken = default); + Task GetRandomFleetAsync(CancellationToken cancellationToken = default); } \ No newline at end of file diff --git a/AnchorageFiller/AnchorageFiller.Server/AnchorageFiller.Server.csproj b/AnchorageFiller/AnchorageFiller.Server/AnchorageFiller.Server.csproj index 6bc4132..fdac9a5 100644 --- a/AnchorageFiller/AnchorageFiller.Server/AnchorageFiller.Server.csproj +++ b/AnchorageFiller/AnchorageFiller.Server/AnchorageFiller.Server.csproj @@ -10,7 +10,6 @@ - diff --git a/AnchorageFiller/AnchorageFiller.Server/Program.cs b/AnchorageFiller/AnchorageFiller.Server/Program.cs index 299d2b5..e1b89fd 100644 --- a/AnchorageFiller/AnchorageFiller.Server/Program.cs +++ b/AnchorageFiller/AnchorageFiller.Server/Program.cs @@ -46,4 +46,4 @@ // API Endpoints app.MapGet("/api/fleets/random", ([FromServices] IFleetsClient client) => client.GetRandomFleetAsync()); -app.Run(); +await app.RunAsync(); From f9a5c6d2399e7221ffbe8060ed6683ba70a786ab Mon Sep 17 00:00:00 2001 From: Fredrik <50200428+fredrik-instech@users.noreply.github.com> Date: Thu, 11 Dec 2025 16:47:27 +0100 Subject: [PATCH 06/11] Rename project Client -> Web --- .../AnchorageFiller.Server/AnchorageFiller.Server.csproj | 2 +- .../AnchorageFiller.Server/Components/_Imports.razor | 2 +- AnchorageFiller/AnchorageFiller.Server/Program.cs | 2 +- .../AnchorageFiller.Web.csproj} | 0 .../Layout/MainLayout.razor | 0 .../Layout/MainLayout.razor.css | 0 .../Pages/Home.razor | 0 .../Pages/NotFound.razor | 0 .../Program.cs | 0 .../Routes.razor | 0 .../_Imports.razor | 4 ++-- AnchorageFiller/AnchorageFiller.slnx | 2 +- 12 files changed, 6 insertions(+), 6 deletions(-) rename AnchorageFiller/{AnchorageFiller.Client/AnchorageFiller.Client.csproj => AnchorageFiller.Web/AnchorageFiller.Web.csproj} (100%) rename AnchorageFiller/{AnchorageFiller.Client => AnchorageFiller.Web}/Layout/MainLayout.razor (100%) rename AnchorageFiller/{AnchorageFiller.Client => AnchorageFiller.Web}/Layout/MainLayout.razor.css (100%) rename AnchorageFiller/{AnchorageFiller.Client => AnchorageFiller.Web}/Pages/Home.razor (100%) rename AnchorageFiller/{AnchorageFiller.Client => AnchorageFiller.Web}/Pages/NotFound.razor (100%) rename AnchorageFiller/{AnchorageFiller.Client => AnchorageFiller.Web}/Program.cs (100%) rename AnchorageFiller/{AnchorageFiller.Client => AnchorageFiller.Web}/Routes.razor (100%) rename AnchorageFiller/{AnchorageFiller.Client => AnchorageFiller.Web}/_Imports.razor (83%) diff --git a/AnchorageFiller/AnchorageFiller.Server/AnchorageFiller.Server.csproj b/AnchorageFiller/AnchorageFiller.Server/AnchorageFiller.Server.csproj index fdac9a5..78f91c3 100644 --- a/AnchorageFiller/AnchorageFiller.Server/AnchorageFiller.Server.csproj +++ b/AnchorageFiller/AnchorageFiller.Server/AnchorageFiller.Server.csproj @@ -8,7 +8,7 @@ - + diff --git a/AnchorageFiller/AnchorageFiller.Server/Components/_Imports.razor b/AnchorageFiller/AnchorageFiller.Server/Components/_Imports.razor index 10a0ff5..122dd1d 100644 --- a/AnchorageFiller/AnchorageFiller.Server/Components/_Imports.razor +++ b/AnchorageFiller/AnchorageFiller.Server/Components/_Imports.razor @@ -7,5 +7,5 @@ @using Microsoft.AspNetCore.Components.Web.Virtualization @using Microsoft.JSInterop @using AnchorageFiller.Server -@using AnchorageFiller.Client +@using AnchorageFiller.Web @using AnchorageFiller.Server.Components diff --git a/AnchorageFiller/AnchorageFiller.Server/Program.cs b/AnchorageFiller/AnchorageFiller.Server/Program.cs index e1b89fd..9de2bf2 100644 --- a/AnchorageFiller/AnchorageFiller.Server/Program.cs +++ b/AnchorageFiller/AnchorageFiller.Server/Program.cs @@ -41,7 +41,7 @@ app.MapStaticAssets(); app.MapRazorComponents() .AddInteractiveWebAssemblyRenderMode() - .AddAdditionalAssemblies(typeof(AnchorageFiller.Client._Imports).Assembly); + .AddAdditionalAssemblies(typeof(AnchorageFiller.Web._Imports).Assembly); // API Endpoints app.MapGet("/api/fleets/random", ([FromServices] IFleetsClient client) => client.GetRandomFleetAsync()); diff --git a/AnchorageFiller/AnchorageFiller.Client/AnchorageFiller.Client.csproj b/AnchorageFiller/AnchorageFiller.Web/AnchorageFiller.Web.csproj similarity index 100% rename from AnchorageFiller/AnchorageFiller.Client/AnchorageFiller.Client.csproj rename to AnchorageFiller/AnchorageFiller.Web/AnchorageFiller.Web.csproj diff --git a/AnchorageFiller/AnchorageFiller.Client/Layout/MainLayout.razor b/AnchorageFiller/AnchorageFiller.Web/Layout/MainLayout.razor similarity index 100% rename from AnchorageFiller/AnchorageFiller.Client/Layout/MainLayout.razor rename to AnchorageFiller/AnchorageFiller.Web/Layout/MainLayout.razor diff --git a/AnchorageFiller/AnchorageFiller.Client/Layout/MainLayout.razor.css b/AnchorageFiller/AnchorageFiller.Web/Layout/MainLayout.razor.css similarity index 100% rename from AnchorageFiller/AnchorageFiller.Client/Layout/MainLayout.razor.css rename to AnchorageFiller/AnchorageFiller.Web/Layout/MainLayout.razor.css diff --git a/AnchorageFiller/AnchorageFiller.Client/Pages/Home.razor b/AnchorageFiller/AnchorageFiller.Web/Pages/Home.razor similarity index 100% rename from AnchorageFiller/AnchorageFiller.Client/Pages/Home.razor rename to AnchorageFiller/AnchorageFiller.Web/Pages/Home.razor diff --git a/AnchorageFiller/AnchorageFiller.Client/Pages/NotFound.razor b/AnchorageFiller/AnchorageFiller.Web/Pages/NotFound.razor similarity index 100% rename from AnchorageFiller/AnchorageFiller.Client/Pages/NotFound.razor rename to AnchorageFiller/AnchorageFiller.Web/Pages/NotFound.razor diff --git a/AnchorageFiller/AnchorageFiller.Client/Program.cs b/AnchorageFiller/AnchorageFiller.Web/Program.cs similarity index 100% rename from AnchorageFiller/AnchorageFiller.Client/Program.cs rename to AnchorageFiller/AnchorageFiller.Web/Program.cs diff --git a/AnchorageFiller/AnchorageFiller.Client/Routes.razor b/AnchorageFiller/AnchorageFiller.Web/Routes.razor similarity index 100% rename from AnchorageFiller/AnchorageFiller.Client/Routes.razor rename to AnchorageFiller/AnchorageFiller.Web/Routes.razor diff --git a/AnchorageFiller/AnchorageFiller.Client/_Imports.razor b/AnchorageFiller/AnchorageFiller.Web/_Imports.razor similarity index 83% rename from AnchorageFiller/AnchorageFiller.Client/_Imports.razor rename to AnchorageFiller/AnchorageFiller.Web/_Imports.razor index 6f4e56c..204fe81 100644 --- a/AnchorageFiller/AnchorageFiller.Client/_Imports.razor +++ b/AnchorageFiller/AnchorageFiller.Web/_Imports.razor @@ -6,5 +6,5 @@ @using static Microsoft.AspNetCore.Components.Web.RenderMode @using Microsoft.AspNetCore.Components.Web.Virtualization @using Microsoft.JSInterop -@using AnchorageFiller.Client -@using AnchorageFiller.Client.Layout +@using AnchorageFiller.Web +@using AnchorageFiller.Web.Layout diff --git a/AnchorageFiller/AnchorageFiller.slnx b/AnchorageFiller/AnchorageFiller.slnx index 645e151..4cd8814 100644 --- a/AnchorageFiller/AnchorageFiller.slnx +++ b/AnchorageFiller/AnchorageFiller.slnx @@ -4,7 +4,7 @@ - + From 2c11af372741af42c8c41692b4da346c84748bf3 Mon Sep 17 00:00:00 2001 From: Fredrik <50200428+fredrik-instech@users.noreply.github.com> Date: Thu, 11 Dec 2025 17:01:04 +0100 Subject: [PATCH 07/11] Use Central Package Management --- .../AnchorageFiller.Server.csproj | 5 ++++- AnchorageFiller/AnchorageFiller.Server/Program.cs | 9 ++++----- .../AnchorageFiller.Web/AnchorageFiller.Web.csproj | 4 ++-- AnchorageFiller/Directory.Packages.props | 11 +++++++++++ 4 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 AnchorageFiller/Directory.Packages.props diff --git a/AnchorageFiller/AnchorageFiller.Server/AnchorageFiller.Server.csproj b/AnchorageFiller/AnchorageFiller.Server/AnchorageFiller.Server.csproj index 78f91c3..3fbb5be 100644 --- a/AnchorageFiller/AnchorageFiller.Server/AnchorageFiller.Server.csproj +++ b/AnchorageFiller/AnchorageFiller.Server/AnchorageFiller.Server.csproj @@ -7,9 +7,12 @@ true + + + + - diff --git a/AnchorageFiller/AnchorageFiller.Server/Program.cs b/AnchorageFiller/AnchorageFiller.Server/Program.cs index 9de2bf2..8969fda 100644 --- a/AnchorageFiller/AnchorageFiller.Server/Program.cs +++ b/AnchorageFiller/AnchorageFiller.Server/Program.cs @@ -10,11 +10,10 @@ .AddInteractiveWebAssemblyComponents(); -builder.Services - .AddHttpClient(client => - { - client.BaseAddress = new("https://esa.instech.no", UriKind.Absolute); - }); +builder.Services.AddHttpClient(client => +{ + client.BaseAddress = new("https://esa.instech.no", UriKind.Absolute); +}); builder.Services.ConfigureHttpJsonOptions(options => { options.SerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase; diff --git a/AnchorageFiller/AnchorageFiller.Web/AnchorageFiller.Web.csproj b/AnchorageFiller/AnchorageFiller.Web/AnchorageFiller.Web.csproj index 9022d2c..1fa7409 100644 --- a/AnchorageFiller/AnchorageFiller.Web/AnchorageFiller.Web.csproj +++ b/AnchorageFiller/AnchorageFiller.Web/AnchorageFiller.Web.csproj @@ -10,8 +10,8 @@ - - + + diff --git a/AnchorageFiller/Directory.Packages.props b/AnchorageFiller/Directory.Packages.props new file mode 100644 index 0000000..48d9206 --- /dev/null +++ b/AnchorageFiller/Directory.Packages.props @@ -0,0 +1,11 @@ + + + + true + + + + + + + From 202e07b7a2d9d2863f1019d78c35daf431e0985a Mon Sep 17 00:00:00 2001 From: Fredrik <50200428+fredrik-instech@users.noreply.github.com> Date: Thu, 11 Dec 2025 17:08:24 +0100 Subject: [PATCH 08/11] Store url in appsettigns --- AnchorageFiller/AnchorageFiller.Server/Program.cs | 2 +- AnchorageFiller/AnchorageFiller.Server/appsettings.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AnchorageFiller/AnchorageFiller.Server/Program.cs b/AnchorageFiller/AnchorageFiller.Server/Program.cs index 8969fda..8e0f9fb 100644 --- a/AnchorageFiller/AnchorageFiller.Server/Program.cs +++ b/AnchorageFiller/AnchorageFiller.Server/Program.cs @@ -12,7 +12,7 @@ builder.Services.AddHttpClient(client => { - client.BaseAddress = new("https://esa.instech.no", UriKind.Absolute); + client.BaseAddress = new(builder.Configuration.GetValue("ApiUrl")!, UriKind.Absolute); }); builder.Services.ConfigureHttpJsonOptions(options => { diff --git a/AnchorageFiller/AnchorageFiller.Server/appsettings.json b/AnchorageFiller/AnchorageFiller.Server/appsettings.json index 10f68b8..731cae7 100644 --- a/AnchorageFiller/AnchorageFiller.Server/appsettings.json +++ b/AnchorageFiller/AnchorageFiller.Server/appsettings.json @@ -5,5 +5,6 @@ "Microsoft.AspNetCore": "Warning" } }, - "AllowedHosts": "*" + "AllowedHosts": "*", + "ApiUrl": "https://esa.instech.no" } From d89bd3ce9d2f792371477e84f675d1adf837907b Mon Sep 17 00:00:00 2001 From: Fredrik <50200428+fredrik-instech@users.noreply.github.com> Date: Thu, 11 Dec 2025 17:25:29 +0100 Subject: [PATCH 09/11] Update readme --- README.md | 48 +++++++++++++----------------------------------- 1 file changed, 13 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index d99422e..253d31f 100644 --- a/README.md +++ b/README.md @@ -6,44 +6,22 @@ One common problem in shipping is to fill an anchorage efficiently with as many ## Prerequisites - Your favourite IDE to code C# / Blazor 😀 - - .net 9 SDK installed + - .net 10 SDK installed - github account, we want you to publish your code to a public repository which you share with us. ## The Task -Create a Blazor WASM or Server app which connects to the api at URL: [https://esa.instech.no/](https://esa.instech.no/). Please note that the documentation page for this API contains a link to a separate readme which is not relevant for this Blazor FE task. - -A request like this: -```sh -$ curl -X GET https://esa.instech.no/api/fleets/random -``` -.. can produce a JSON response with data similar to this: -```json -{ - "anchorageSize": { - "width": 12, - "height": 15 - }, - "fleets": [ - { - "singleShipDimensions": { "width": 6, "height": 5 }, - "shipDesignation": "LNG Unit", - "shipCount": 2 - }, - { - "singleShipDimensions": { "width": 3, "height": 12 }, - "shipDesignation": "Science & Engineering Ship", - "shipCount": 5 - } - ] -} -``` +In the `AnchorageFiller` directory of this repository, we have provided a basic Blazor App you can extend to solve this task. +The AnchorageFiller solution consists of the following projects: +* `AnchorageFiller.Clients` - Strongly typed client that can be used to fetch a response from our API. +* `AnchorageFiller.Server` - AspNetCore server used to host the WebAssembly app and to proxy requests to our API. +* `AnchorageFiller.Web` - Blazor WebAssembly app. ### Suggested UI: Wireframes -The json states that there are 2 vessels with size (6x5) and 5 vessels with size (3X12). These can be dragged (and dropped) into the anchorage area. +The API response states that there are 2 vessels with size (6x5) and 5 vessels with size (3X12). These can be dragged (and dropped) into the anchorage area. Wireframes @@ -54,20 +32,20 @@ The json states that there are 2 vessels with size (6x5) and 5 vessels with size You are done. 🥳 Clicking the "Try again!" button issues a new request to the API. Based on the response, render a new anchorage and the vessels / items to fill it with. ### Additional information: -- It could be that the vessels must be possible to rotate 90 degrees to utilize all space in the anchorage. You decide how to do this from a UX perspective (double clicking the vessel maybe?). If this is not possible, leave it. +- It could be that the vessels must be possible to rotate 90 degrees to utilize all space in the anchorage. You decide how to do this from a UX perspective. If this is not possible, leave it. - Overlap between vessels is not possible 💥 -- It is ok if the full anchorage cannot be filled, but then you need to provide means to try again, perhaps always show that button? +- Our API does not guarantee anchorages that can be filled. There may be too many vessels in the response. Then you need to provide means to try again, perhaps always show that button? - The state of the anchorage does not have to be persisted, page reload will be a new try. -- Any security concerns are out of scope (auth/CORS ++). +- Any security concerns are out of scope (auth ++). - You can use third party libraries / components. ## What will we evaluate? - Apart from a functional SPA, we want you create a codebase which is "clean" (adhere to the SOLID principles). +- We value clean code, accessibility, project structure and usability over having lots of functionality. Consider this if you have limited time. - Are there any parts which can be unit tested? - - The UI components are probably not easy to test, but do you have any services, e.g. BinPackService which can be tested with mock dependencies? - How do you do state management? -- Apply CSS/Bootstraping to make the SPA look a bit nicer than the wireframes. -- Documentation - either in code or in a separate readme is highly appreciated. +- Apply CSS/Bootstraping to make the SPA look a bit nicer than the wireframes. +- Documentation - either in code or in a separate readme is highly appreciated. - We do not like AI/Agent generated readme files. They tend to be bloated, we would much rather read documentation where the content is created by you 🫵 (do not stress with spelling mistakes too much, they just make the content look genuine). Good luck! 🙂 If you have any questions, do not hesitate to contact us. From 17fdc354665c9df2a88908d39d48c2cbc31dbba4 Mon Sep 17 00:00:00 2001 From: Fredrik <50200428+fredrik-instech@users.noreply.github.com> Date: Mon, 22 Dec 2025 15:37:51 +0100 Subject: [PATCH 10/11] Disable prerendering --- AnchorageFiller/AnchorageFiller.Server/Components/App.razor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AnchorageFiller/AnchorageFiller.Server/Components/App.razor b/AnchorageFiller/AnchorageFiller.Server/Components/App.razor index 90ab425..4897812 100644 --- a/AnchorageFiller/AnchorageFiller.Server/Components/App.razor +++ b/AnchorageFiller/AnchorageFiller.Server/Components/App.razor @@ -9,11 +9,11 @@ - + - + From e2cd910850e8b9977ad04b9c82fd1c83e95a2f9a Mon Sep 17 00:00:00 2001 From: Fredrik <50200428+fredrik-instech@users.noreply.github.com> Date: Tue, 6 Jan 2026 10:51:58 +0100 Subject: [PATCH 11/11] Cleanup --- .../AnchorageFiller.Clients/Responses/FleetItem.cs | 3 +++ .../AnchorageFiller.Clients/Responses/GetFleetResponse.cs | 4 ---- AnchorageFiller/AnchorageFiller.Clients/Responses/Size.cs | 3 +++ 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 AnchorageFiller/AnchorageFiller.Clients/Responses/FleetItem.cs create mode 100644 AnchorageFiller/AnchorageFiller.Clients/Responses/Size.cs diff --git a/AnchorageFiller/AnchorageFiller.Clients/Responses/FleetItem.cs b/AnchorageFiller/AnchorageFiller.Clients/Responses/FleetItem.cs new file mode 100644 index 0000000..74cd4dd --- /dev/null +++ b/AnchorageFiller/AnchorageFiller.Clients/Responses/FleetItem.cs @@ -0,0 +1,3 @@ +namespace AnchorageFiller.Clients.Responses; + +public record FleetItem(Size SingleShipSize, string ShipDesignation, int ShipCount); diff --git a/AnchorageFiller/AnchorageFiller.Clients/Responses/GetFleetResponse.cs b/AnchorageFiller/AnchorageFiller.Clients/Responses/GetFleetResponse.cs index 1466a09..c095467 100644 --- a/AnchorageFiller/AnchorageFiller.Clients/Responses/GetFleetResponse.cs +++ b/AnchorageFiller/AnchorageFiller.Clients/Responses/GetFleetResponse.cs @@ -1,7 +1,3 @@ namespace AnchorageFiller.Clients.Responses; public record GetFleetResponse(Size AnchorageSize, IReadOnlyList Fleets); - -public record FleetItem(Size SingleShipDimensions, string ShipDesignation, int ShipCount); - -public record Size(int Width, int Height); \ No newline at end of file diff --git a/AnchorageFiller/AnchorageFiller.Clients/Responses/Size.cs b/AnchorageFiller/AnchorageFiller.Clients/Responses/Size.cs new file mode 100644 index 0000000..75a8033 --- /dev/null +++ b/AnchorageFiller/AnchorageFiller.Clients/Responses/Size.cs @@ -0,0 +1,3 @@ +namespace AnchorageFiller.Clients.Responses; + +public record Size(int Width, int Height); \ No newline at end of file