From 86412c2bfa950d0abf9fdb174bbebcc03db12a40 Mon Sep 17 00:00:00 2001 From: Patrick Kurmann Date: Fri, 26 Apr 2024 08:28:09 +0200 Subject: [PATCH 01/15] created service repo template from copied class lib repo template --- .../.devcontainer/devcontainer.json | 11 + .../.github/release-drafter-config.yml | 39 ++ .../.github/workflows/draft_release.yml | 45 ++ .../.github/workflows/publish_package.yml | 101 +++++ templates/services-repo/.gitignore | 416 ++++++++++++++++++ .../.template.config/template.json | 53 +++ templates/services-repo/LICENSE | 201 +++++++++ templates/services-repo/PackageIcon.png | Bin 0 -> 11239 bytes templates/services-repo/README.md | 31 ++ .../src/Entities/Entities.csproj | 68 +++ .../services-repo/src/Entities/SampleClass.cs | 10 + templates/services-repo/src/ProjectName.sln | 28 ++ .../services-repo/src/Tests/GlobalUsings.cs | 1 + .../src/Tests/SampleClassTest.cs | 28 ++ .../services-repo/src/Tests/Tests.csproj | 24 + 15 files changed, 1056 insertions(+) create mode 100644 templates/services-repo/.devcontainer/devcontainer.json create mode 100644 templates/services-repo/.github/release-drafter-config.yml create mode 100644 templates/services-repo/.github/workflows/draft_release.yml create mode 100644 templates/services-repo/.github/workflows/publish_package.yml create mode 100644 templates/services-repo/.gitignore create mode 100644 templates/services-repo/.template.config/template.json create mode 100644 templates/services-repo/LICENSE create mode 100644 templates/services-repo/PackageIcon.png create mode 100644 templates/services-repo/README.md create mode 100644 templates/services-repo/src/Entities/Entities.csproj create mode 100644 templates/services-repo/src/Entities/SampleClass.cs create mode 100644 templates/services-repo/src/ProjectName.sln create mode 100644 templates/services-repo/src/Tests/GlobalUsings.cs create mode 100644 templates/services-repo/src/Tests/SampleClassTest.cs create mode 100644 templates/services-repo/src/Tests/Tests.csproj diff --git a/templates/services-repo/.devcontainer/devcontainer.json b/templates/services-repo/.devcontainer/devcontainer.json new file mode 100644 index 0000000..cacce45 --- /dev/null +++ b/templates/services-repo/.devcontainer/devcontainer.json @@ -0,0 +1,11 @@ +{ + "customizations": { + "vscode": { + "extensions": [ + "GitHub.copilot", + "GitHub.vscode-github-actions", + "ms-dotnettools.csdevkit" + ] + } + } +} \ No newline at end of file diff --git a/templates/services-repo/.github/release-drafter-config.yml b/templates/services-repo/.github/release-drafter-config.yml new file mode 100644 index 0000000..38addb3 --- /dev/null +++ b/templates/services-repo/.github/release-drafter-config.yml @@ -0,0 +1,39 @@ +# Konfigurationsdatei für das Release-Drafter-Tool. +# release-drafter-config.yml + +# Definiert die Vorlage für den Namen des Releases. +name-template: 'v$RESOLVED_VERSION' # Automatisch erhöhte Versionsnummer + +# Definiert die Vorlage für den Namen des Release-Tags. +tag-template: 'v$RESOLVED_VERSION' # Automatisch erhöhte Versionsnummer + +# Kategorien für das Changelog, identifiziert durch Labels auf Pull Requests. +categories: + - title: 'Features' + labels: + - 'enhancement' + - title: 'Bug Fixes' + labels: + - 'bug' + - title: 'Dokumentation' + labels: + - 'documentation' + +# Layout des Changelogs, formatiert nach den Änderungen in den Pull Requests. +template: | + ## Änderungen + $CHANGES + +# Version-Resolver bestimmt die Art der Versionserhöhung basierend auf den PR Labels. +version-resolver: + major: + labels: + - 'breaking' + minor: + labels: + - 'enhancement' + patch: + labels: + - 'bug' + - 'documentation' + default: minor diff --git a/templates/services-repo/.github/workflows/draft_release.yml b/templates/services-repo/.github/workflows/draft_release.yml new file mode 100644 index 0000000..ed29a85 --- /dev/null +++ b/templates/services-repo/.github/workflows/draft_release.yml @@ -0,0 +1,45 @@ +name: Draft Release + +on: + push: + branches: + - '**' + workflow_dispatch: + +permissions: + contents: write + pull-requests: read + +jobs: + build_and_test: + runs-on: ubuntu-latest + + env: + CSPROJ_FILE: src/ProjectName/ProjectName.csproj + DOTNET_VERSION: '8.0.x' + + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Install dependencies + run: dotnet restore ${{ env.CSPROJ_FILE }} + + - name: Test + run: dotnet test ${{ env.CSPROJ_FILE }} + + release_draft: + runs-on: ubuntu-latest + needs: build_and_test + steps: + - uses: actions/checkout@v4 + - name: Run Release Drafter + uses: release-drafter/release-drafter@v6 + with: + config-name: 'release-drafter-config.yml' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/templates/services-repo/.github/workflows/publish_package.yml b/templates/services-repo/.github/workflows/publish_package.yml new file mode 100644 index 0000000..3e83cc1 --- /dev/null +++ b/templates/services-repo/.github/workflows/publish_package.yml @@ -0,0 +1,101 @@ +name: Publish NuGet Package on Release + +on: + release: + types: [published, prereleased] + workflow_dispatch: + +permissions: + contents: write + packages: write + pull-requests: read + +env: + CSPROJ_FILE: src/ProjectName/ProjectName.csproj + DOTNET_VERSION: '8.0.x' + +jobs: + get_release_or_prerelease: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Get latest release or prerelease + id: get_release_or_prerelease + run: | + RELEASES_JSON=$(gh release list --json tagName,name,isPrerelease --exclude-drafts) + LATEST_RELEASE_OR_PRERELEASE_JSON=$(echo "$RELEASES_JSON" | jq -r '.[0]') + + RELEASE_TAG_NAME=$(echo "$LATEST_RELEASE_OR_PRERELEASE_JSON" | jq -r '.tagName') + RELEASE_NAME=$(echo "$LATEST_RELEASE_OR_PRERELEASE_JSON" | jq -r '.name') + RELEASE_IS_PRERELEASE=$(echo "$LATEST_RELEASE_OR_PRERELEASE_JSON" | jq -r '.isPrerelease') + RELEASE_VERSION="${RELEASE_TAG_NAME#"v"}" + + REPO_URL="https://github.com/${GITHUB_REPOSITORY}" + RELEASE_URL="${REPO_URL}/releases/tag/${RELEASE_TAG_NAME}" + + echo "release_version=$RELEASE_VERSION" >> "$GITHUB_OUTPUT" + echo "release_tag_name=$RELEASE_TAG_NAME" >> "$GITHUB_OUTPUT" + echo "release_url=$RELEASE_URL" >> "$GITHUB_OUTPUT" + echo "release_is_prerelease=$RELEASE_IS_PRERELEASE" >> "$GITHUB_OUTPUT" + + echo "Found latest $(if [ "$RELEASE_IS_PRERELEASE" = "true" ]; then echo "prerelease"; else echo "release"; fi): $RELEASE_TAG_NAME" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + outputs: + release_version: ${{ steps.get_release_or_prerelease.outputs.release_version }} + release_tag_name: ${{ steps.get_release_or_prerelease.outputs.release_tag_name }} + release_url: ${{ steps.get_release_or_prerelease.outputs.release_url }} + release_is_prerelease: ${{ steps.get_release_or_prerelease.outputs.release_is_prerelease }} + + build_and_publish: + needs: get_release_or_prerelease + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Restore dependencies + run: dotnet restore ${{ env.CSPROJ_FILE }} + + - name: Build + run: dotnet build ${{ env.CSPROJ_FILE }} --no-restore --configuration Release + + - name: Pack + run: | + echo "Using version ${{ needs.get_release_or_prerelease.outputs.release_version }} from setup job." + dotnet pack ${{ env.CSPROJ_FILE }} --no-build --configuration Release \ + -p:PackageVersion=${{ needs.get_release_or_prerelease.outputs.release_version }} \ + -p:PackageReleaseNotes=${{ needs.get_release_or_prerelease.outputs.release_url }} \ + -p:PackageProjectUrl="https://github.com/${{ github.repository }}" \ + -p:RepositoryUrl="https://github.com/${{ github.repository }}.git" \ + -p:RepositoryType="git" \ + --include-symbols -p:SymbolPackageFormat=snupkg \ + -o nupkgs + shell: bash + + - name: List output files + run: | + echo "Listing built packages in nupkgs directory:" + ls nupkgs/ + shell: bash + + - name: Push NuGet Package + run: | + cd nupkgs + dotnet nuget push "*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate + shell: pwsh + + - name: Push to GitHub Packages + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + cd nupkgs + dotnet nuget push "*.nupkg" --api-key $env:GITHUB_TOKEN --source "https://nuget.pkg.github.com/${{ github.repository_owner }}" --skip-duplicate + shell: pwsh + + diff --git a/templates/services-repo/.gitignore b/templates/services-repo/.gitignore new file mode 100644 index 0000000..df82eb7 --- /dev/null +++ b/templates/services-repo/.gitignore @@ -0,0 +1,416 @@ +# MacOS files +.DS_Store + +# Created by https://www.toptal.com/developers/gitignore/api/visualstudio,blazor,azurefunctions +# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudio,blazor,azurefunctions + +### AzureFunctions ### +# Azure Functions localsettings file +local.settings.json + +### GitHub Codespaces ### +## Ignore mono directory +.mono + +### VisualStudio ### +## 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 + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# 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.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# 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 +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.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_* +.*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 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files + +# 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 + +# 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 +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml + +### VisualStudio Patch ### +# Additional files built by Visual Studio + +# End of https://www.toptal.com/developers/gitignore/api/visualstudio,blazor,azurefunctions diff --git a/templates/services-repo/.template.config/template.json b/templates/services-repo/.template.config/template.json new file mode 100644 index 0000000..73c7292 --- /dev/null +++ b/templates/services-repo/.template.config/template.json @@ -0,0 +1,53 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Patrick Kurmann", + "classifications": [ + "Kurmann", + "GitHub", + "Repository", + "Entities" + ], + "identity": "Kurmann.GitHub.Repository.Entities", + "name": "Kurmann Entities GitHub Repository", + "shortName": "entities-repo", + "sourceName": "ProjectName", + "description": "GitHub repository template containing .NET entities class library, gitignore, and GitHub Actions for NuGet package publishing.", + "tags": { + "language": "C#", + "type": "solution" + }, + "preferNameDirectory": true, + "sources": [ + { + "modifiers": [ + { + "exclude": [ + ".vs/**", + ".template_config/**", + "**/bin/**", + "**/obj/**", + "/bin/**", + "/obj/**", + "/TestResults/**", + ".git/**", + "nuget.csproj" + ] + } + ] + } + ], + "symbols": { + "namespace": { + "type": "parameter", + "description": "The root namespace for the project e.g 'Kurmann.Videoschnitt'", + "defaultValue": "Kurmann", + "replaces": "NamespacePlaceholder" + }, + "description": { + "type": "parameter", + "description": "The project short description.", + "defaultValue": "", + "replaces": "ProjectDescription" + } + } +} \ No newline at end of file diff --git a/templates/services-repo/LICENSE b/templates/services-repo/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/templates/services-repo/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/templates/services-repo/PackageIcon.png b/templates/services-repo/PackageIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..85e474f3d5433c0067d42e57ac2e84d9dcbc1615 GIT binary patch literal 11239 zcmbVyWmH^C)9wrogL`lZ!2%2r90qrH_uw+PyE}y7F2RBmEWsf_a3{D1cZXn?ob%d! z*Z2LncdymEYF9l^RabZKwK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Q7Q`hQ|Ep?ueTS%bmWqD?G+Y)>|kj_LTpI){2Qm@wIDSy^;-sfZ3BSAx_ zOA-EzqL98?NDwd!o&+iU(Bvi>JZIX@gw+*=j317Tnzg+sfu+>ky&LGmqdJBhKC>h^pF+2|+N~?sj zx~(A>{c-UCUCh6M_}kGnfsR9)Oj%AZR0;qk5~uZRu=GdYwbvHmphKmM-y z<}v5y3olp#6(eo*`}YE~R + + + Dependency + net8.0 + enable + enable + + NamespacePlaceholder.ProjectName + NamespacePlaceholder.ProjectName + NamespacePlaceholder.ProjectName + + + Kurmann;Entities + + + + git + + + ProjectDescription + + + 0.1.0 + + + Siehe README.md für Details. + + + README.md + + + LICENSE + + + PackageIcon.png + + + true + true + content + + + true + snupkg + true + + + + + + + + + + + diff --git a/templates/services-repo/src/Entities/SampleClass.cs b/templates/services-repo/src/Entities/SampleClass.cs new file mode 100644 index 0000000..849b06e --- /dev/null +++ b/templates/services-repo/src/Entities/SampleClass.cs @@ -0,0 +1,10 @@ +namespace NamespacePlaceholder.ProjectName; + +public class SampleClass +{ + public required string Id { get; set; } + + public required string LastName { get; set; } + + public string? FirstName { get; set; } +} \ No newline at end of file diff --git a/templates/services-repo/src/ProjectName.sln b/templates/services-repo/src/ProjectName.sln new file mode 100644 index 0000000..525c889 --- /dev/null +++ b/templates/services-repo/src/ProjectName.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Entities", "Entities\Entities.csproj", "{8EC04DD7-2E9C-4570-A602-A1CCA65FEA88}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{E90F92D0-1C28-4D8B-BFA7-BDE906448F64}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8EC04DD7-2E9C-4570-A602-A1CCA65FEA88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8EC04DD7-2E9C-4570-A602-A1CCA65FEA88}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8EC04DD7-2E9C-4570-A602-A1CCA65FEA88}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8EC04DD7-2E9C-4570-A602-A1CCA65FEA88}.Release|Any CPU.Build.0 = Release|Any CPU + {E90F92D0-1C28-4D8B-BFA7-BDE906448F64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E90F92D0-1C28-4D8B-BFA7-BDE906448F64}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E90F92D0-1C28-4D8B-BFA7-BDE906448F64}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E90F92D0-1C28-4D8B-BFA7-BDE906448F64}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/templates/services-repo/src/Tests/GlobalUsings.cs b/templates/services-repo/src/Tests/GlobalUsings.cs new file mode 100644 index 0000000..ab67c7e --- /dev/null +++ b/templates/services-repo/src/Tests/GlobalUsings.cs @@ -0,0 +1 @@ +global using Microsoft.VisualStudio.TestTools.UnitTesting; \ No newline at end of file diff --git a/templates/services-repo/src/Tests/SampleClassTest.cs b/templates/services-repo/src/Tests/SampleClassTest.cs new file mode 100644 index 0000000..a6d2e94 --- /dev/null +++ b/templates/services-repo/src/Tests/SampleClassTest.cs @@ -0,0 +1,28 @@ +namespace NamespacePlaceholder.ProjectName.Tests; + +[TestClass] +public class SampleClassTest +{ + [TestMethod] + public void CanCreateInstance() + { + // Arrange + var id = "1"; + var LastName = "Kurmann"; + var FirstName = "Patrick"; + + // Act + var entity = new SampleClass + { + Id = id, + LastName = LastName, + FirstName = FirstName + }; + + // Assert + Assert.IsNotNull(entity); + Assert.AreEqual(id, entity.Id); + Assert.AreEqual(LastName, entity.LastName); + Assert.AreEqual(FirstName, entity.FirstName); + } +} \ No newline at end of file diff --git a/templates/services-repo/src/Tests/Tests.csproj b/templates/services-repo/src/Tests/Tests.csproj new file mode 100644 index 0000000..ad3cc58 --- /dev/null +++ b/templates/services-repo/src/Tests/Tests.csproj @@ -0,0 +1,24 @@ + + + + net8.0 + enable + enable + false + true + NamespacePlaceholder.ProjectName.Tests + NamespacePlaceholder.ProjectName.Tests + + + + + + + + + + + + + + From a89f6390231519e223a67b8f4c467d1268cbf93d Mon Sep 17 00:00:00 2001 From: Patrick Kurmann Date: Fri, 26 Apr 2024 08:33:01 +0200 Subject: [PATCH 02/15] added cs files --- .../.template.config/template.json | 10 +-- .../src/Application/Application.csproj | 24 +++++++ .../services-repo/src/Application/Program.cs | 27 ++++++++ .../src/Entities/Entities.csproj | 68 ------------------- .../services-repo/src/Entities/SampleClass.cs | 10 --- .../src/Module/Commands/ICommand.cs | 8 +++ .../src/Module/Commands/SampleModule.cs | 20 ++++++ .../services-repo/src/Module/Module.csproj | 60 ++++++++++++++++ .../src/Module/ModuleSettings.cs | 8 +++ .../src/Module/Queries/IQueryService.cs | 8 +++ .../src/Module/Queries/SampleQuery.cs | 20 ++++++ .../src/Module/ServiceCollection.cs | 21 ++++++ .../Module/Services/SampleHostedService.cs | 50 ++++++++++++++ templates/services-repo/src/ModuleName.sln | 28 ++++++++ templates/services-repo/src/ProjectName.sln | 28 -------- .../services-repo/src/Tests/GlobalUsings.cs | 1 - .../src/Tests/SampleClassTest.cs | 28 -------- .../services-repo/src/Tests/Tests.csproj | 24 ------- 18 files changed, 279 insertions(+), 164 deletions(-) create mode 100644 templates/services-repo/src/Application/Application.csproj create mode 100644 templates/services-repo/src/Application/Program.cs delete mode 100644 templates/services-repo/src/Entities/Entities.csproj delete mode 100644 templates/services-repo/src/Entities/SampleClass.cs create mode 100644 templates/services-repo/src/Module/Commands/ICommand.cs create mode 100644 templates/services-repo/src/Module/Commands/SampleModule.cs create mode 100644 templates/services-repo/src/Module/Module.csproj create mode 100644 templates/services-repo/src/Module/ModuleSettings.cs create mode 100644 templates/services-repo/src/Module/Queries/IQueryService.cs create mode 100644 templates/services-repo/src/Module/Queries/SampleQuery.cs create mode 100644 templates/services-repo/src/Module/ServiceCollection.cs create mode 100644 templates/services-repo/src/Module/Services/SampleHostedService.cs create mode 100644 templates/services-repo/src/ModuleName.sln delete mode 100644 templates/services-repo/src/ProjectName.sln delete mode 100644 templates/services-repo/src/Tests/GlobalUsings.cs delete mode 100644 templates/services-repo/src/Tests/SampleClassTest.cs delete mode 100644 templates/services-repo/src/Tests/Tests.csproj diff --git a/templates/services-repo/.template.config/template.json b/templates/services-repo/.template.config/template.json index 73c7292..a2e1e5f 100644 --- a/templates/services-repo/.template.config/template.json +++ b/templates/services-repo/.template.config/template.json @@ -5,13 +5,13 @@ "Kurmann", "GitHub", "Repository", - "Entities" + "Services" ], - "identity": "Kurmann.GitHub.Repository.Entities", - "name": "Kurmann Entities GitHub Repository", - "shortName": "entities-repo", + "identity": "Kurmann.GitHub.Repository.Services", + "name": "Kurmann Services GitHub Repository", + "shortName": "classlib-repo", "sourceName": "ProjectName", - "description": "GitHub repository template containing .NET entities class library, gitignore, and GitHub Actions for NuGet package publishing.", + "description": "GitHub repository template containing .NET service classlib with integration test application, gitignore, and GitHub Actions for NuGet package publishing.", "tags": { "language": "C#", "type": "solution" diff --git a/templates/services-repo/src/Application/Application.csproj b/templates/services-repo/src/Application/Application.csproj new file mode 100644 index 0000000..dae88f1 --- /dev/null +++ b/templates/services-repo/src/Application/Application.csproj @@ -0,0 +1,24 @@ + + + + Exe + Dependency + net8.0 + enable + enable + Kurmann.Videoschnitt.ModuleName.Application. + Kurmann.Videoschnitt.ModuleName.Application + false + 1.0.0 + + + + + + + + + + + + diff --git a/templates/services-repo/src/Application/Program.cs b/templates/services-repo/src/Application/Program.cs new file mode 100644 index 0000000..4d09ee2 --- /dev/null +++ b/templates/services-repo/src/Application/Program.cs @@ -0,0 +1,27 @@ +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; + +namespace Kurmann.Videoschnitt.ModuleName.Application; + +internal class Program +{ + static void Main(string[] args) => CreateHostBuilder(args).Build().Run(); + + public static IHostBuilder CreateHostBuilder(string[] args) + { + return Host.CreateDefaultBuilder(args) + .ConfigureAppConfiguration((hostingContext, config) => + { + if (Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") == Environments.Development) + { + // execute "dotnet user-secrets init" in the project folder to create the secrets.json file + // add specific secrets with "dotnet user-secrets set "Kurmann:Videoschnitt:MikaModule:SampleSetting" "Secret Value"" + config.AddUserSecrets(); + } + }) + .ConfigureServices((hostContext, services) => + { + services.AddModuleName(hostContext.Configuration); + }); + } +} diff --git a/templates/services-repo/src/Entities/Entities.csproj b/templates/services-repo/src/Entities/Entities.csproj deleted file mode 100644 index 5b49ef6..0000000 --- a/templates/services-repo/src/Entities/Entities.csproj +++ /dev/null @@ -1,68 +0,0 @@ - - - - Dependency - net8.0 - enable - enable - - NamespacePlaceholder.ProjectName - NamespacePlaceholder.ProjectName - NamespacePlaceholder.ProjectName - - - Kurmann;Entities - - - - git - - - ProjectDescription - - - 0.1.0 - - - Siehe README.md für Details. - - - README.md - - - LICENSE - - - PackageIcon.png - - - true - true - content - - - true - snupkg - true - - - - - - - - - - - diff --git a/templates/services-repo/src/Entities/SampleClass.cs b/templates/services-repo/src/Entities/SampleClass.cs deleted file mode 100644 index 849b06e..0000000 --- a/templates/services-repo/src/Entities/SampleClass.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace NamespacePlaceholder.ProjectName; - -public class SampleClass -{ - public required string Id { get; set; } - - public required string LastName { get; set; } - - public string? FirstName { get; set; } -} \ No newline at end of file diff --git a/templates/services-repo/src/Module/Commands/ICommand.cs b/templates/services-repo/src/Module/Commands/ICommand.cs new file mode 100644 index 0000000..b973b31 --- /dev/null +++ b/templates/services-repo/src/Module/Commands/ICommand.cs @@ -0,0 +1,8 @@ +using CSharpFunctionalExtensions; + +namespace Kurmann.Videoschnitt.ModuleName.Commands; + +public interface ICommand +{ + Result Execute(); +} \ No newline at end of file diff --git a/templates/services-repo/src/Module/Commands/SampleModule.cs b/templates/services-repo/src/Module/Commands/SampleModule.cs new file mode 100644 index 0000000..afe71ac --- /dev/null +++ b/templates/services-repo/src/Module/Commands/SampleModule.cs @@ -0,0 +1,20 @@ +using CSharpFunctionalExtensions; + +namespace Kurmann.Videoschnitt.ModuleName.Commands; + +public class SampleCommand(string? sampleParameter) : ICommand +{ + private readonly string? sampleParameter = sampleParameter; + + public Result Execute() + { + if (string.IsNullOrWhiteSpace(sampleParameter)) + return Result.Failure("Sample parameter cannot be empty"); + + var commandResult = new SampleCommandResult(sampleParameter); + + return Result.Success(commandResult); + } +} + +public record SampleCommandResult(string Result); \ No newline at end of file diff --git a/templates/services-repo/src/Module/Module.csproj b/templates/services-repo/src/Module/Module.csproj new file mode 100644 index 0000000..9e04eac --- /dev/null +++ b/templates/services-repo/src/Module/Module.csproj @@ -0,0 +1,60 @@ + + + + + net8.0 + enable + enable + + Kurmann.Videoschnitt.ModuleName + Kurmann.Videoschnitt.ModuleName + Kurmann.Videoschnitt.ModuleName + + + Videoschnitt + + + + git + + + + + + 0.1.0-alpha + + + + + + + + README.md + + + LICENSE + + + PackageIcon.png + + + true + true + content + + + true + snupkg + true + + + + + + + + + + + diff --git a/templates/services-repo/src/Module/ModuleSettings.cs b/templates/services-repo/src/Module/ModuleSettings.cs new file mode 100644 index 0000000..b82dc9a --- /dev/null +++ b/templates/services-repo/src/Module/ModuleSettings.cs @@ -0,0 +1,8 @@ +namespace Kurmann.Videoschnitt.ModuleName; + +public class ModuleSettings +{ + public const string SectionName = "Kurmann.Videoschnitt.ModuleName"; + + public string SampleSetting { get; set; } = "Sample Value"; +} \ No newline at end of file diff --git a/templates/services-repo/src/Module/Queries/IQueryService.cs b/templates/services-repo/src/Module/Queries/IQueryService.cs new file mode 100644 index 0000000..b9bc12b --- /dev/null +++ b/templates/services-repo/src/Module/Queries/IQueryService.cs @@ -0,0 +1,8 @@ +using CSharpFunctionalExtensions; + +namespace Kurmann.Videoschnitt.ModuleName.Queries; + +public interface IQueryService +{ + public Result Execute(); +} \ No newline at end of file diff --git a/templates/services-repo/src/Module/Queries/SampleQuery.cs b/templates/services-repo/src/Module/Queries/SampleQuery.cs new file mode 100644 index 0000000..fa49f3c --- /dev/null +++ b/templates/services-repo/src/Module/Queries/SampleQuery.cs @@ -0,0 +1,20 @@ +using CSharpFunctionalExtensions; + +namespace Kurmann.Videoschnitt.ModuleName.Queries; + +public class SampleQuery(string? sampleParameter) : IQueryService +{ + private readonly string? sampleParameter = sampleParameter; + + public Result Execute() + { + if (string.IsNullOrWhiteSpace(sampleParameter)) + return Result.Failure("Sample parameter cannot be empty"); + + var sampleEntity = new SampleQueryResult(sampleParameter); + + return Result.Success(sampleEntity); + } +} + +public record SampleQueryResult(string Result); \ No newline at end of file diff --git a/templates/services-repo/src/Module/ServiceCollection.cs b/templates/services-repo/src/Module/ServiceCollection.cs new file mode 100644 index 0000000..4bfa8bb --- /dev/null +++ b/templates/services-repo/src/Module/ServiceCollection.cs @@ -0,0 +1,21 @@ +using Microsoft.Extensions.DependencyInjection; +using Kurmann.Videoschnitt.ModuleName.Services; +using Microsoft.Extensions.Configuration; + +namespace Kurmann.Videoschnitt.ModuleName; + +public static class ServiceCollectionExtensions +{ + public static IServiceCollection AddModuleName( + this IServiceCollection services, + IConfiguration configuration) + { + // Bindet Root-Konfigurationswerte an ModuleSettings + services.Configure(configuration.GetSection(ModuleSettings.SectionName)); + + // Dienste hinzufügen + services.AddHostedService(); + + return services; + } +} diff --git a/templates/services-repo/src/Module/Services/SampleHostedService.cs b/templates/services-repo/src/Module/Services/SampleHostedService.cs new file mode 100644 index 0000000..dde0bd6 --- /dev/null +++ b/templates/services-repo/src/Module/Services/SampleHostedService.cs @@ -0,0 +1,50 @@ +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; + +namespace Kurmann.Videoschnitt.ModuleName.Services; + +public class SampleHostedService(ILogger logger, IOptionsSnapshot options) : IHostedService, IDisposable +{ + private readonly ILogger _logger = logger; + private readonly ModuleSettings _options = options.Value; + private Timer? _timer; + + public Task StartAsync(CancellationToken cancellationToken) + { + _logger.LogInformation("Sample Service is starting."); + + if (string.IsNullOrEmpty(_options.SampleSetting)) + { + _logger.LogWarning("SampleSetting is not set in configuration."); + } + else + { + _logger.LogInformation("SampleSetting has been successfully loaded from configuration"); + } + + _timer = new Timer(DoWork, null, TimeSpan.Zero, TimeSpan.FromSeconds(5)); + + return Task.CompletedTask; + } + + private void DoWork(object? state) + { + _logger.LogInformation("Sample Service is working. Current time: {time}", DateTimeOffset.Now); + } + + public Task StopAsync(CancellationToken cancellationToken) + { + _logger.LogInformation("Sample Service is stopping."); + + _timer?.Change(Timeout.Infinite, 0); + + return Task.CompletedTask; + } + + public void Dispose() + { + _timer?.Dispose(); + GC.SuppressFinalize(this); + } +} \ No newline at end of file diff --git a/templates/services-repo/src/ModuleName.sln b/templates/services-repo/src/ModuleName.sln new file mode 100644 index 0000000..a40443e --- /dev/null +++ b/templates/services-repo/src/ModuleName.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Application", "Application\Application.csproj", "{D24DEA42-1B81-41AA-8C97-5EB79278507C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Module", "Module\Module.csproj", "{C90E826D-0F3D-47DD-B33B-B52CA29FA3A7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D24DEA42-1B81-41AA-8C97-5EB79278507C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D24DEA42-1B81-41AA-8C97-5EB79278507C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D24DEA42-1B81-41AA-8C97-5EB79278507C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D24DEA42-1B81-41AA-8C97-5EB79278507C}.Release|Any CPU.Build.0 = Release|Any CPU + {C90E826D-0F3D-47DD-B33B-B52CA29FA3A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C90E826D-0F3D-47DD-B33B-B52CA29FA3A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C90E826D-0F3D-47DD-B33B-B52CA29FA3A7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C90E826D-0F3D-47DD-B33B-B52CA29FA3A7}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/templates/services-repo/src/ProjectName.sln b/templates/services-repo/src/ProjectName.sln deleted file mode 100644 index 525c889..0000000 --- a/templates/services-repo/src/ProjectName.sln +++ /dev/null @@ -1,28 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31903.59 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Entities", "Entities\Entities.csproj", "{8EC04DD7-2E9C-4570-A602-A1CCA65FEA88}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{E90F92D0-1C28-4D8B-BFA7-BDE906448F64}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8EC04DD7-2E9C-4570-A602-A1CCA65FEA88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8EC04DD7-2E9C-4570-A602-A1CCA65FEA88}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8EC04DD7-2E9C-4570-A602-A1CCA65FEA88}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8EC04DD7-2E9C-4570-A602-A1CCA65FEA88}.Release|Any CPU.Build.0 = Release|Any CPU - {E90F92D0-1C28-4D8B-BFA7-BDE906448F64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E90F92D0-1C28-4D8B-BFA7-BDE906448F64}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E90F92D0-1C28-4D8B-BFA7-BDE906448F64}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E90F92D0-1C28-4D8B-BFA7-BDE906448F64}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/templates/services-repo/src/Tests/GlobalUsings.cs b/templates/services-repo/src/Tests/GlobalUsings.cs deleted file mode 100644 index ab67c7e..0000000 --- a/templates/services-repo/src/Tests/GlobalUsings.cs +++ /dev/null @@ -1 +0,0 @@ -global using Microsoft.VisualStudio.TestTools.UnitTesting; \ No newline at end of file diff --git a/templates/services-repo/src/Tests/SampleClassTest.cs b/templates/services-repo/src/Tests/SampleClassTest.cs deleted file mode 100644 index a6d2e94..0000000 --- a/templates/services-repo/src/Tests/SampleClassTest.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace NamespacePlaceholder.ProjectName.Tests; - -[TestClass] -public class SampleClassTest -{ - [TestMethod] - public void CanCreateInstance() - { - // Arrange - var id = "1"; - var LastName = "Kurmann"; - var FirstName = "Patrick"; - - // Act - var entity = new SampleClass - { - Id = id, - LastName = LastName, - FirstName = FirstName - }; - - // Assert - Assert.IsNotNull(entity); - Assert.AreEqual(id, entity.Id); - Assert.AreEqual(LastName, entity.LastName); - Assert.AreEqual(FirstName, entity.FirstName); - } -} \ No newline at end of file diff --git a/templates/services-repo/src/Tests/Tests.csproj b/templates/services-repo/src/Tests/Tests.csproj deleted file mode 100644 index ad3cc58..0000000 --- a/templates/services-repo/src/Tests/Tests.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - net8.0 - enable - enable - false - true - NamespacePlaceholder.ProjectName.Tests - NamespacePlaceholder.ProjectName.Tests - - - - - - - - - - - - - - From c3dbdf02b8685b5c5ad4cd647ab3d1f8b6e87356 Mon Sep 17 00:00:00 2001 From: Patrick Kurmann Date: Fri, 26 Apr 2024 08:37:45 +0200 Subject: [PATCH 03/15] integrate template project name and root namespace --- .../services-repo/src/Application/Application.csproj | 6 +++--- templates/services-repo/src/Application/Program.cs | 4 ++-- templates/services-repo/src/Module/ModuleSettings.cs | 8 -------- .../services-repo/src/{ModuleName.sln => ProjectName.sln} | 2 +- .../src/{Module => ProjectName}/Commands/ICommand.cs | 2 +- .../src/{Module => ProjectName}/Commands/SampleModule.cs | 2 +- .../Module.csproj => ProjectName/ProjectName.csproj} | 6 +++--- .../services-repo/src/ProjectName/ProjectNameSettings.cs | 8 ++++++++ .../src/{Module => ProjectName}/Queries/IQueryService.cs | 2 +- .../src/{Module => ProjectName}/Queries/SampleQuery.cs | 2 +- .../src/{Module => ProjectName}/ServiceCollection.cs | 6 +++--- .../Services/SampleHostedService.cs | 2 +- 12 files changed, 25 insertions(+), 25 deletions(-) delete mode 100644 templates/services-repo/src/Module/ModuleSettings.cs rename templates/services-repo/src/{ModuleName.sln => ProjectName.sln} (88%) rename templates/services-repo/src/{Module => ProjectName}/Commands/ICommand.cs (63%) rename templates/services-repo/src/{Module => ProjectName}/Commands/SampleModule.cs (88%) rename templates/services-repo/src/{Module/Module.csproj => ProjectName/ProjectName.csproj} (90%) create mode 100644 templates/services-repo/src/ProjectName/ProjectNameSettings.cs rename templates/services-repo/src/{Module => ProjectName}/Queries/IQueryService.cs (66%) rename templates/services-repo/src/{Module => ProjectName}/Queries/SampleQuery.cs (91%) rename templates/services-repo/src/{Module => ProjectName}/ServiceCollection.cs (78%) rename templates/services-repo/src/{Module => ProjectName}/Services/SampleHostedService.cs (96%) diff --git a/templates/services-repo/src/Application/Application.csproj b/templates/services-repo/src/Application/Application.csproj index dae88f1..f6d693f 100644 --- a/templates/services-repo/src/Application/Application.csproj +++ b/templates/services-repo/src/Application/Application.csproj @@ -6,8 +6,8 @@ net8.0 enable enable - Kurmann.Videoschnitt.ModuleName.Application. - Kurmann.Videoschnitt.ModuleName.Application + Kurmann.Videoschnitt.ProjectName.Application. + Kurmann.Videoschnitt.ProjectName.Application false 1.0.0 @@ -18,7 +18,7 @@ - + diff --git a/templates/services-repo/src/Application/Program.cs b/templates/services-repo/src/Application/Program.cs index 4d09ee2..58a762d 100644 --- a/templates/services-repo/src/Application/Program.cs +++ b/templates/services-repo/src/Application/Program.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; -namespace Kurmann.Videoschnitt.ModuleName.Application; +namespace Kurmann.Videoschnitt.ProjectName.Application; internal class Program { @@ -21,7 +21,7 @@ public static IHostBuilder CreateHostBuilder(string[] args) }) .ConfigureServices((hostContext, services) => { - services.AddModuleName(hostContext.Configuration); + services.AddProjectName(hostContext.Configuration); }); } } diff --git a/templates/services-repo/src/Module/ModuleSettings.cs b/templates/services-repo/src/Module/ModuleSettings.cs deleted file mode 100644 index b82dc9a..0000000 --- a/templates/services-repo/src/Module/ModuleSettings.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Kurmann.Videoschnitt.ModuleName; - -public class ModuleSettings -{ - public const string SectionName = "Kurmann.Videoschnitt.ModuleName"; - - public string SampleSetting { get; set; } = "Sample Value"; -} \ No newline at end of file diff --git a/templates/services-repo/src/ModuleName.sln b/templates/services-repo/src/ProjectName.sln similarity index 88% rename from templates/services-repo/src/ModuleName.sln rename to templates/services-repo/src/ProjectName.sln index a40443e..1c4b993 100644 --- a/templates/services-repo/src/ModuleName.sln +++ b/templates/services-repo/src/ProjectName.sln @@ -5,7 +5,7 @@ VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Application", "Application\Application.csproj", "{D24DEA42-1B81-41AA-8C97-5EB79278507C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Module", "Module\Module.csproj", "{C90E826D-0F3D-47DD-B33B-B52CA29FA3A7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectName", "ProjectName\ProjectName.csproj", "{C90E826D-0F3D-47DD-B33B-B52CA29FA3A7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/templates/services-repo/src/Module/Commands/ICommand.cs b/templates/services-repo/src/ProjectName/Commands/ICommand.cs similarity index 63% rename from templates/services-repo/src/Module/Commands/ICommand.cs rename to templates/services-repo/src/ProjectName/Commands/ICommand.cs index b973b31..a12d9b3 100644 --- a/templates/services-repo/src/Module/Commands/ICommand.cs +++ b/templates/services-repo/src/ProjectName/Commands/ICommand.cs @@ -1,6 +1,6 @@ using CSharpFunctionalExtensions; -namespace Kurmann.Videoschnitt.ModuleName.Commands; +namespace Kurmann.Videoschnitt.ProjectName.Commands; public interface ICommand { diff --git a/templates/services-repo/src/Module/Commands/SampleModule.cs b/templates/services-repo/src/ProjectName/Commands/SampleModule.cs similarity index 88% rename from templates/services-repo/src/Module/Commands/SampleModule.cs rename to templates/services-repo/src/ProjectName/Commands/SampleModule.cs index afe71ac..23148e2 100644 --- a/templates/services-repo/src/Module/Commands/SampleModule.cs +++ b/templates/services-repo/src/ProjectName/Commands/SampleModule.cs @@ -1,6 +1,6 @@ using CSharpFunctionalExtensions; -namespace Kurmann.Videoschnitt.ModuleName.Commands; +namespace Kurmann.Videoschnitt.ProjectName.Commands; public class SampleCommand(string? sampleParameter) : ICommand { diff --git a/templates/services-repo/src/Module/Module.csproj b/templates/services-repo/src/ProjectName/ProjectName.csproj similarity index 90% rename from templates/services-repo/src/Module/Module.csproj rename to templates/services-repo/src/ProjectName/ProjectName.csproj index 9e04eac..14a67dc 100644 --- a/templates/services-repo/src/Module/Module.csproj +++ b/templates/services-repo/src/ProjectName/ProjectName.csproj @@ -6,9 +6,9 @@ enable enable - Kurmann.Videoschnitt.ModuleName - Kurmann.Videoschnitt.ModuleName - Kurmann.Videoschnitt.ModuleName + Kurmann.Videoschnitt.ProjectName + Kurmann.Videoschnitt.ProjectName + Kurmann.Videoschnitt.ProjectName Videoschnitt diff --git a/templates/services-repo/src/ProjectName/ProjectNameSettings.cs b/templates/services-repo/src/ProjectName/ProjectNameSettings.cs new file mode 100644 index 0000000..11167d4 --- /dev/null +++ b/templates/services-repo/src/ProjectName/ProjectNameSettings.cs @@ -0,0 +1,8 @@ +namespace Kurmann.Videoschnitt.ProjectName; + +public class ProjectNameSettings +{ + public const string SectionName = "Kurmann.Videoschnitt.ProjectName"; + + public string SampleSetting { get; set; } = "Sample Value"; +} \ No newline at end of file diff --git a/templates/services-repo/src/Module/Queries/IQueryService.cs b/templates/services-repo/src/ProjectName/Queries/IQueryService.cs similarity index 66% rename from templates/services-repo/src/Module/Queries/IQueryService.cs rename to templates/services-repo/src/ProjectName/Queries/IQueryService.cs index b9bc12b..beae821 100644 --- a/templates/services-repo/src/Module/Queries/IQueryService.cs +++ b/templates/services-repo/src/ProjectName/Queries/IQueryService.cs @@ -1,6 +1,6 @@ using CSharpFunctionalExtensions; -namespace Kurmann.Videoschnitt.ModuleName.Queries; +namespace Kurmann.Videoschnitt.ProjectName.Queries; public interface IQueryService { diff --git a/templates/services-repo/src/Module/Queries/SampleQuery.cs b/templates/services-repo/src/ProjectName/Queries/SampleQuery.cs similarity index 91% rename from templates/services-repo/src/Module/Queries/SampleQuery.cs rename to templates/services-repo/src/ProjectName/Queries/SampleQuery.cs index fa49f3c..caf8c1b 100644 --- a/templates/services-repo/src/Module/Queries/SampleQuery.cs +++ b/templates/services-repo/src/ProjectName/Queries/SampleQuery.cs @@ -1,6 +1,6 @@ using CSharpFunctionalExtensions; -namespace Kurmann.Videoschnitt.ModuleName.Queries; +namespace Kurmann.Videoschnitt.ProjectName.Queries; public class SampleQuery(string? sampleParameter) : IQueryService { diff --git a/templates/services-repo/src/Module/ServiceCollection.cs b/templates/services-repo/src/ProjectName/ServiceCollection.cs similarity index 78% rename from templates/services-repo/src/Module/ServiceCollection.cs rename to templates/services-repo/src/ProjectName/ServiceCollection.cs index 4bfa8bb..accaa05 100644 --- a/templates/services-repo/src/Module/ServiceCollection.cs +++ b/templates/services-repo/src/ProjectName/ServiceCollection.cs @@ -1,12 +1,12 @@ using Microsoft.Extensions.DependencyInjection; -using Kurmann.Videoschnitt.ModuleName.Services; using Microsoft.Extensions.Configuration; +using Kurmann.Videoschnitt.ProjectName.Services; -namespace Kurmann.Videoschnitt.ModuleName; +namespace Kurmann.Videoschnitt.ProjectName; public static class ServiceCollectionExtensions { - public static IServiceCollection AddModuleName( + public static IServiceCollection AddProjectName( this IServiceCollection services, IConfiguration configuration) { diff --git a/templates/services-repo/src/Module/Services/SampleHostedService.cs b/templates/services-repo/src/ProjectName/Services/SampleHostedService.cs similarity index 96% rename from templates/services-repo/src/Module/Services/SampleHostedService.cs rename to templates/services-repo/src/ProjectName/Services/SampleHostedService.cs index dde0bd6..0897645 100644 --- a/templates/services-repo/src/Module/Services/SampleHostedService.cs +++ b/templates/services-repo/src/ProjectName/Services/SampleHostedService.cs @@ -2,7 +2,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -namespace Kurmann.Videoschnitt.ModuleName.Services; +namespace Kurmann.Videoschnitt.ProjectName.Services; public class SampleHostedService(ILogger logger, IOptionsSnapshot options) : IHostedService, IDisposable { From 59c2b0628544707e96e717ba42cce9da72b96f04 Mon Sep 17 00:00:00 2001 From: Patrick Kurmann Date: Fri, 26 Apr 2024 08:38:33 +0200 Subject: [PATCH 04/15] Update root namespace and assembly name in Application.csproj --- templates/services-repo/src/Application/Application.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/services-repo/src/Application/Application.csproj b/templates/services-repo/src/Application/Application.csproj index f6d693f..9ae1212 100644 --- a/templates/services-repo/src/Application/Application.csproj +++ b/templates/services-repo/src/Application/Application.csproj @@ -6,8 +6,8 @@ net8.0 enable enable - Kurmann.Videoschnitt.ProjectName.Application. - Kurmann.Videoschnitt.ProjectName.Application + RootNamespace.ProjectName.Application. + RootNamespace.Application false 1.0.0 From a0063dbb5bb87de37139b92dbb0ff9e1c1d010f0 Mon Sep 17 00:00:00 2001 From: Patrick Kurmann Date: Fri, 26 Apr 2024 08:40:25 +0200 Subject: [PATCH 05/15] integrate further --- .../src/Application/Application.csproj | 1 - .../services-repo/src/Application/Program.cs | 2 +- .../src/ProjectName/Commands/ICommand.cs | 2 +- .../src/ProjectName/Commands/SampleModule.cs | 2 +- .../src/ProjectName/ProjectName.csproj | 21 ++++--------------- .../src/ProjectName/ProjectNameSettings.cs | 4 ++-- .../src/ProjectName/Queries/IQueryService.cs | 2 +- .../src/ProjectName/Queries/SampleQuery.cs | 2 +- .../src/ProjectName/ServiceCollection.cs | 4 ++-- .../Services/SampleHostedService.cs | 2 +- 10 files changed, 14 insertions(+), 28 deletions(-) diff --git a/templates/services-repo/src/Application/Application.csproj b/templates/services-repo/src/Application/Application.csproj index 9ae1212..aa5e939 100644 --- a/templates/services-repo/src/Application/Application.csproj +++ b/templates/services-repo/src/Application/Application.csproj @@ -9,7 +9,6 @@ RootNamespace.ProjectName.Application. RootNamespace.Application false - 1.0.0 diff --git a/templates/services-repo/src/Application/Program.cs b/templates/services-repo/src/Application/Program.cs index 58a762d..e9d8ef5 100644 --- a/templates/services-repo/src/Application/Program.cs +++ b/templates/services-repo/src/Application/Program.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; -namespace Kurmann.Videoschnitt.ProjectName.Application; +namespace RootNamespace.ProjectName.Application; internal class Program { diff --git a/templates/services-repo/src/ProjectName/Commands/ICommand.cs b/templates/services-repo/src/ProjectName/Commands/ICommand.cs index a12d9b3..552914f 100644 --- a/templates/services-repo/src/ProjectName/Commands/ICommand.cs +++ b/templates/services-repo/src/ProjectName/Commands/ICommand.cs @@ -1,6 +1,6 @@ using CSharpFunctionalExtensions; -namespace Kurmann.Videoschnitt.ProjectName.Commands; +namespace RootNamespace.ProjectName.Commands; public interface ICommand { diff --git a/templates/services-repo/src/ProjectName/Commands/SampleModule.cs b/templates/services-repo/src/ProjectName/Commands/SampleModule.cs index 23148e2..a670866 100644 --- a/templates/services-repo/src/ProjectName/Commands/SampleModule.cs +++ b/templates/services-repo/src/ProjectName/Commands/SampleModule.cs @@ -1,6 +1,6 @@ using CSharpFunctionalExtensions; -namespace Kurmann.Videoschnitt.ProjectName.Commands; +namespace RootNamespace.ProjectName.Commands; public class SampleCommand(string? sampleParameter) : ICommand { diff --git a/templates/services-repo/src/ProjectName/ProjectName.csproj b/templates/services-repo/src/ProjectName/ProjectName.csproj index 14a67dc..6db529a 100644 --- a/templates/services-repo/src/ProjectName/ProjectName.csproj +++ b/templates/services-repo/src/ProjectName/ProjectName.csproj @@ -6,29 +6,16 @@ enable enable - Kurmann.Videoschnitt.ProjectName - Kurmann.Videoschnitt.ProjectName - Kurmann.Videoschnitt.ProjectName + RootNamespace.ProjectName + RootNamespace.ProjectName + RootNamespace.ProjectName - Videoschnitt - - - - git + RootNamespace - - 0.1.0-alpha - - - - - - README.md diff --git a/templates/services-repo/src/ProjectName/ProjectNameSettings.cs b/templates/services-repo/src/ProjectName/ProjectNameSettings.cs index 11167d4..4c7e4ef 100644 --- a/templates/services-repo/src/ProjectName/ProjectNameSettings.cs +++ b/templates/services-repo/src/ProjectName/ProjectNameSettings.cs @@ -1,8 +1,8 @@ -namespace Kurmann.Videoschnitt.ProjectName; +namespace RootNamespace.ProjectName; public class ProjectNameSettings { - public const string SectionName = "Kurmann.Videoschnitt.ProjectName"; + public const string SectionName = "RootNamespace.ProjectName"; public string SampleSetting { get; set; } = "Sample Value"; } \ No newline at end of file diff --git a/templates/services-repo/src/ProjectName/Queries/IQueryService.cs b/templates/services-repo/src/ProjectName/Queries/IQueryService.cs index beae821..8c0f649 100644 --- a/templates/services-repo/src/ProjectName/Queries/IQueryService.cs +++ b/templates/services-repo/src/ProjectName/Queries/IQueryService.cs @@ -1,6 +1,6 @@ using CSharpFunctionalExtensions; -namespace Kurmann.Videoschnitt.ProjectName.Queries; +namespace RootNamespace.ProjectName.Queries; public interface IQueryService { diff --git a/templates/services-repo/src/ProjectName/Queries/SampleQuery.cs b/templates/services-repo/src/ProjectName/Queries/SampleQuery.cs index caf8c1b..cad595d 100644 --- a/templates/services-repo/src/ProjectName/Queries/SampleQuery.cs +++ b/templates/services-repo/src/ProjectName/Queries/SampleQuery.cs @@ -1,6 +1,6 @@ using CSharpFunctionalExtensions; -namespace Kurmann.Videoschnitt.ProjectName.Queries; +namespace RootNamespace.ProjectName.Queries; public class SampleQuery(string? sampleParameter) : IQueryService { diff --git a/templates/services-repo/src/ProjectName/ServiceCollection.cs b/templates/services-repo/src/ProjectName/ServiceCollection.cs index accaa05..b2f8e26 100644 --- a/templates/services-repo/src/ProjectName/ServiceCollection.cs +++ b/templates/services-repo/src/ProjectName/ServiceCollection.cs @@ -1,8 +1,8 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Configuration; -using Kurmann.Videoschnitt.ProjectName.Services; +using RootNamespace.ProjectName.Services; -namespace Kurmann.Videoschnitt.ProjectName; +namespace RootNamespace.ProjectName; public static class ServiceCollectionExtensions { diff --git a/templates/services-repo/src/ProjectName/Services/SampleHostedService.cs b/templates/services-repo/src/ProjectName/Services/SampleHostedService.cs index 0897645..58fad0f 100644 --- a/templates/services-repo/src/ProjectName/Services/SampleHostedService.cs +++ b/templates/services-repo/src/ProjectName/Services/SampleHostedService.cs @@ -2,7 +2,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -namespace Kurmann.Videoschnitt.ProjectName.Services; +namespace RootNamespace.ProjectName.Services; public class SampleHostedService(ILogger logger, IOptionsSnapshot options) : IHostedService, IDisposable { From ee209d9354d15a8c72a3214707ce798a8b4af4fe Mon Sep 17 00:00:00 2001 From: Patrick Kurmann Date: Fri, 26 Apr 2024 08:42:18 +0200 Subject: [PATCH 06/15] removed properties set by workflow --- .../nuget-classlib/ClassLibrary/ClassLibrary.csproj | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/templates/nuget-classlib/ClassLibrary/ClassLibrary.csproj b/templates/nuget-classlib/ClassLibrary/ClassLibrary.csproj index 13f0347..9ad7372 100644 --- a/templates/nuget-classlib/ClassLibrary/ClassLibrary.csproj +++ b/templates/nuget-classlib/ClassLibrary/ClassLibrary.csproj @@ -11,19 +11,11 @@ Kurmann.ClassLibrary - Videoschnitt - - - - git + RootNamespace - - 0.1.0-alpha - From 8c50f95d9bdc58d699b8d912c7512a1b6e0f219c Mon Sep 17 00:00:00 2001 From: Patrick Kurmann Date: Fri, 26 Apr 2024 08:44:16 +0200 Subject: [PATCH 07/15] removed properties set by workflow --- .../src/Entities/Entities.csproj | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/templates/entities-repo/src/Entities/Entities.csproj b/templates/entities-repo/src/Entities/Entities.csproj index 5b49ef6..f71bc8c 100644 --- a/templates/entities-repo/src/Entities/Entities.csproj +++ b/templates/entities-repo/src/Entities/Entities.csproj @@ -11,32 +11,11 @@ NamespacePlaceholder.ProjectName - Kurmann;Entities - - - - git + RootNamespace ProjectDescription - - 0.1.0 - - - Siehe README.md für Details. - README.md From b661c7ae27266c763d7805fb8aed6aabb08a4b6c Mon Sep 17 00:00:00 2001 From: Patrick Kurmann Date: Fri, 26 Apr 2024 08:48:30 +0200 Subject: [PATCH 08/15] change root namepace to namespace placeholder --- templates/services-repo/src/Application/Application.csproj | 4 ++-- templates/services-repo/src/Application/Program.cs | 2 +- templates/services-repo/src/ProjectName/Commands/ICommand.cs | 2 +- .../services-repo/src/ProjectName/Commands/SampleModule.cs | 2 +- .../services-repo/src/ProjectName/ProjectNameSettings.cs | 4 ++-- .../services-repo/src/ProjectName/Queries/IQueryService.cs | 2 +- .../services-repo/src/ProjectName/Queries/SampleQuery.cs | 2 +- templates/services-repo/src/ProjectName/ServiceCollection.cs | 4 ++-- .../src/ProjectName/Services/SampleHostedService.cs | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/templates/services-repo/src/Application/Application.csproj b/templates/services-repo/src/Application/Application.csproj index aa5e939..7746b03 100644 --- a/templates/services-repo/src/Application/Application.csproj +++ b/templates/services-repo/src/Application/Application.csproj @@ -6,8 +6,8 @@ net8.0 enable enable - RootNamespace.ProjectName.Application. - RootNamespace.Application + NamespacePlaceholder.ProjectName.Application. + NamespacePlaceholder.Application false diff --git a/templates/services-repo/src/Application/Program.cs b/templates/services-repo/src/Application/Program.cs index e9d8ef5..2dd9941 100644 --- a/templates/services-repo/src/Application/Program.cs +++ b/templates/services-repo/src/Application/Program.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; -namespace RootNamespace.ProjectName.Application; +namespace NamespacePlaceholder.ProjectName.Application; internal class Program { diff --git a/templates/services-repo/src/ProjectName/Commands/ICommand.cs b/templates/services-repo/src/ProjectName/Commands/ICommand.cs index 552914f..c03917e 100644 --- a/templates/services-repo/src/ProjectName/Commands/ICommand.cs +++ b/templates/services-repo/src/ProjectName/Commands/ICommand.cs @@ -1,6 +1,6 @@ using CSharpFunctionalExtensions; -namespace RootNamespace.ProjectName.Commands; +namespace NamespacePlaceholder.ProjectName.Commands; public interface ICommand { diff --git a/templates/services-repo/src/ProjectName/Commands/SampleModule.cs b/templates/services-repo/src/ProjectName/Commands/SampleModule.cs index a670866..801032a 100644 --- a/templates/services-repo/src/ProjectName/Commands/SampleModule.cs +++ b/templates/services-repo/src/ProjectName/Commands/SampleModule.cs @@ -1,6 +1,6 @@ using CSharpFunctionalExtensions; -namespace RootNamespace.ProjectName.Commands; +namespace NamespacePlaceholder.ProjectName.Commands; public class SampleCommand(string? sampleParameter) : ICommand { diff --git a/templates/services-repo/src/ProjectName/ProjectNameSettings.cs b/templates/services-repo/src/ProjectName/ProjectNameSettings.cs index 4c7e4ef..482c7e3 100644 --- a/templates/services-repo/src/ProjectName/ProjectNameSettings.cs +++ b/templates/services-repo/src/ProjectName/ProjectNameSettings.cs @@ -1,8 +1,8 @@ -namespace RootNamespace.ProjectName; +namespace NamespacePlaceholder.ProjectName; public class ProjectNameSettings { - public const string SectionName = "RootNamespace.ProjectName"; + public const string SectionName = "NamespacePlaceholder.ProjectName"; public string SampleSetting { get; set; } = "Sample Value"; } \ No newline at end of file diff --git a/templates/services-repo/src/ProjectName/Queries/IQueryService.cs b/templates/services-repo/src/ProjectName/Queries/IQueryService.cs index 8c0f649..5745fad 100644 --- a/templates/services-repo/src/ProjectName/Queries/IQueryService.cs +++ b/templates/services-repo/src/ProjectName/Queries/IQueryService.cs @@ -1,6 +1,6 @@ using CSharpFunctionalExtensions; -namespace RootNamespace.ProjectName.Queries; +namespace NamespacePlaceholder.ProjectName.Queries; public interface IQueryService { diff --git a/templates/services-repo/src/ProjectName/Queries/SampleQuery.cs b/templates/services-repo/src/ProjectName/Queries/SampleQuery.cs index cad595d..4d13b6b 100644 --- a/templates/services-repo/src/ProjectName/Queries/SampleQuery.cs +++ b/templates/services-repo/src/ProjectName/Queries/SampleQuery.cs @@ -1,6 +1,6 @@ using CSharpFunctionalExtensions; -namespace RootNamespace.ProjectName.Queries; +namespace NamespacePlaceholder.ProjectName.Queries; public class SampleQuery(string? sampleParameter) : IQueryService { diff --git a/templates/services-repo/src/ProjectName/ServiceCollection.cs b/templates/services-repo/src/ProjectName/ServiceCollection.cs index b2f8e26..11b6267 100644 --- a/templates/services-repo/src/ProjectName/ServiceCollection.cs +++ b/templates/services-repo/src/ProjectName/ServiceCollection.cs @@ -1,8 +1,8 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Configuration; -using RootNamespace.ProjectName.Services; +using NamespacePlaceholder.ProjectName.Services; -namespace RootNamespace.ProjectName; +namespace NamespacePlaceholder.ProjectName; public static class ServiceCollectionExtensions { diff --git a/templates/services-repo/src/ProjectName/Services/SampleHostedService.cs b/templates/services-repo/src/ProjectName/Services/SampleHostedService.cs index 58fad0f..c35658b 100644 --- a/templates/services-repo/src/ProjectName/Services/SampleHostedService.cs +++ b/templates/services-repo/src/ProjectName/Services/SampleHostedService.cs @@ -2,7 +2,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -namespace RootNamespace.ProjectName.Services; +namespace NamespacePlaceholder.ProjectName.Services; public class SampleHostedService(ILogger logger, IOptionsSnapshot options) : IHostedService, IDisposable { From bd635bb3a016a14078ef12ec65b60f17b5ba5ef8 Mon Sep 17 00:00:00 2001 From: Patrick Kurmann Date: Fri, 26 Apr 2024 08:49:17 +0200 Subject: [PATCH 09/15] further --- templates/entities-repo/src/Entities/Entities.csproj | 2 +- .../services-repo/src/ProjectName/ProjectName.csproj | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/entities-repo/src/Entities/Entities.csproj b/templates/entities-repo/src/Entities/Entities.csproj index f71bc8c..a7a2f1f 100644 --- a/templates/entities-repo/src/Entities/Entities.csproj +++ b/templates/entities-repo/src/Entities/Entities.csproj @@ -11,7 +11,7 @@ NamespacePlaceholder.ProjectName - RootNamespace + NamespacePlaceholder ProjectDescription diff --git a/templates/services-repo/src/ProjectName/ProjectName.csproj b/templates/services-repo/src/ProjectName/ProjectName.csproj index 6db529a..54ab679 100644 --- a/templates/services-repo/src/ProjectName/ProjectName.csproj +++ b/templates/services-repo/src/ProjectName/ProjectName.csproj @@ -6,15 +6,15 @@ enable enable - RootNamespace.ProjectName - RootNamespace.ProjectName - RootNamespace.ProjectName + NamespacePlaceholder.ProjectName + NamespacePlaceholder.ProjectName + NamespacePlaceholder.ProjectName - RootNamespace + NamespacePlaceholder - + ProjectDescription README.md From e6cb57c5fc72fa3eb9135183af0d249de0c360a4 Mon Sep 17 00:00:00 2001 From: Patrick Kurmann Date: Fri, 26 Apr 2024 08:53:01 +0200 Subject: [PATCH 10/15] renaming back to services and entities --- templates/services-repo/.github/workflows/draft_release.yml | 2 +- templates/services-repo/.github/workflows/publish_package.yml | 2 +- templates/services-repo/src/Application/Application.csproj | 2 +- templates/services-repo/src/{ProjectName.sln => Services.sln} | 2 +- .../src/{ProjectName => Services}/Commands/ICommand.cs | 0 .../src/{ProjectName => Services}/Commands/SampleModule.cs | 0 .../src/{ProjectName => Services}/ProjectNameSettings.cs | 0 .../src/{ProjectName => Services}/Queries/IQueryService.cs | 0 .../src/{ProjectName => Services}/Queries/SampleQuery.cs | 0 .../src/{ProjectName => Services}/ServiceCollection.cs | 0 .../ProjectName.csproj => Services/Services.csproj} | 0 .../{ProjectName => Services}/Services/SampleHostedService.cs | 0 12 files changed, 4 insertions(+), 4 deletions(-) rename templates/services-repo/src/{ProjectName.sln => Services.sln} (88%) rename templates/services-repo/src/{ProjectName => Services}/Commands/ICommand.cs (100%) rename templates/services-repo/src/{ProjectName => Services}/Commands/SampleModule.cs (100%) rename templates/services-repo/src/{ProjectName => Services}/ProjectNameSettings.cs (100%) rename templates/services-repo/src/{ProjectName => Services}/Queries/IQueryService.cs (100%) rename templates/services-repo/src/{ProjectName => Services}/Queries/SampleQuery.cs (100%) rename templates/services-repo/src/{ProjectName => Services}/ServiceCollection.cs (100%) rename templates/services-repo/src/{ProjectName/ProjectName.csproj => Services/Services.csproj} (100%) rename templates/services-repo/src/{ProjectName => Services}/Services/SampleHostedService.cs (100%) diff --git a/templates/services-repo/.github/workflows/draft_release.yml b/templates/services-repo/.github/workflows/draft_release.yml index ed29a85..6d23ec0 100644 --- a/templates/services-repo/.github/workflows/draft_release.yml +++ b/templates/services-repo/.github/workflows/draft_release.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest env: - CSPROJ_FILE: src/ProjectName/ProjectName.csproj + CSPROJ_FILE: src/Services/Services.csproj DOTNET_VERSION: '8.0.x' steps: diff --git a/templates/services-repo/.github/workflows/publish_package.yml b/templates/services-repo/.github/workflows/publish_package.yml index 3e83cc1..3a4f042 100644 --- a/templates/services-repo/.github/workflows/publish_package.yml +++ b/templates/services-repo/.github/workflows/publish_package.yml @@ -11,7 +11,7 @@ permissions: pull-requests: read env: - CSPROJ_FILE: src/ProjectName/ProjectName.csproj + CSPROJ_FILE: src/Services/Services.csproj DOTNET_VERSION: '8.0.x' jobs: diff --git a/templates/services-repo/src/Application/Application.csproj b/templates/services-repo/src/Application/Application.csproj index 7746b03..637ec37 100644 --- a/templates/services-repo/src/Application/Application.csproj +++ b/templates/services-repo/src/Application/Application.csproj @@ -17,7 +17,7 @@ - + diff --git a/templates/services-repo/src/ProjectName.sln b/templates/services-repo/src/Services.sln similarity index 88% rename from templates/services-repo/src/ProjectName.sln rename to templates/services-repo/src/Services.sln index 1c4b993..ad5c799 100644 --- a/templates/services-repo/src/ProjectName.sln +++ b/templates/services-repo/src/Services.sln @@ -5,7 +5,7 @@ VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Application", "Application\Application.csproj", "{D24DEA42-1B81-41AA-8C97-5EB79278507C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectName", "ProjectName\ProjectName.csproj", "{C90E826D-0F3D-47DD-B33B-B52CA29FA3A7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Services", "Services\Services.csproj", "{C90E826D-0F3D-47DD-B33B-B52CA29FA3A7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/templates/services-repo/src/ProjectName/Commands/ICommand.cs b/templates/services-repo/src/Services/Commands/ICommand.cs similarity index 100% rename from templates/services-repo/src/ProjectName/Commands/ICommand.cs rename to templates/services-repo/src/Services/Commands/ICommand.cs diff --git a/templates/services-repo/src/ProjectName/Commands/SampleModule.cs b/templates/services-repo/src/Services/Commands/SampleModule.cs similarity index 100% rename from templates/services-repo/src/ProjectName/Commands/SampleModule.cs rename to templates/services-repo/src/Services/Commands/SampleModule.cs diff --git a/templates/services-repo/src/ProjectName/ProjectNameSettings.cs b/templates/services-repo/src/Services/ProjectNameSettings.cs similarity index 100% rename from templates/services-repo/src/ProjectName/ProjectNameSettings.cs rename to templates/services-repo/src/Services/ProjectNameSettings.cs diff --git a/templates/services-repo/src/ProjectName/Queries/IQueryService.cs b/templates/services-repo/src/Services/Queries/IQueryService.cs similarity index 100% rename from templates/services-repo/src/ProjectName/Queries/IQueryService.cs rename to templates/services-repo/src/Services/Queries/IQueryService.cs diff --git a/templates/services-repo/src/ProjectName/Queries/SampleQuery.cs b/templates/services-repo/src/Services/Queries/SampleQuery.cs similarity index 100% rename from templates/services-repo/src/ProjectName/Queries/SampleQuery.cs rename to templates/services-repo/src/Services/Queries/SampleQuery.cs diff --git a/templates/services-repo/src/ProjectName/ServiceCollection.cs b/templates/services-repo/src/Services/ServiceCollection.cs similarity index 100% rename from templates/services-repo/src/ProjectName/ServiceCollection.cs rename to templates/services-repo/src/Services/ServiceCollection.cs diff --git a/templates/services-repo/src/ProjectName/ProjectName.csproj b/templates/services-repo/src/Services/Services.csproj similarity index 100% rename from templates/services-repo/src/ProjectName/ProjectName.csproj rename to templates/services-repo/src/Services/Services.csproj diff --git a/templates/services-repo/src/ProjectName/Services/SampleHostedService.cs b/templates/services-repo/src/Services/Services/SampleHostedService.cs similarity index 100% rename from templates/services-repo/src/ProjectName/Services/SampleHostedService.cs rename to templates/services-repo/src/Services/Services/SampleHostedService.cs From 613b77df043fa072c502a66d7dd5841c317eeb81 Mon Sep 17 00:00:00 2001 From: Patrick Kurmann Date: Fri, 26 Apr 2024 08:53:57 +0200 Subject: [PATCH 11/15] Update CSPROJ_FILE path in workflows to src/Entities/Entities.csproj --- templates/entities-repo/.github/workflows/draft_release.yml | 2 +- templates/entities-repo/.github/workflows/publish_package.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/entities-repo/.github/workflows/draft_release.yml b/templates/entities-repo/.github/workflows/draft_release.yml index ed29a85..ac36b68 100644 --- a/templates/entities-repo/.github/workflows/draft_release.yml +++ b/templates/entities-repo/.github/workflows/draft_release.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest env: - CSPROJ_FILE: src/ProjectName/ProjectName.csproj + CSPROJ_FILE: src/Entities/Entities.csproj DOTNET_VERSION: '8.0.x' steps: diff --git a/templates/entities-repo/.github/workflows/publish_package.yml b/templates/entities-repo/.github/workflows/publish_package.yml index 3e83cc1..507aa1a 100644 --- a/templates/entities-repo/.github/workflows/publish_package.yml +++ b/templates/entities-repo/.github/workflows/publish_package.yml @@ -11,7 +11,7 @@ permissions: pull-requests: read env: - CSPROJ_FILE: src/ProjectName/ProjectName.csproj + CSPROJ_FILE: src/Entities/Entities.csproj DOTNET_VERSION: '8.0.x' jobs: From ce1fecd6b9d8e78ec1c8054d6490fe44a33b344f Mon Sep 17 00:00:00 2001 From: Patrick Kurmann Date: Fri, 26 Apr 2024 08:54:47 +0200 Subject: [PATCH 12/15] set sln name --- templates/services-repo/src/{Services.sln => ProjectName.sln} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename templates/services-repo/src/{Services.sln => ProjectName.sln} (100%) diff --git a/templates/services-repo/src/Services.sln b/templates/services-repo/src/ProjectName.sln similarity index 100% rename from templates/services-repo/src/Services.sln rename to templates/services-repo/src/ProjectName.sln From 85d231faafe6677f2d59bb7945921b5a01a5064b Mon Sep 17 00:00:00 2001 From: Patrick Kurmann Date: Fri, 26 Apr 2024 08:55:49 +0200 Subject: [PATCH 13/15] Update root namespace and assembly name in Application.csproj --- templates/services-repo/src/Application/Application.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/services-repo/src/Application/Application.csproj b/templates/services-repo/src/Application/Application.csproj index 637ec37..b9cf0d0 100644 --- a/templates/services-repo/src/Application/Application.csproj +++ b/templates/services-repo/src/Application/Application.csproj @@ -7,7 +7,7 @@ enable enable NamespacePlaceholder.ProjectName.Application. - NamespacePlaceholder.Application + NamespacePlaceholder.ProjectName.Application false From de32941bf1324b77442d73dbfccf09b1c90e5ab4 Mon Sep 17 00:00:00 2001 From: Patrick Kurmann Date: Fri, 26 Apr 2024 09:07:14 +0200 Subject: [PATCH 14/15] fix module settings name --- templates/services-repo/src/Services/ServiceCollection.cs | 4 ++-- .../src/Services/Services/SampleHostedService.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/services-repo/src/Services/ServiceCollection.cs b/templates/services-repo/src/Services/ServiceCollection.cs index 11b6267..3734bbe 100644 --- a/templates/services-repo/src/Services/ServiceCollection.cs +++ b/templates/services-repo/src/Services/ServiceCollection.cs @@ -10,8 +10,8 @@ public static IServiceCollection AddProjectName( this IServiceCollection services, IConfiguration configuration) { - // Bindet Root-Konfigurationswerte an ModuleSettings - services.Configure(configuration.GetSection(ModuleSettings.SectionName)); + // Bindet Root-Konfigurationswerte an ProjectNameSettings + services.Configure(configuration.GetSection(ProjectNameSettings.SectionName)); // Dienste hinzufügen services.AddHostedService(); diff --git a/templates/services-repo/src/Services/Services/SampleHostedService.cs b/templates/services-repo/src/Services/Services/SampleHostedService.cs index c35658b..428443e 100644 --- a/templates/services-repo/src/Services/Services/SampleHostedService.cs +++ b/templates/services-repo/src/Services/Services/SampleHostedService.cs @@ -4,10 +4,10 @@ namespace NamespacePlaceholder.ProjectName.Services; -public class SampleHostedService(ILogger logger, IOptionsSnapshot options) : IHostedService, IDisposable +public class SampleHostedService(ILogger logger, IOptionsSnapshot options) : IHostedService, IDisposable { private readonly ILogger _logger = logger; - private readonly ModuleSettings _options = options.Value; + private readonly ProjectNameSettings _options = options.Value; private Timer? _timer; public Task StartAsync(CancellationToken cancellationToken) From 0dd8923d1221166ce4ecf23e6eb6dbcc0bf56cde Mon Sep 17 00:00:00 2001 From: Patrick Kurmann Date: Fri, 26 Apr 2024 09:07:28 +0200 Subject: [PATCH 15/15] removed properties set by workflow --- Templates.csproj | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/Templates.csproj b/Templates.csproj index 337c8bc..6e34674 100644 --- a/Templates.csproj +++ b/Templates.csproj @@ -9,30 +9,9 @@ dotnet-new;templates; - - https://github.com/kurmann/Templates - git - Vorlagen für .NET-Entwicklung im Kurmann-Namespace. - - 0.4.1 - - - Siehe README.md für Details. - README.md LICENSE PackageIcon.png