5 Commits
Author SHA1 Message Date
troogs 916c3142d4 Remove unused Blazorise script reference and add kill-port script for managing listening processes 2026-04-10 05:48:37 +02:00
troogs f9426679ea Add tasks.json for managing FoodsharingSiegen.Server build and debug tasks 2026-04-10 05:48:29 +02:00
troogs a68994d00b Add launch configuration for debugging FoodsharingSiegen.Server 2026-04-10 05:48:14 +02:00
troogs fcda568905 Add app.db to .gitignore to prevent tracking of database file 2026-04-10 05:48:06 +02:00
Andre Beging ac178e60e0 Update term for ReleasedForVerification interaction type
Changed the term "Freigabe zum Freischalten" to "Freigabe Freischalten" to ensure consistency with naming conventions. This adjustment clarifies language usage and aligns with the application's terminology standards.
2025-04-02 09:26:07 +02:00
7 changed files with 129 additions and 3 deletions
+1
View File
@@ -5,3 +5,4 @@ riderModule.iml
/_ReSharper.Caches/ /_ReSharper.Caches/
Publish/ Publish/
app.db
+19
View File
@@ -0,0 +1,19 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug FoodsharingSiegen.Server",
"type": "dotnet",
"request": "launch",
"projectPath": "${workspaceFolder}/FoodsharingSiegen.Server/FoodsharingSiegen.Server.csproj",
"env": {
"DOTNET_ROLL_FORWARD": "Major"
},
"launchBrowser": true,
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
}
}
]
}
+53
View File
@@ -0,0 +1,53 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Watch FoodsharingSiegen.Server",
"type": "shell",
"command": "dotnet watch --project ./FoodsharingSiegen.Server/FoodsharingSiegen.Server.csproj run",
"isBackground": true,
"problemMatcher": "$msCompile",
"options": {
"statusbar": {
"hide": false,
"label": "Watch Server",
"color": "#3a96ff",
"icon": {
"id": "eye"
},
"running": {
"color": "#f7df06",
"icon": {
"id": "loading~spin"
}
}
}
}
},
{
"label": "Debug FoodsharingSiegen.Server",
"type": "shell",
"command": "dotnet run --project ./FoodsharingSiegen.Server/FoodsharingSiegen.Server.csproj",
"problemMatcher": "$msCompile",
"options": {
"env": {
"DOTNET_ROLL_FORWARD": "Major"
},
"statusbar": {
"hide": false,
"label": "Debug Server",
"color": "#3a96ff",
"icon": {
"id": "debug-start"
},
"running": {
"color": "#f7df06",
"icon": {
"id": "loading~spin"
}
}
}
}
}
]
}
@@ -43,7 +43,6 @@
</div> </div>
<script src="_framework/blazor.server.js"></script> <script src="_framework/blazor.server.js"></script>
<script src="_content/Blazorise/blazorise.js"></script>
<script src="_content/Blazorise.Material/blazorise.material.js?v=1.7.5.0"></script> <script src="_content/Blazorise.Material/blazorise.material.js?v=1.7.5.0"></script>
</body> </body>
</html> </html>
@@ -0,0 +1 @@
20260410
@@ -28,7 +28,7 @@ namespace FoodsharingSiegen.Shared.Helper
InteractionType.Verify => "Verifizierung", InteractionType.Verify => "Verifizierung",
InteractionType.Complete => "Fertig", InteractionType.Complete => "Fertig",
InteractionType.StepInBriefing => appSettings.Terms.StepInName ?? "StepIn", InteractionType.StepInBriefing => appSettings.Terms.StepInName ?? "StepIn",
InteractionType.ReleasedForVerification => "Freigabe zum Freischalten", InteractionType.ReleasedForVerification => "Freigabe Freischalten",
_ => type.ToString() _ => type.ToString()
}; };
} }
+53
View File
@@ -0,0 +1,53 @@
param(
[int]$Port = 56000
)
$killedAny = $false
# Try modern cmdlet first.
$connections = Get-NetTCPConnection -LocalPort $Port -State Listen -ErrorAction SilentlyContinue
if ($connections) {
$pids = $connections | Select-Object -ExpandProperty OwningProcess -Unique
foreach ($procId in $pids) {
try {
Stop-Process -Id $procId -Force -ErrorAction Stop
Write-Host "Stopped process $procId listening on port $Port."
$killedAny = $true
}
catch {
Write-Warning "Failed to stop process ${procId}: $($_.Exception.Message)"
}
}
}
# Fallback for environments where Get-NetTCPConnection is unavailable.
if (-not $killedAny) {
$netstatLines = netstat -ano | Select-String ":$Port\s"
$listenLines = $netstatLines | Where-Object { $_.Line -match "LISTENING" }
$fallbackPids = @()
foreach ($line in $listenLines) {
$parts = ($line.Line -replace "\s+", " ").Trim().Split(" ")
if ($parts.Length -ge 5) {
$fallbackPids += $parts[-1]
}
}
$fallbackPids = $fallbackPids | Sort-Object -Unique
foreach ($pidText in $fallbackPids) {
if ($pidText -match "^\d+$") {
try {
Stop-Process -Id ([int]$pidText) -Force -ErrorAction Stop
Write-Host "Stopped process $pidText listening on port $Port."
$killedAny = $true
}
catch {
Write-Warning "Failed to stop process ${pidText}: $($_.Exception.Message)"
}
}
}
}
if (-not $killedAny) {
Write-Host "No listening process found on port $Port."
}