Add detailed comments and app flow documentation for BlazorWasm
Added comprehensive inline comments (mainly in German) to key files (index.html, Program.cs, App.razor, MainLayout.razor, NavMenu.razor, Catalogs.razor, CatalogApiClient.cs) to clarify their roles and the overall application flow. Updated Home.razor with a clearer heading and intro. Introduced Ablauf.cs, which documents the loading order and responsibilities of each major component. These changes enhance codebase clarity and maintainability, especially for German-speaking developers.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
/* Kapselt die Kommunikation mit der API für den Catalog-Endpunkt.
|
||||
Bietet Methoden für CRUD-Operationen auf Catalog-Daten */
|
||||
|
||||
using System.Net;
|
||||
using System.Net.Http.Json;
|
||||
using System.Text.Json;
|
||||
@@ -65,6 +68,9 @@ public class CatalogApiClient
|
||||
|
||||
private static async Task<string> ReadErrorAsync(HttpResponseMessage response)
|
||||
{
|
||||
// Liest und analysiert Fehlerdetails aus der API-Antwort.
|
||||
// Gibt eine benutzerfreundliche Fehlermeldung zurück.
|
||||
|
||||
string? problemTitle = null;
|
||||
string? problemDetail = null;
|
||||
|
||||
@@ -116,6 +122,9 @@ public class CatalogApiClient
|
||||
|
||||
private static string FormatSuffix(string? title, string? detail, string? reason)
|
||||
{
|
||||
// Formatiert zusätzliche Informationen für Fehlermeldungen.
|
||||
// Kombiniert Titel, Details und Grund in einer lesbaren Form.
|
||||
|
||||
var parts = new List<string>();
|
||||
if (!string.IsNullOrWhiteSpace(title)) parts.Add(title);
|
||||
if (!string.IsNullOrWhiteSpace(detail)) parts.Add(detail);
|
||||
|
||||
Reference in New Issue
Block a user