-
Notifications
You must be signed in to change notification settings - Fork 0
Add comprehensive German documentation for TemplateEngine.Core #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5a106da
Initial plan
Copilot 8c98e0f
Dokumentation erstellt: CHANGELOG, RELEASENOTES, docs/ mit Architektu…
Copilot e9c4f5b
Refactor: Flatten docs structure - move all docs to root docs/ folder
Copilot 9543aa2
Add LICENSE file, modernize README, remove roadmap section from docs
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # Changelog | ||
|
|
||
| Alle wichtigen Änderungen an diesem Projekt werden in dieser Datei dokumentiert. | ||
|
|
||
| Das Format basiert auf [Keep a Changelog](https://keepachangelog.com/de/1.0.0/), | ||
| und dieses Projekt folgt [Semantic Versioning](https://semver.org/lang/de/). | ||
|
|
||
| ## [Unveröffentlicht] | ||
|
|
||
| ### Geändert | ||
| - Veröffentlichungsprozess aktualisiert: NuGet-Publish-Aktion durch `dotnet pack` und `dotnet nuget push` ersetzt (Commit: 5c37e68) | ||
|
|
||
| ## [1.0.8-preview2] - Stand: Commit 5c37e68 | ||
|
|
||
| ### Hinzugefügt | ||
| - RazorTemplateEngine für komplexe HTML-Templates mit Razor-Syntax | ||
| - Unterstützung für Razor-Templates mit der `RazorTemplateEngine<T>` Klasse | ||
| - `ITemplateEngine<T>` Interface für beide Template-Engine-Implementierungen | ||
| - `ITemplateEngineConfig<T>` Interface und `TemplateEngineConfig<T>` Klasse für Konfiguration | ||
| - Erweiterungsmethoden `CreateStringFromTemplateWithJson<T>` und `LoadTemplateFromFile<T>` | ||
| - Demo-Projekt mit Razor-Template-Beispielen | ||
| - Unterstützung für parameterlose öffentliche Methoden im TemplateDataModel (Syntax: `${MethodName()}`) | ||
|
|
||
| ### Funktionen | ||
| - Einfacher String-basierter Template-Engine (`TemplateEngine` und `TemplateEngine<T>`) | ||
| - Razor-basierter Template-Engine (`RazorTemplateEngine<T>`) | ||
| - Anpassbare Delimiter (Standard: `${` und `}`) | ||
| - Konfigurierbare NULL-Wert-Behandlung (Standard: "NULL") | ||
| - Kultur-spezifische Formatierung für Datum und Zahlen (Standard: en-US) | ||
| - JSON-Deserialisierung für TemplateDataModel | ||
| - Laden von Templates aus Dateien | ||
|
|
||
| ### Unterstützte Datentypen | ||
| - Primitive Typen: String, Byte, Short, UShort, Long, ULong, SByte, Char | ||
| - Numerische Typen: Int16, Int32, Int64, UInt16, UInt32, UInt64, Decimal, Double | ||
| - Weitere Typen: DateTime, Boolean | ||
|
|
||
| ### Technische Details | ||
| - Target Framework: .NET 8.0 | ||
| - Assembly Version: 1.0.8.2 | ||
| - Package Version: 1.0.8-preview2 | ||
| - Abhängigkeit: RazorEngineCore 2020.10.1 | ||
|
|
||
| ### Build und CI/CD | ||
| - GitHub Actions Workflows für Build (Develop und Master Branch) | ||
| - GitHub Actions Workflow für Release und NuGet-Veröffentlichung | ||
| - Automatische NuGet-Package-Generierung beim Build | ||
|
|
||
| --- | ||
|
|
||
| ## Versions-Historie (Zusammenfassung) | ||
|
|
||
| Die Version 1.0.8-preview2 ist die aktuelle Entwicklungsversion mit Razor-Template-Unterstützung. | ||
|
|
||
| **Commit-Referenz für diese Dokumentation:** 5c37e68 (Basis-Commit für Dokumentation) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,138 @@ | ||
| # Release Notes | ||
|
|
||
| ## Version 1.0.8-preview2 | ||
|
|
||
| **Release-Datum:** In Entwicklung | ||
| **Commit-Referenz:** 5c37e68 | ||
|
|
||
| ### Übersicht | ||
|
|
||
| Diese Preview-Version erweitert die MbSoftLab.TemplateEngine.Core um Razor-Template-Unterstützung und verbessert den Build- und Veröffentlichungsprozess. | ||
|
|
||
| --- | ||
|
|
||
| ## ✨ Neue Features | ||
|
|
||
| ### 1. Razor Template Engine | ||
| Die neue `RazorTemplateEngine<T>` Klasse ermöglicht die Nutzung von Razor-Syntax für komplexe HTML-Templates: | ||
|
|
||
| ```csharp | ||
| Person person = new Person { FirstName = "Max", LastName = "Mustermann" }; | ||
| var engine = new RazorTemplateEngine<Person>(); | ||
| engine.LoadTemplateFromFile<Person>("template.cshtml"); | ||
| string result = engine.CreateStringFromTemplate(person); | ||
| ``` | ||
|
|
||
| **Vorteile:** | ||
| - Volle Razor-Syntax-Unterstützung (Schleifen, Bedingungen, etc.) | ||
| - Typsichere Template-Erstellung | ||
| - Kompilierte Templates für bessere Performance | ||
|
|
||
| ### 2. Erweiterte Template-Funktionalität | ||
| - **Methodenaufrufe:** Templates können jetzt parameterlose öffentliche Methoden aufrufen: `${MethodName()}` | ||
| - **JSON-Unterstützung:** Direkte Deserialisierung von JSON in TemplateDataModel | ||
| - **Template aus Datei laden:** `LoadTemplateFromFile<T>()` Erweiterungsmethode | ||
|
|
||
| ### 3. Einheitliches Interface-Design | ||
| - `ITemplateEngine<T>` als gemeinsames Interface für beide Engine-Typen | ||
| - `ITemplateEngineConfig<T>` für konsistente Konfiguration | ||
| - Bessere Erweiterbarkeit und Testbarkeit | ||
|
|
||
| --- | ||
|
|
||
| ## 🔧 Verbesserungen | ||
|
|
||
| ### Build und Deployment | ||
| - **Modernisierter Release-Workflow:** | ||
| - Umstellung von veralteter NuGet-Publish-Action auf native dotnet-Befehle | ||
| - `dotnet pack` für Package-Erstellung | ||
| - `dotnet nuget push` für NuGet-Veröffentlichung | ||
| - Verbesserte Zuverlässigkeit und Wartbarkeit | ||
|
|
||
| ### Code-Qualität | ||
| - XML-Dokumentation für alle öffentlichen APIs | ||
| - Einheitliche Fehlerbehandlung | ||
| - Kultur-spezifische Formatierung konfigurierbar | ||
|
|
||
| --- | ||
|
|
||
| ## 📦 Technische Spezifikationen | ||
|
|
||
| ### Framework und Versionen | ||
| - **Target Framework:** .NET 8.0 | ||
| - **Assembly Version:** 1.0.8.2 | ||
| - **Package Version:** 1.0.8-preview2 | ||
| - **Lizenz:** MIT | ||
|
|
||
| ### Abhängigkeiten | ||
| - RazorEngineCore 2020.10.1 | ||
|
|
||
| ### Build-Konfiguration | ||
| - Automatische Package-Generierung beim Build | ||
| - XML-Dokumentationsdatei wird generiert | ||
| - NuGet-Package mit Logo und vollständigen Metadaten | ||
|
|
||
| --- | ||
|
|
||
| ## 🎯 Anwendungsfälle | ||
|
|
||
| ### Simple String-Templates | ||
| Ideal für einfache Platzhalter-Ersetzungen in Konfigurationsdateien, E-Mails oder Berichten. | ||
|
|
||
| ### Komplexe HTML-Templates | ||
| Mit der Razor-Engine können Sie komplexe HTML-Dokumente mit Schleifen, Bedingungen und verschachtelten Strukturen erstellen. | ||
|
|
||
| ### Code-Generierung | ||
| Nutzen Sie die Template-Engines zur automatischen Code-, Konfigurations- oder Dokumentationsgenerierung. | ||
|
|
||
| --- | ||
|
|
||
| ## 📝 Migration von früheren Versionen | ||
|
|
||
| Die API ist abwärtskompatibel. Bestehender Code funktioniert weiterhin: | ||
|
|
||
| ```csharp | ||
| // Alter Code funktioniert weiterhin | ||
| var engine = new TemplateEngine(dataModel, template); | ||
| string result = engine.CreateStringFromTemplate(); | ||
| ``` | ||
|
|
||
| Neue Features können optional genutzt werden: | ||
|
|
||
| ```csharp | ||
| // Neuer Code mit Razor | ||
| var razorEngine = new RazorTemplateEngine<MyModel>(dataModel, razorTemplate); | ||
| string result = razorEngine.CreateStringFromTemplate(); | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 🐛 Bekannte Einschränkungen | ||
|
|
||
| 1. **Collections nicht unterstützt** in der einfachen TemplateEngine | ||
| - Workaround: Verwenden Sie RazorTemplateEngine für Listen und Arrays | ||
|
|
||
| 2. **Nur parameterlose Methoden** werden unterstützt | ||
| - Zukünftige Versionen könnten Methoden mit Parametern unterstützen | ||
|
|
||
| 3. **XML-Dokumentations-Warnung** bei `LoadTemplateFromFile` | ||
| - Wird in der nächsten Version behoben | ||
|
|
||
| --- | ||
|
|
||
| ## 🔗 Links und Ressourcen | ||
|
|
||
| - **NuGet Package:** https://www.nuget.org/packages/MbSoftLab.TemplateEngine.Core/ | ||
| - **GitHub Repository:** https://github.com/mbsoftlab/MbSoftLab.TemplateEngine.Core | ||
| - **Issues:** https://github.com/mbsoftlab/MbSoftLab.TemplateEngine.Core/issues | ||
| - **Dokumentation:** Siehe `/docs` Verzeichnis | ||
|
|
||
| --- | ||
|
|
||
| ## 🙏 Danksagung | ||
|
|
||
| Danke an alle Mitwirkenden und Nutzer für ihr Feedback und ihre Unterstützung bei der Weiterentwicklung dieses Projekts. | ||
|
|
||
| --- | ||
|
|
||
| **Commit-Referenz für diese Release Notes:** 5c37e68 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Modernisiere das Readme
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README.md wurde modernisiert mit:
(Commit: 9543aa2)