From 216b7883a56e7c1580f0870ed5f1afc90822607c Mon Sep 17 00:00:00 2001 From: aicia-bot Date: Fri, 30 Oct 2026 23:27:55 +0100 Subject: [PATCH 01/15] =?UTF-8?q?=F0=9F=92=A5=20drop=20net9.0=20and=20targ?= =?UTF-8?q?et=20net11.0=20framework?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Packages now target net11.0 and net10.0 instead of net10.0 and net9.0. Consumers still on .NET 9 must stay on the 10.x line. --- Directory.Build.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index cf6e2ac..650d67c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -16,7 +16,7 @@ - net10.0;net9.0 + net11.0;net10.0 Copyright © Geekle 2024-2026. All rights reserved. gimlichael Geekle @@ -51,7 +51,7 @@ - net10.0;net9.0 + net11.0;net10.0 From a747a5354bf57586d6b10bef27c428de7f71c182 Mon Sep 17 00:00:00 2001 From: aicia-bot Date: Fri, 30 Oct 2026 23:27:55 +0100 Subject: [PATCH 02/15] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20upgrade=20codebelt?= =?UTF-8?q?=20coverlet=20mtp=20to=2010.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Moves the central package version of Codebelt.Coverlet.MTP from 10.1.0 to the latest stable 10.1.1 release. --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 6ebde9a..129ae99 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -3,7 +3,7 @@ true - + From 636d69f3cf4071b68cf22fb03b7587358c714c15 Mon Sep 17 00:00:00 2001 From: aicia-bot Date: Fri, 30 Oct 2026 23:27:56 +0100 Subject: [PATCH 03/15] =?UTF-8?q?=F0=9F=91=B7=20enable=20preview=20sdk=20p?= =?UTF-8?q?rovisioning=20in=20ci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lets build, pack, test, SonarCloud and CodeQL jobs use the .NET 11 preview SDK while keeping the existing OS and architecture matrix. --- .github/workflows/ci-pipeline.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index ebd9234..6fd63c8 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -60,6 +60,7 @@ jobs: configuration: [Debug, Release] uses: codebeltnet/jobs-dotnet-build/.github/workflows/default.yml@v3 with: + include-preview: true configuration: ${{ matrix.configuration }} strong-name-key-filename: ${{ needs.init.outputs.strong-name-key-filename }} build-switches: ${{ needs.init.outputs.build-switches }} @@ -75,6 +76,7 @@ jobs: configuration: [Debug, Release] uses: codebeltnet/jobs-dotnet-pack/.github/workflows/default.yml@v3 with: + include-preview: true configuration: ${{ matrix.configuration }} version: ${{ needs.build.outputs.version }} download-build-artifact-pattern: build-${{ matrix.configuration }}-X64 @@ -89,6 +91,7 @@ jobs: configuration: [Debug, Release] uses: codebeltnet/jobs-dotnet-test/.github/workflows/default.yml@v3 with: + include-preview: true runs-on: ${{ matrix.arch == 'ARM64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }} configuration: ${{ matrix.configuration }} build-switches: -p:SkipSignAssembly=true @@ -106,6 +109,7 @@ jobs: configuration: [Debug, Release] uses: codebeltnet/jobs-dotnet-test/.github/workflows/default.yml@v3 with: + include-preview: true runs-on: ${{ matrix.arch == 'ARM64' && 'windows-11-arm' || 'windows-2025' }} configuration: ${{ matrix.configuration }} build-switches: -p:SkipSignAssembly=true @@ -124,6 +128,7 @@ jobs: configuration: [Debug, Release] uses: codebeltnet/jobs-dotnet-test/.github/workflows/default.yml@v3 with: + include-preview: true runs-on: ${{ matrix.arch == 'ARM64' && 'macos-26' || 'macos-26-intel' }} configuration: ${{ matrix.configuration }} build-switches: -p:SkipSignAssembly=true @@ -181,6 +186,7 @@ jobs: needs: [init, build, test_qualitygate] uses: codebeltnet/jobs-sonarcloud/.github/workflows/default.yml@v3 with: + include-preview: true organization: geekle projectKey: unitify version: ${{ needs.build.outputs.version }} @@ -200,6 +206,8 @@ jobs: name: call-codeql needs: [init, build, test_qualitygate] uses: codebeltnet/jobs-codeql/.github/workflows/default.yml@v3 + with: + include-preview: true permissions: security-events: write From face32c913d5e398dbce8fac375807460a94de61 Mon Sep 17 00:00:00 2001 From: aicia-bot Date: Fri, 30 Oct 2026 23:27:57 +0100 Subject: [PATCH 04/15] =?UTF-8?q?=F0=9F=91=B7=20harden=20service=20update?= =?UTF-8?q?=20automation=20for=20pending=20releases?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The service update now reuses a pending TBD release, preserves its notes without duplicate blocks and writes package configuration as explicit UTF-8. --- .github/scripts/bump-nuget.py | 4 +- .github/workflows/service-update.yml | 128 +++++++++++++++++++++++---- 2 files changed, 111 insertions(+), 21 deletions(-) diff --git a/.github/scripts/bump-nuget.py b/.github/scripts/bump-nuget.py index 82c90f7..c976911 100644 --- a/.github/scripts/bump-nuget.py +++ b/.github/scripts/bump-nuget.py @@ -114,7 +114,7 @@ def main(): print() try: - with open("Directory.Packages.props", "r") as f: + with open("Directory.Packages.props", "r", encoding="utf-8") as f: content = f.read() except FileNotFoundError: print("Error: Directory.Packages.props not found") @@ -171,7 +171,7 @@ def replace_version(m: re.Match) -> str: if len(skipped_third_party) > 5: print(f" ... and {len(skipped_third_party) - 5} more") - with open("Directory.Packages.props", "w") as f: + with open("Directory.Packages.props", "w", encoding="utf-8") as f: f.write(new_content) return 0 if changes else 0 # Return 0 even if no changes (not an error) diff --git a/.github/workflows/service-update.yml b/.github/workflows/service-update.yml index f9a235e..c4253ac 100644 --- a/.github/workflows/service-update.yml +++ b/.github/workflows/service-update.yml @@ -31,6 +31,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + fetch-tags: true - name: Resolve trigger inputs id: trigger @@ -42,13 +43,69 @@ jobs: - name: Determine new version for this repo id: newver + shell: bash run: | - CURRENT=$(grep -oP '(?<=## \[)[\d.]+(?=\])' CHANGELOG.md | head -1) - NEW=$(echo "$CURRENT" | awk -F. '{printf "%s.%s.%d", $1, $2, $3+1}') - BRANCH="v${NEW}/service-update" - echo "current=$CURRENT" >> $GITHUB_OUTPUT - echo "new=$NEW" >> $GITHUB_OUTPUT - echo "branch=$BRANCH" >> $GITHUB_OUTPUT + python3 - <<'PY' + import os + import re + import subprocess + import sys + + tag_pattern = re.compile(r"^v(\d+)\.(\d+)\.(\d+)$") + tags = subprocess.check_output(["git", "tag", "--list"], text=True).splitlines() + stable_tags = [] + for tag in tags: + match = tag_pattern.fullmatch(tag) + if match: + version = tuple(int(part) for part in match.groups()) + stable_tags.append((version, tag)) + + if not stable_tags: + print("::error::No stable vMAJOR.MINOR.PATCH Git tag was found.") + sys.exit(1) + + _, latest_tag = max(stable_tags, key=lambda item: item[0]) + latest_version = latest_tag[1:] + major, minor, patch = (int(part) for part in latest_version.split(".")) + next_version = f"{major}.{minor}.{patch + 1}" + + with open("CHANGELOG.md", encoding="utf-8") as changelog_file: + changelog = changelog_file.read() + + heading = re.search(r"(?m)^## \[(\d+\.\d+\.\d+)\] - ([^\r\n]+)[ \t]*$", changelog) + if not heading: + print("::error::CHANGELOG.md has no versioned heading to compare with Git tags.") + sys.exit(1) + + current_version, current_status = heading.groups() + current_status = current_status.strip() + if current_status.upper() != "TBD" and not re.fullmatch(r"\d{4}-\d{2}-\d{2}", current_status): + print(f"::error::Unsupported CHANGELOG.md version status: {current_status}") + sys.exit(1) + + current_parts = tuple(int(part) for part in current_version.split(".")) + if current_status.upper() == "TBD" and current_parts > (major, minor, patch): + # Reuse a pending patch, minor or major release without skipping its notes. + new_version = current_version + elif current_version == latest_version and current_status.upper() != "TBD": + # The changelog is at the latest released tag; start the next patch release. + new_version = next_version + else: + print( + f"::error::CHANGELOG.md starts at {current_version} ({current_status}), " + f"but the latest stable Git tag is {latest_tag}. Expected either " + f"[{latest_version}] with a release date or a newer version marked TBD." + ) + sys.exit(1) + + branch = f"v{new_version}/service-update" + print(f"Latest stable Git tag: {latest_tag}") + print(f"Latest CHANGELOG.md version: {current_version} ({current_status})") + print(f"Service update version: {new_version}") + with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as output: + output.write(f"current={current_version}\n") + output.write(f"new={new_version}\n") + output.write(f"branch={branch}\n") - name: Generate codebelt-aicia token id: app-token @@ -66,13 +123,33 @@ jobs: - name: Update PackageReleaseNotes.txt run: | - NEW="${{ steps.newver.outputs.new }}" - for f in .nuget/*/PackageReleaseNotes.txt; do - [ -f "$f" ] || continue - TFM=$(grep -m1 "^Availability:" "$f" | sed 's/Availability: //' || echo ".NET 10, .NET 9 and .NET Standard 2.0") - ENTRY="Version: ${NEW}\nAvailability: ${TFM}\n\n# ALM\n- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)\n\n" - { printf "$ENTRY"; cat "$f"; } > "$f.tmp" && mv "$f.tmp" "$f" - done + python3 - <<'PY' + import os + import re + from pathlib import Path + + version = os.environ["NEW_VERSION"] + note = "- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)" + for path in Path(".nuget").glob("*/PackageReleaseNotes.txt"): + content = path.read_text(encoding="utf-8") + availability = re.search(r"(?m)^Availability: (.+)$", content) + if not availability: + raise ValueError(f"Missing package availability: {path}") + if content.startswith(f"Version: {version}\n"): + boundary = re.search(r"(?m)^Version:", content[len(f"Version: {version}\n"):]) + end = len(f"Version: {version}\n") + boundary.start() if boundary else len(content) + current, history = content[:end], content[end:] + if note not in current: + if "# ALM\n" not in current: + raise ValueError(f"Missing ALM section: {path}") + current = current.replace("# ALM\n", f"# ALM\n{note}\n", 1) + content = current + history + else: + content = f"Version: {version}\n{availability.group(0)}\n\n# ALM\n{note}\n\n" + content + path.write_text(content, encoding="utf-8") + PY + env: + NEW_VERSION: ${{ steps.newver.outputs.new }} - name: Update CHANGELOG.md run: | @@ -81,14 +158,27 @@ jobs: from datetime import date new_ver = os.environ['NEW_VERSION'] today = date.today().isoformat() - entry = f"## [{new_ver}] - {today}\n\nThis is a service update that focuses on package dependencies.\n\n" - with open("CHANGELOG.md") as f: + service_note = "This release also includes a service update focused on package dependencies." + with open("CHANGELOG.md", encoding="utf-8") as f: content = f.read() - idx = content.find("## [") - content = (content[:idx] + entry + content[idx:]) if idx != -1 else (content + entry) - with open("CHANGELOG.md", "w") as f: + heading = re.search(r"(?m)^## \[(\d+\.\d+\.\d+)\] - (TBD|\d{4}-\d{2}-\d{2})[ \t]*$", content) + if heading and heading.group(1) == new_ver: + if heading.group(2) == "TBD": + content = content[:heading.start(2)] + today + content[heading.end(2):] + heading = re.search(r"(?m)^## \[(\d+\.\d+\.\d+)\] - \d{4}-\d{2}-\d{2}[ \t]*$", content) + section_end = re.search(r"(?m)^## \[", content[heading.end():]) + end = heading.end() + section_end.start() if section_end else len(content) + if service_note not in content[heading.end():end]: + remainder = content[heading.end():] + content = content[:heading.end()] + "\n\n" + service_note + "\n\n" + remainder.lstrip("\r\n") + print(f"Updated existing CHANGELOG entry for v{new_ver}") + else: + entry = f"## [{new_ver}] - {today}\n\nThis is a service update that focuses on package dependencies.\n\n" + idx = content.find("## [") + content = (content[:idx] + entry + content[idx:]) if idx != -1 else (content + entry) + print(f"Added CHANGELOG entry for v{new_ver}") + with open("CHANGELOG.md", "w", encoding="utf-8") as f: f.write(content) - print(f"CHANGELOG updated for v{new_ver}") EOF env: NEW_VERSION: ${{ steps.newver.outputs.new }} From 73af6a6af0514edc46d1a32532d8bc8c630058b3 Mon Sep 17 00:00:00 2001 From: aicia-bot Date: Fri, 30 Oct 2026 23:27:57 +0100 Subject: [PATCH 05/15] =?UTF-8?q?=F0=9F=93=9D=20update=20target=20framewor?= =?UTF-8?q?k=20references=20to=20.net=2011?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Availability notes, contributor guidance, the project overview and the READMEs now describe .NET 11 and .NET 10 support. --- .docfx/includes/availability-modern.md | 2 +- .github/CONTRIBUTING.md | 2 +- .nuget/Codebelt.Unitify/README.md | 2 +- AGENTS.md | 2 +- README.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.docfx/includes/availability-modern.md b/.docfx/includes/availability-modern.md index af5cf4b..db9549d 100644 --- a/.docfx/includes/availability-modern.md +++ b/.docfx/includes/availability-modern.md @@ -1 +1 @@ -Availability: .NET 10 and .NET 9 \ No newline at end of file +Availability: .NET 11 and .NET 10 \ No newline at end of file diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 18294cd..a88b9ce 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -5,7 +5,7 @@ This repository is part of the Codebelt .NET library estate. The instructions be ## Before you start - Read the repository `README.md` and open an issue before starting a non-trivial feature or behavioral change. -- Use an installed .NET SDK that can build the target frameworks listed below. This repository currently targets: **net10.0, net9.0**. +- Use an installed .NET SDK that can build the target frameworks listed below. This repository currently targets: **net11.0, net10.0**. - The solution is `Codebelt.Unitify.slnx`. Central package versions are maintained in `Directory.Packages.props`. - The shared build behavior is in `Directory.Build.props` and `Directory.Build.targets`; repository-specific TFMs, package references and metadata remain local to this library. diff --git a/.nuget/Codebelt.Unitify/README.md b/.nuget/Codebelt.Unitify/README.md index c92b888..109e8f7 100644 --- a/.nuget/Codebelt.Unitify/README.md +++ b/.nuget/Codebelt.Unitify/README.md @@ -2,7 +2,7 @@ An open-source project (MIT license) that offers types that simplify unit management with comprehensive metric and binary support for prefixes, multiples, and submultiples. -Your versatile "units of measure" companion for modern development with `.NET 9` and `.NET 10`. +Your versatile "units of measure" companion for modern development with `.NET 11` and `.NET 10`. It is, by heart, free, flexible and built to extend and boost your agile codebelt. diff --git a/AGENTS.md b/AGENTS.md index d87d8c2..2292cb5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,7 +4,7 @@ This document provides guidance for AI agents working in this repository. ## Project Overview -Codebelt.Unitify is an open-source MIT-licensed .NET library that simplifies unit management with comprehensive metric and binary support for prefixes, multiples, and submultiples. It provides types for working with units of measure including SI units (meter, kilogram, second, ampere, kelvin, mole, candela), prefixes (kilo, mega, milli, micro, etc.), and binary prefixes (kibi, mebi, gibi, etc.). The solution targets .NET 10.0 and .NET 9.0. +Codebelt.Unitify is an open-source MIT-licensed .NET library that simplifies unit management with comprehensive metric and binary support for prefixes, multiples, and submultiples. It provides types for working with units of measure including SI units (meter, kilogram, second, ampere, kelvin, mole, candela), prefixes (kilo, mega, milli, micro, etc.), and binary prefixes (kibi, mebi, gibi, etc.). The solution targets .NET 11.0 and .NET 10.0. ## Coding Standards diff --git a/README.md b/README.md index c3b2bd6..82296f6 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ An open-source project (MIT license) that offers types that simplify unit management with comprehensive metric and binary support for prefixes, multiples, and submultiples. -Your versatile "units of measure" companion for modern development with `.NET 9` and `.NET 10`. +Your versatile "units of measure" companion for modern development with `.NET 11` and `.NET 10`. It is, by heart, free, flexible and built to extend and boost your agile codebelt. From fb59ad09be73e5e9e66b7742d72539c5461029eb Mon Sep 17 00:00:00 2001 From: aicia-bot Date: Fri, 30 Oct 2026 23:27:58 +0100 Subject: [PATCH 06/15] =?UTF-8?q?=F0=9F=93=A6=20add=20.net=2011=20package?= =?UTF-8?q?=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the 11.0.0 entry to the package release notes so NuGet consumers see the target framework change. --- .../Codebelt.Unitify/PackageReleaseNotes.txt | 76 ++++++++++--------- 1 file changed, 41 insertions(+), 35 deletions(-) diff --git a/.nuget/Codebelt.Unitify/PackageReleaseNotes.txt b/.nuget/Codebelt.Unitify/PackageReleaseNotes.txt index 1a5eed6..f0b959c 100644 --- a/.nuget/Codebelt.Unitify/PackageReleaseNotes.txt +++ b/.nuget/Codebelt.Unitify/PackageReleaseNotes.txt @@ -1,45 +1,51 @@ -Version: 10.0.13 +Version: 11.0.0 +Availability: .NET 11 and .NET 10 + +# ALM +- CHANGED Target frameworks by adding .NET 11 (net11.0) and removing .NET 9 (net9.0), so the package now targets .NET 11 and .NET 10 + +Version: 10.0.13 Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 10.0.12 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 10.0.12 Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 10.0.11 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 10.0.11 Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 10.0.10 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 10.0.10 Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 10.0.9 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 10.0.9 Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 10.0.8 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 10.0.8 Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 10.0.7 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 10.0.7 Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + Version: 10.0.6 Availability: .NET 10 and .NET 9 From d10d4d9f32389c40f1399d57bc793fd27891dcf8 Mon Sep 17 00:00:00 2001 From: aicia-bot Date: Fri, 30 Oct 2026 23:27:59 +0100 Subject: [PATCH 07/15] =?UTF-8?q?=F0=9F=92=AC=20add=2011.0.0=20changelog?= =?UTF-8?q?=20entry?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Documents the .NET 11 addition, .NET 9 removal and the coverlet update for the pending major release. --- CHANGELOG.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a48033b..83fbd7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,26 @@ For more details, please refer to `PackageReleaseNotes.txt` on a per assembly ba > [!NOTE] > Changelog entries prior to version 9.0.0 was migrated from previous versions of [Cuemon.Core](https://github.com/gimlichael/Cuemon/commit/83e0c7af2cdaa07351e878fa7276558838f2e7e6). +## [11.0.0] - 2026-11-10 + +This is a major release that adds .NET 11 support and removes .NET 9 support while retaining .NET 10. Existing .NET 9 consumers must remain on 10.x or upgrade their target framework; the public API is unchanged. + +### Added + +- Added `net11.0` package assets and tests. + +### Changed + +- Updated `Codebelt.Coverlet.MTP` from 10.1.0 to 10.1.1, +- Enabled preview SDK provisioning for build, pack, tests, SonarCloud and CodeQL without changing the OS and architecture matrix, +- Added the .NET 11 preview SDK to the DocFX build container while retaining .NET 10 metadata extraction, +- Aligned current documentation and package availability with .NET 11 and .NET 10, +- Updated service-update automation to reuse a pending major release, preserve its package notes without duplicate version blocks, and rewrite package configuration explicitly as UTF-8. + +### Removed + +- Removed `net9.0` package assets and tests; .NET 10 remains supported. + ## [10.0.13] - 2026-10-17 This is a patch release that updates dependencies, consolidates agent guidance and revises documentation hosting. @@ -253,6 +273,7 @@ This is a service update that primarily focuses on package dependencies and mino - ByteUnit class in the Codebelt.Unitify namespace to have 0 duplicated blocks of lines of code - UnitPrefixFormatter class in the Codebelt.Unitify namespace to be compliant with https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1822 +[11.0.0]: https://github.com/codebeltnet/unitify/compare/v10.0.13...v11.0.0 [10.0.13]: https://github.com/codebeltnet/unitify/compare/v10.0.12...v10.0.13 [10.0.12]: https://github.com/codebeltnet/unitify/compare/v10.0.11...v10.0.12 [10.0.11]: https://github.com/codebeltnet/unitify/compare/v10.0.10...v10.0.11 From 793888f3ff405d74aa3ef9ea29c01d3c18bf5af9 Mon Sep 17 00:00:00 2001 From: aicia-bot Date: Fri, 30 Oct 2026 23:49:26 +0100 Subject: [PATCH 08/15] =?UTF-8?q?=F0=9F=8E=A8=20normalize=20line=20endings?= =?UTF-8?q?=20and=20drop=20byte-order=20marks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The working copy carried byte-order marks and CRLF endings that differ from the committed files. Normalizing them keeps later diffs limited to real changes. --- .docfx/BuildDocfxImage.ps1 | 8 +- .docfx/Dockerfile.docfx | 32 +-- .docfx/api/namespaces/Codebelt.Unitify.md | 94 ++++----- .docfx/docfx.json | 186 +++++++++--------- .docfx/index.md | 30 +-- .docfx/packages/index.md | 22 +-- .docfx/toc.yml | 8 +- .github/dependabot.yml | 34 ++-- Codebelt.Unitify.slnx | 16 +- Directory.Build.targets | 28 +-- src/Codebelt.Unitify/Codebelt.Unitify.csproj | 24 +-- .../Codebelt.Unitify.Tests.csproj | 22 +-- 12 files changed, 252 insertions(+), 252 deletions(-) diff --git a/.docfx/BuildDocfxImage.ps1 b/.docfx/BuildDocfxImage.ps1 index 560dcff..7c3093b 100644 --- a/.docfx/BuildDocfxImage.ps1 +++ b/.docfx/BuildDocfxImage.ps1 @@ -1,4 +1,4 @@ -$version = minver -i -t v -v w -docfx metadata docfx.json -docker buildx build -t jcr.codebelt.net/geekle/unitify-docfx:$version --platform linux/arm64,linux/amd64 --load -f Dockerfile.docfx . -get-childItem -recurse -path api -include *.yml, .manifest | remove-item +$version = minver -i -t v -v w +docfx metadata docfx.json +docker buildx build -t jcr.codebelt.net/geekle/unitify-docfx:$version --platform linux/arm64,linux/amd64 --load -f Dockerfile.docfx . +get-childItem -recurse -path api -include *.yml, .manifest | remove-item diff --git a/.docfx/Dockerfile.docfx b/.docfx/Dockerfile.docfx index 39006f1..e29eda1 100644 --- a/.docfx/Dockerfile.docfx +++ b/.docfx/Dockerfile.docfx @@ -1,16 +1,16 @@ -ARG NGINX_VERSION=1.31-alpine - -FROM --platform=$BUILDPLATFORM dhi.io/nginx:${NGINX_VERSION} AS base -RUN rm -rf /usr/share/nginx/html/* - -FROM --platform=$BUILDPLATFORM codebeltnet/docfx:2 AS build - -ADD [".", "docfx"] - -RUN cd docfx; \ - docfx build - -FROM dhi.io/nginx:${NGINX_VERSION} AS final -WORKDIR /usr/share/nginx/html -COPY --from=build /build/docfx/wwwroot /usr/share/nginx/html -COPY nginx.conf /etc/nginx/conf.d/default.conf +ARG NGINX_VERSION=1.31-alpine + +FROM --platform=$BUILDPLATFORM dhi.io/nginx:${NGINX_VERSION} AS base +RUN rm -rf /usr/share/nginx/html/* + +FROM --platform=$BUILDPLATFORM codebeltnet/docfx:2 AS build + +ADD [".", "docfx"] + +RUN cd docfx; \ + docfx build + +FROM dhi.io/nginx:${NGINX_VERSION} AS final +WORKDIR /usr/share/nginx/html +COPY --from=build /build/docfx/wwwroot /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf diff --git a/.docfx/api/namespaces/Codebelt.Unitify.md b/.docfx/api/namespaces/Codebelt.Unitify.md index 25e7706..8b6789b 100644 --- a/.docfx/api/namespaces/Codebelt.Unitify.md +++ b/.docfx/api/namespaces/Codebelt.Unitify.md @@ -1,47 +1,47 @@ ---- -uid: Codebelt.Unitify -summary: *content ---- - -Simplify unit measurement and conversion with **Codebelt.Unitify**, a comprehensive .NET library for managing units with SI unit support, metric prefixes (kilo, mega, milli, micro, etc.), and binary prefixes (kibi, mebi, gibi, etc.). - -To get started, use [`UnitFactory`](xref:Codebelt.Unitify.UnitFactory) to create SI units, or access predefined SI base units via the [`Unit`](xref:Codebelt.Unitify.Unit) class. - -## Start Here - -Begin with **`UnitFactory`** — the primary API for creating SI units with custom precision and base values. Call static methods like `UnitFactory.CreateMeter()` or `UnitFactory.CreateWatt()` to construct units programmatically. - -If you only need standard predefined base units, use the **`Unit`** class directly instead (e.g., `Unit.Meter`, `Unit.Kilogram`) to avoid factory overhead. - -## When to Use - -Use Codebelt.Unitify when you need to: - -- Work with SI base units (meter, kilogram, second, ampere, kelvin, mole, candela) and derived units -- Apply metric (decimal) or binary prefixes to create unit variations (e.g., kilometer, megabyte, gibibyte) -- Convert between different prefix scales while preserving semantic meaning -- Format units using metric, data-centric, or custom naming conventions - -## Getting Started - -**Start here:** Call `UnitFactory.CreateMeter()`, `UnitFactory.CreateWatt()`, or other static factory methods to construct SI units with your desired precision and base values. `UnitFactory` is the primary entry point for programmatic unit creation. - -**Alternative:** If you need one of the standard predefined SI base units (meter, kilogram, second, ampere, kelvin, mole, candela), access them directly via static properties on the `Unit` class (e.g., `Unit.Meter`, `Unit.Kilogram`) to avoid factory overhead. - -Once you have a unit, you can apply metric or binary prefixes in three ways: - -- **Single prefix**: Use `PrefixUnit` to combine a specific prefix with a unit (e.g., create a kilometer from `Unit.Meter` and `DecimalPrefix.Kilo`). -- **Full metric scale table**: Create a `MetricPrefixTable` to explore all available decimal-prefix representations (kilo, mega, giga, etc.) at once. -- **Full binary scale table**: Create a `DataPrefixTable` to explore all available binary-prefix representations (kibi, mebi, gibi, etc.) at once for data/storage contexts. - -Choose `MetricPrefixTable` for general scientific and engineering units; choose `DataPrefixTable` exclusively for data storage and network bandwidth to avoid mixing decimal (1 kB = 1000 bytes) and binary (1 KiB = 1024 bytes) scales. - -[!INCLUDE [availability-modern](../../includes/availability-modern.md)] - -## Extension Members - -|Type|Ext|Methods| -|--:|:-:|---| -|Prefix|⬇️|`ToPrefixUnit`, `ToBaseUnit`| -|PrefixTable|⬇️|`QuectoOrDefault`, `RontoOrDefault`, `YoctoOrDefault`, `ZeptoOrDefault`, `AttoOrDefault`, `FemtoOrDefault`, `PicoOrDefault`, `NanoOrDefault`, `MicroOrDefault`, `MilliOrDefault`, `CentiOrDefault`, `DeciOrDefault`, `DecaOrDefault`, `HectoOrDefault`, `KiloOrDefault`, `MegaOrDefault`, `GigaOrDefault`, `TeraOrDefault`, `PetaOrDefault`, `ExaOrDefault`, `ZettaOrDefault`, `YottaOrDefault`, `RonnaOrDefault`, `QuettaOrDefault`, `QuebiOrDefault`, `RobiOrDefault`, `KibiOrDefault`, `MebiOrDefault`, `GibiOrDefault`, `TebiOrDefault`, `PebiOrDefault`, `ExbiOrDefault`, `ZebiOrDefault`, `YobiOrDefault`| -|PrefixUnit|⬇️|`ToPrefixValue`, `ToBaseValue`, `ToBaseUnit`, `ToPrefixString`, `ToMetricPrefixTable`, `ToDataPrefixTable`| +--- +uid: Codebelt.Unitify +summary: *content +--- + +Simplify unit measurement and conversion with **Codebelt.Unitify**, a comprehensive .NET library for managing units with SI unit support, metric prefixes (kilo, mega, milli, micro, etc.), and binary prefixes (kibi, mebi, gibi, etc.). + +To get started, use [`UnitFactory`](xref:Codebelt.Unitify.UnitFactory) to create SI units, or access predefined SI base units via the [`Unit`](xref:Codebelt.Unitify.Unit) class. + +## Start Here + +Begin with **`UnitFactory`** — the primary API for creating SI units with custom precision and base values. Call static methods like `UnitFactory.CreateMeter()` or `UnitFactory.CreateWatt()` to construct units programmatically. + +If you only need standard predefined base units, use the **`Unit`** class directly instead (e.g., `Unit.Meter`, `Unit.Kilogram`) to avoid factory overhead. + +## When to Use + +Use Codebelt.Unitify when you need to: + +- Work with SI base units (meter, kilogram, second, ampere, kelvin, mole, candela) and derived units +- Apply metric (decimal) or binary prefixes to create unit variations (e.g., kilometer, megabyte, gibibyte) +- Convert between different prefix scales while preserving semantic meaning +- Format units using metric, data-centric, or custom naming conventions + +## Getting Started + +**Start here:** Call `UnitFactory.CreateMeter()`, `UnitFactory.CreateWatt()`, or other static factory methods to construct SI units with your desired precision and base values. `UnitFactory` is the primary entry point for programmatic unit creation. + +**Alternative:** If you need one of the standard predefined SI base units (meter, kilogram, second, ampere, kelvin, mole, candela), access them directly via static properties on the `Unit` class (e.g., `Unit.Meter`, `Unit.Kilogram`) to avoid factory overhead. + +Once you have a unit, you can apply metric or binary prefixes in three ways: + +- **Single prefix**: Use `PrefixUnit` to combine a specific prefix with a unit (e.g., create a kilometer from `Unit.Meter` and `DecimalPrefix.Kilo`). +- **Full metric scale table**: Create a `MetricPrefixTable` to explore all available decimal-prefix representations (kilo, mega, giga, etc.) at once. +- **Full binary scale table**: Create a `DataPrefixTable` to explore all available binary-prefix representations (kibi, mebi, gibi, etc.) at once for data/storage contexts. + +Choose `MetricPrefixTable` for general scientific and engineering units; choose `DataPrefixTable` exclusively for data storage and network bandwidth to avoid mixing decimal (1 kB = 1000 bytes) and binary (1 KiB = 1024 bytes) scales. + +[!INCLUDE [availability-modern](../../includes/availability-modern.md)] + +## Extension Members + +|Type|Ext|Methods| +|--:|:-:|---| +|Prefix|⬇️|`ToPrefixUnit`, `ToBaseUnit`| +|PrefixTable|⬇️|`QuectoOrDefault`, `RontoOrDefault`, `YoctoOrDefault`, `ZeptoOrDefault`, `AttoOrDefault`, `FemtoOrDefault`, `PicoOrDefault`, `NanoOrDefault`, `MicroOrDefault`, `MilliOrDefault`, `CentiOrDefault`, `DeciOrDefault`, `DecaOrDefault`, `HectoOrDefault`, `KiloOrDefault`, `MegaOrDefault`, `GigaOrDefault`, `TeraOrDefault`, `PetaOrDefault`, `ExaOrDefault`, `ZettaOrDefault`, `YottaOrDefault`, `RonnaOrDefault`, `QuettaOrDefault`, `QuebiOrDefault`, `RobiOrDefault`, `KibiOrDefault`, `MebiOrDefault`, `GibiOrDefault`, `TebiOrDefault`, `PebiOrDefault`, `ExbiOrDefault`, `ZebiOrDefault`, `YobiOrDefault`| +|PrefixUnit|⬇️|`ToPrefixValue`, `ToBaseValue`, `ToBaseUnit`, `ToPrefixString`, `ToMetricPrefixTable`, `ToDataPrefixTable`| diff --git a/.docfx/docfx.json b/.docfx/docfx.json index d8da2c9..fcfdcd2 100644 --- a/.docfx/docfx.json +++ b/.docfx/docfx.json @@ -1,93 +1,93 @@ -{ - "metadata": [ - { - "src": [ - { - "files": [ - "Codebelt.Unitify/**.csproj" - ], - "src": "../src" - } - ], - "dest": "api", - "memberLayout": "separatePages", - "filter": "filterConfig.yml", - "properties": { - "TargetFramework": "net10.0" - } - } - ], - "build": { - "xref": [ - "https://docs.cuemon.net/xrefmap.yml", - "https://github.com/dotnet/docfx/raw/main/.xrefmap.json" - ], - "content": [ - { - "files": [ - "api/**/*.yml", - "packages/**/*.md", - "toc.yml", - "*.md" - ], - "exclude": [ - "bin/**", - "obj/**", - "api/namespaces/**", - "api/types/**" - ] - } - ], - "resource": [ - { - "files": [ - "images/**" - ] - } - ], - "globalMetadata": { - "_appTitle": "Unitify by Codebelt", - "_appFooter": "Generated by DocFX. Copyright 2024-2026 Geekle. All rights reserved.", - "_appLogoPath": "images/50x50.png", - "_appFaviconPath": "images/favicon.ico", - "_googleAnalyticsTagId": "G-J55EBSD5V7", - "_enableSearch": false, - "_disableContribution": false, - "_gitContribute": { - "repo": "https://github.com/codebeltnet/unitify", - "branch": "main" - }, - "_gitUrlPattern": "github" - }, - "dest": "wwwroot", - "globalMetadataFiles": [], - "fileMetadataFiles": [], - "template": [ - "default", - "modern", - "templates/ms-style" - ], - "overwrite": [ - { - "files": [ - "api/namespaces/**/*.md", - "api/types/**/*.md" - ], - "exclude": [ - "obj/**", - "wwwroot/**" - ] - } - ], - "postProcessors": [], - "markdownEngineName": "markdig", - "noLangKeyword": false, - "keepFileLink": false, - "cleanupCacheHistory": false, - "disableGitFeatures": false, - "sitemap": { - "baseUrl": "https://unitify.codebelt.net/", - "changefreq": "monthly" - } - } -} +{ + "metadata": [ + { + "src": [ + { + "files": [ + "Codebelt.Unitify/**.csproj" + ], + "src": "../src" + } + ], + "dest": "api", + "memberLayout": "separatePages", + "filter": "filterConfig.yml", + "properties": { + "TargetFramework": "net10.0" + } + } + ], + "build": { + "xref": [ + "https://docs.cuemon.net/xrefmap.yml", + "https://github.com/dotnet/docfx/raw/main/.xrefmap.json" + ], + "content": [ + { + "files": [ + "api/**/*.yml", + "packages/**/*.md", + "toc.yml", + "*.md" + ], + "exclude": [ + "bin/**", + "obj/**", + "api/namespaces/**", + "api/types/**" + ] + } + ], + "resource": [ + { + "files": [ + "images/**" + ] + } + ], + "globalMetadata": { + "_appTitle": "Unitify by Codebelt", + "_appFooter": "Generated by DocFX. Copyright 2024-2026 Geekle. All rights reserved.", + "_appLogoPath": "images/50x50.png", + "_appFaviconPath": "images/favicon.ico", + "_googleAnalyticsTagId": "G-J55EBSD5V7", + "_enableSearch": false, + "_disableContribution": false, + "_gitContribute": { + "repo": "https://github.com/codebeltnet/unitify", + "branch": "main" + }, + "_gitUrlPattern": "github" + }, + "dest": "wwwroot", + "globalMetadataFiles": [], + "fileMetadataFiles": [], + "template": [ + "default", + "modern", + "templates/ms-style" + ], + "overwrite": [ + { + "files": [ + "api/namespaces/**/*.md", + "api/types/**/*.md" + ], + "exclude": [ + "obj/**", + "wwwroot/**" + ] + } + ], + "postProcessors": [], + "markdownEngineName": "markdig", + "noLangKeyword": false, + "keepFileLink": false, + "cleanupCacheHistory": false, + "disableGitFeatures": false, + "sitemap": { + "baseUrl": "https://unitify.codebelt.net/", + "changefreq": "monthly" + } + } +} diff --git a/.docfx/index.md b/.docfx/index.md index c7de249..56af145 100644 --- a/.docfx/index.md +++ b/.docfx/index.md @@ -1,15 +1,15 @@ ---- -uid: frontpage-md -title: Unitify API by Codebelt ---- -![Unitify API by Codebelt](/images/128x128.png) - -# Unitify API by Codebelt - -Originally, this project was part of **Cuemon for .NET**, but with the forthcoming release of .NET 9, it was split into its own project. - -This project is now part of [Unitify API by Codebelt](https://github.com/codebeltnet/unitify). - -[Cuemon for .NET](https://www.cuemon.net/) will pursue its original purpose; providing an addition/complement/sidecar to Microsoft .NET platform. - -Proceed to the [docs](/api/Codebelt.Unitify.html) to learn more about the capabilities of this project. +--- +uid: frontpage-md +title: Unitify API by Codebelt +--- +![Unitify API by Codebelt](/images/128x128.png) + +# Unitify API by Codebelt + +Originally, this project was part of **Cuemon for .NET**, but with the forthcoming release of .NET 9, it was split into its own project. + +This project is now part of [Unitify API by Codebelt](https://github.com/codebeltnet/unitify). + +[Cuemon for .NET](https://www.cuemon.net/) will pursue its original purpose; providing an addition/complement/sidecar to Microsoft .NET platform. + +Proceed to the [docs](/api/Codebelt.Unitify.html) to learn more about the capabilities of this project. diff --git a/.docfx/packages/index.md b/.docfx/packages/index.md index 7dd8953..2588374 100644 --- a/.docfx/packages/index.md +++ b/.docfx/packages/index.md @@ -1,11 +1,11 @@ -# NuGet Packages - -This is a list of all NuGet packages from **Unitify API by Codebelt** that is publicly available on [NuGet.org](https://www.nuget.org/packages?q=Codebelt.Unitify); the packages here are listed alphabetically and are available in preview-, rc- and production-ready versions. - -### 📦 Standalone Packages - -Provides a focused API for working with units of measure including, but not limited to, prefixes, multiples, and submultiples. - -|Package|vNext|Stable|Downloads| -|:--|:-:|:-:|:-:| -| [Codebelt.Unitify](https://www.nuget.org/packages/Codebelt.Unitify/) | ![vNext](https://img.shields.io/nuget/vpre/Codebelt.Unitify?logo=nuget) | ![Stable](https://img.shields.io/nuget/v/Codebelt.Unitify?logo=nuget) | ![Downloads](https://img.shields.io/nuget/dt/Codebelt.Unitify?color=blueviolet&logo=nuget) | +# NuGet Packages + +This is a list of all NuGet packages from **Unitify API by Codebelt** that is publicly available on [NuGet.org](https://www.nuget.org/packages?q=Codebelt.Unitify); the packages here are listed alphabetically and are available in preview-, rc- and production-ready versions. + +### 📦 Standalone Packages + +Provides a focused API for working with units of measure including, but not limited to, prefixes, multiples, and submultiples. + +|Package|vNext|Stable|Downloads| +|:--|:-:|:-:|:-:| +| [Codebelt.Unitify](https://www.nuget.org/packages/Codebelt.Unitify/) | ![vNext](https://img.shields.io/nuget/vpre/Codebelt.Unitify?logo=nuget) | ![Stable](https://img.shields.io/nuget/v/Codebelt.Unitify?logo=nuget) | ![Downloads](https://img.shields.io/nuget/dt/Codebelt.Unitify?color=blueviolet&logo=nuget) | diff --git a/.docfx/toc.yml b/.docfx/toc.yml index 23d5b35..d9e5f9a 100644 --- a/.docfx/toc.yml +++ b/.docfx/toc.yml @@ -1,4 +1,4 @@ -- name: Unitify API - href: api/Codebelt.Unitify.html -- name: NuGet - href: packages +- name: Unitify API + href: api/Codebelt.Unitify.html +- name: NuGet + href: packages diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 1fca42a..7fe3850 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,17 +1,17 @@ -version: 2 -updates: - - package-ecosystem: "nuget" - directory: "/src" - schedule: - interval: "weekly" - open-pull-requests-limit: 0 - - package-ecosystem: "nuget" - directory: "/test" - schedule: - interval: "weekly" - open-pull-requests-limit: 0 - - package-ecosystem: "github-actions" - directory: "/.github/workflows" - schedule: - interval: "weekly" - open-pull-requests-limit: 0 +version: 2 +updates: + - package-ecosystem: "nuget" + directory: "/src" + schedule: + interval: "weekly" + open-pull-requests-limit: 0 + - package-ecosystem: "nuget" + directory: "/test" + schedule: + interval: "weekly" + open-pull-requests-limit: 0 + - package-ecosystem: "github-actions" + directory: "/.github/workflows" + schedule: + interval: "weekly" + open-pull-requests-limit: 0 diff --git a/Codebelt.Unitify.slnx b/Codebelt.Unitify.slnx index c0ab59d..1ae8075 100644 --- a/Codebelt.Unitify.slnx +++ b/Codebelt.Unitify.slnx @@ -1,8 +1,8 @@ - - - - - - - - + + + + + + + + diff --git a/Directory.Build.targets b/Directory.Build.targets index 5f9df1e..f6a6a00 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,14 +1,14 @@ - - - - $([System.IO.File]::ReadAllText('$(PackageReleaseNotesFile)')) - - - - - - 0 - $(MinVerMajor).$(MinVerMinor).$(MinVerPatch).$(GITHUB_RUN_NUMBER) - - - + + + + $([System.IO.File]::ReadAllText('$(PackageReleaseNotesFile)')) + + + + + + 0 + $(MinVerMajor).$(MinVerMinor).$(MinVerPatch).$(GITHUB_RUN_NUMBER) + + + diff --git a/src/Codebelt.Unitify/Codebelt.Unitify.csproj b/src/Codebelt.Unitify/Codebelt.Unitify.csproj index da1473d..75954ff 100644 --- a/src/Codebelt.Unitify/Codebelt.Unitify.csproj +++ b/src/Codebelt.Unitify/Codebelt.Unitify.csproj @@ -1,12 +1,12 @@ - - - - - - - - The Codebelt.Unitify namespace offers types that simplify unit management with comprehensive metric and binary support for prefixes, multiples, and submultiples. - power-of-2 power-of-10 binary decimal prefix multiple submultiple unit measurement measure metric si byte bit bit/s ampere becquerel candela celsius coulomb farad gray henry hertz joule kelvin katal gram lumen lux meter mole newton ohm pascal radian second siemens sievert steradian tesla volt watt weber exbi gibi kibi mebi pebi tebi yobi zebi atto centi deca deci exa femto giga hecto kilo mega micro milli nano peta pico ronna ronto quecto quetta tera yocto yotta zepto zetta - - - + + + + + + + + The Codebelt.Unitify namespace offers types that simplify unit management with comprehensive metric and binary support for prefixes, multiples, and submultiples. + power-of-2 power-of-10 binary decimal prefix multiple submultiple unit measurement measure metric si byte bit bit/s ampere becquerel candela celsius coulomb farad gray henry hertz joule kelvin katal gram lumen lux meter mole newton ohm pascal radian second siemens sievert steradian tesla volt watt weber exbi gibi kibi mebi pebi tebi yobi zebi atto centi deca deci exa femto giga hecto kilo mega micro milli nano peta pico ronna ronto quecto quetta tera yocto yotta zepto zetta + + + diff --git a/test/Codebelt.Unitify/Codebelt.Unitify.Tests.csproj b/test/Codebelt.Unitify/Codebelt.Unitify.Tests.csproj index f135003..29380fb 100644 --- a/test/Codebelt.Unitify/Codebelt.Unitify.Tests.csproj +++ b/test/Codebelt.Unitify/Codebelt.Unitify.Tests.csproj @@ -1,11 +1,11 @@ - - - - Codebelt.Unitify - - - - - - - + + + + Codebelt.Unitify + + + + + + + From 9873bb2d88c5e04bf50e13a9a23ceb4f289c5833 Mon Sep 17 00:00:00 2001 From: aicia-bot Date: Fri, 30 Oct 2026 23:49:27 +0100 Subject: [PATCH 09/15] =?UTF-8?q?=F0=9F=94=A7=20enforce=20file-scoped=20na?= =?UTF-8?q?mespaces=20and=20lf=20line=20endings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit C# namespace declarations are now an error rather than a suggestion, and text files use LF endings so editors and CI agree on line endings. --- .editorconfig | 353 +++++++++++++++++++++++++------------------------ .gitattributes | 8 +- 2 files changed, 181 insertions(+), 180 deletions(-) diff --git a/.editorconfig b/.editorconfig index 6d0e3c9..886ea15 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,176 +1,177 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -# Default: prefer spaces for data/markup -indent_style = space -indent_size = 2 -tab_width = 2 - -# This style rule concern the use of the range operator, which is available in C# 8.0 and later. -# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0057 -[*.{cs,vb}] -dotnet_diagnostic.IDE0057.severity = none - -# This style rule concerns the use of switch expressions versus switch statements. -# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0066 -[*.{cs,vb}] -dotnet_diagnostic.IDE0066.severity = none - -# Performance rules -# https://docs.microsoft.com/da-dk/dotnet/fundamentals/code-analysis/quality-rules/performance-warnings -[*.{cs,vb}] -dotnet_analyzer_diagnostic.category-Performance.severity = none # Because many of the suggestions by performance analyzers are not compatible with .NET Standard 2.0 - -# This style rule concerns the use of using statements without curly braces, also known as using declarations. This alternative syntax was introduced in C# 8.0. -# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0063 -[*.{cs,vb}] -dotnet_diagnostic.IDE0063.severity = none - -# This style rule concerns with simplification of interpolated strings to improve code readability. It recommends removal of certain explicit method calls, such as ToString(), when the same method would be implicitly invoked by the compiler if the explicit method call is removed. -# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0071 -[*.{cs,vb}] -dotnet_diagnostic.IDE0071.severity = none - -# S3267: Loops should be simplified with "LINQ" expressions -# https://rules.sonarsource.com/csharp/RSPEC-3267 -dotnet_diagnostic.S3267.severity = none - -# CA1859: Use concrete types when possible for improved performance -# This is a violation of Framework Design Guidelines. -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1859 -[*.{cs,vb}] -dotnet_diagnostic.CA1859.severity = none - -# IDE0008: Use explicit type -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0007-ide0008 -[*.{cs,vb}] -dotnet_diagnostic.IDE0008.severity = none - -[*.{cs,vb}] -indent_style = space -indent_size = 4 - -# IDE0161: Namespace declaration preferences -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0161 -# Prefer file-scoped namespaces for new files; existing block-scoped files should not be converted unless explicitly asked -[*.cs] -csharp_style_namespace_declarations = file_scoped:suggestion - -# Top-level statements: DO NOT USE -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0210-ide0211 -# This is enforced via a style preference set to error severity, not a language-level prohibition. -# Always use explicit class declarations with a proper namespace and Main method where applicable. -[*.cs] -csharp_style_prefer_top_level_statements = false:error - -[*.xml] -indent_style = space -indent_size = 2 - -# IDE0078: Use pattern matching -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0078 -[*.{cs,vb}] -dotnet_diagnostic.IDE0078.severity = none - -# IDE0290: Use primary constructor -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0290 -[*.{cs,vb}] -dotnet_diagnostic.IDE0290.severity = none - -# IDE0305: Use collection expression for fluent -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0305 -[*.{cs,vb}] -dotnet_diagnostic.IDE0305.severity = none - -# IDE0011: Add braces -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0011 -[*.{cs,vb}] -dotnet_diagnostic.IDE0011.severity = none - -# IDE0028: Use collection initializers or expressions -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0028 -[*.{cs,vb}] -dotnet_diagnostic.IDE0028.severity = none - -# IDE0039: Use collection expression for array -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0300 -[*.{cs,vb}] -dotnet_diagnostic.IDE0300.severity = none - -# IDE0031: Use collection expression for empty -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0301 -[*.{cs,vb}] -dotnet_diagnostic.IDE0301.severity = none - -# IDE0046: Use conditional expression for return -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0046 -[*.{cs,vb}] -dotnet_diagnostic.IDE0046.severity = none - -# IDE0047: Parentheses preferences -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0047-ide0048 -[*.{cs,vb}] -dotnet_diagnostic.IDE0047.severity = none - -# CA1716: Identifiers should not match keywords -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1716 -[*.{cs,vb}] -dotnet_diagnostic.CA1716.severity = none - -# CA1720: Identifiers should not contain type names -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1720 -[*.{cs,vb}] -dotnet_diagnostic.CA1720.severity = none - -# CA1846: Prefer AsSpan over Substring -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1846 -# Excluded while TFMs include netstandard2.0 -[*.{cs,vb}] -dotnet_diagnostic.CA1846.severity = none - -# CA1847: Use String.Contains(char) instead of String.Contains(string) with single characters -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1847 -# Excluded while TFMs include netstandard2.0 -[*.{cs,vb}] -dotnet_diagnostic.CA1847.severity = none - -# CA1865-CA1867: Use 'string.Method(char)' instead of 'string.Method(string)' for string with single char -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1865-ca1867 -# Excluded while TFMs include netstandard2.0 -[*.{cs,vb}] -dotnet_diagnostic.CA1865.severity = none -dotnet_diagnostic.CA1866.severity = none -dotnet_diagnostic.CA1867.severity = none - -# CA2263: Prefer generic overload when type is known -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2263 -# Excluded while TFMs include netstandard2.0 -[*.{cs,vb}] -dotnet_diagnostic.CA2263.severity = none - -# CA2249: Consider using String.Contains instead of String.IndexOf -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2249 -# Excluded while TFMs include netstandard2.0 -[*.{cs,vb}] -dotnet_diagnostic.CA2249.severity = none - -# IDE0022: Use expression body for methods -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0022 -[*.{cs,vb}] -dotnet_diagnostic.IDE0022.severity = none - -# IDE0032: Use auto-property -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0032 -[*.{cs,vb}] -dotnet_diagnostic.IDE0032.severity = none - -# Order modifiers -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0036 -# Excluded becuase of inconsistency with other analyzers -[*.{cs,vb}] -dotnet_diagnostic.IDE0036.severity = none +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +# Default: prefer spaces for data/markup +indent_style = space +indent_size = 2 +tab_width = 2 + +# This style rule concern the use of the range operator, which is available in C# 8.0 and later. +# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0057 +[*.{cs,vb}] +dotnet_diagnostic.IDE0057.severity = none + +# This style rule concerns the use of switch expressions versus switch statements. +# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0066 +[*.{cs,vb}] +dotnet_diagnostic.IDE0066.severity = none + +# Performance rules +# https://docs.microsoft.com/da-dk/dotnet/fundamentals/code-analysis/quality-rules/performance-warnings +[*.{cs,vb}] +dotnet_analyzer_diagnostic.category-Performance.severity = none # Because many of the suggestions by performance analyzers are not compatible with .NET Standard 2.0 + +# This style rule concerns the use of using statements without curly braces, also known as using declarations. This alternative syntax was introduced in C# 8.0. +# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0063 +[*.{cs,vb}] +dotnet_diagnostic.IDE0063.severity = none + +# This style rule concerns with simplification of interpolated strings to improve code readability. It recommends removal of certain explicit method calls, such as ToString(), when the same method would be implicitly invoked by the compiler if the explicit method call is removed. +# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0071 +[*.{cs,vb}] +dotnet_diagnostic.IDE0071.severity = none + +# S3267: Loops should be simplified with "LINQ" expressions +# https://sonarcloud.io/organizations/sonarcloud/rules?open=csharpsquid:S3267&rule_key=csharpsquid:S3267 +dotnet_diagnostic.S3267.severity = none + +# CA1859: Use concrete types when possible for improved performance +# This is a violation of Framework Design Guidelines. +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1859 +[*.{cs,vb}] +dotnet_diagnostic.CA1859.severity = none + +# IDE0008: Use explicit type +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0007-ide0008 +[*.{cs,vb}] +dotnet_diagnostic.IDE0008.severity = none + +[*.{cs,vb}] +indent_style = space +indent_size = 4 + +# IDE0161: Namespace declaration preferences +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0161 +# File-scoped namespaces are mandatory for new and existing C# files. +[*.cs] +csharp_style_namespace_declarations = file_scoped:error +dotnet_diagnostic.IDE0161.severity = error + +# Top-level statements: DO NOT USE +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0210-ide0211 +# This is enforced via a style preference set to error severity, not a language-level prohibition. +# Always use explicit class declarations with a proper namespace and Main method where applicable. +[*.cs] +csharp_style_prefer_top_level_statements = false:error + +[*.xml] +indent_style = space +indent_size = 2 + +# IDE0078: Use pattern matching +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0078 +[*.{cs,vb}] +dotnet_diagnostic.IDE0078.severity = none + +# IDE0290: Use primary constructor +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0290 +[*.{cs,vb}] +dotnet_diagnostic.IDE0290.severity = none + +# IDE0305: Use collection expression for fluent +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0305 +[*.{cs,vb}] +dotnet_diagnostic.IDE0305.severity = none + +# IDE0011: Add braces +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0011 +[*.{cs,vb}] +dotnet_diagnostic.IDE0011.severity = none + +# IDE0028: Use collection initializers or expressions +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0028 +[*.{cs,vb}] +dotnet_diagnostic.IDE0028.severity = none + +# IDE0039: Use collection expression for array +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0300 +[*.{cs,vb}] +dotnet_diagnostic.IDE0300.severity = none + +# IDE0031: Use collection expression for empty +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0301 +[*.{cs,vb}] +dotnet_diagnostic.IDE0301.severity = none + +# IDE0046: Use conditional expression for return +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0046 +[*.{cs,vb}] +dotnet_diagnostic.IDE0046.severity = none + +# IDE0047: Parentheses preferences +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0047-ide0048 +[*.{cs,vb}] +dotnet_diagnostic.IDE0047.severity = none + +# CA1716: Identifiers should not match keywords +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1716 +[*.{cs,vb}] +dotnet_diagnostic.CA1716.severity = none + +# CA1720: Identifiers should not contain type names +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1720 +[*.{cs,vb}] +dotnet_diagnostic.CA1720.severity = none + +# CA1846: Prefer AsSpan over Substring +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1846 +# Excluded while TFMs include netstandard2.0 +[*.{cs,vb}] +dotnet_diagnostic.CA1846.severity = none + +# CA1847: Use String.Contains(char) instead of String.Contains(string) with single characters +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1847 +# Excluded while TFMs include netstandard2.0 +[*.{cs,vb}] +dotnet_diagnostic.CA1847.severity = none + +# CA1865-CA1867: Use 'string.Method(char)' instead of 'string.Method(string)' for string with single char +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1865-ca1867 +# Excluded while TFMs include netstandard2.0 +[*.{cs,vb}] +dotnet_diagnostic.CA1865.severity = none +dotnet_diagnostic.CA1866.severity = none +dotnet_diagnostic.CA1867.severity = none + +# CA2263: Prefer generic overload when type is known +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2263 +# Excluded while TFMs include netstandard2.0 +[*.{cs,vb}] +dotnet_diagnostic.CA2263.severity = none + +# CA2249: Consider using String.Contains instead of String.IndexOf +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2249 +# Excluded while TFMs include netstandard2.0 +[*.{cs,vb}] +dotnet_diagnostic.CA2249.severity = none + +# IDE0022: Use expression body for methods +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0022 +[*.{cs,vb}] +dotnet_diagnostic.IDE0022.severity = none + +# IDE0032: Use auto-property +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0032 +[*.{cs,vb}] +dotnet_diagnostic.IDE0032.severity = none + +# Order modifiers +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0036 +# Excluded becuase of inconsistency with other analyzers +[*.{cs,vb}] +dotnet_diagnostic.IDE0036.severity = none diff --git a/.gitattributes b/.gitattributes index 1ff0c42..0ea8d1b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,7 @@ ############################################################################### # Set default behavior to automatically normalize line endings. ############################################################################### -* text=auto +* text=auto eol=lf ############################################################################### # Set default behavior for command prompt diff. @@ -17,7 +17,7 @@ # # Merging from the command prompt will add diff markers to the files if there # are conflicts (Merging from VS is not affected by the settings below, in VS -# the diff markers are never inserted). Diff markers may cause the following +# the diff markers are never inserted). Diff markers may cause the following # file extensions to fail to load in VS. An alternative would be to treat # these files as binary and thus will always conflict and require user # intervention with every merge. To do so, just uncomment the entries below @@ -46,9 +46,9 @@ ############################################################################### # diff behavior for common document formats -# +# # Convert binary document formats to text before diffing them. This feature -# is only available from the command line. Turn it on by uncommenting the +# is only available from the command line. Turn it on by uncommenting the # entries below. ############################################################################### #*.doc diff=astextplain From 8e21d3a047355128bc2505862d8598f127f1bf81 Mon Sep 17 00:00:00 2001 From: aicia-bot Date: Fri, 30 Oct 2026 23:49:27 +0100 Subject: [PATCH 10/15] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20bump=20cuemon=20and?= =?UTF-8?q?=20hangdump=20and=20add=20sonaranalyzer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refreshes the Cuemon.Core and HangDump package versions and adds SonarAnalyzer.CSharp to library projects for static analysis. --- Directory.Build.props | 169 ++++++++++++++++++++------------------- Directory.Packages.props | 5 +- 2 files changed, 88 insertions(+), 86 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 650d67c..2cc0b96 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,84 +1,85 @@ - - - - $(MSBuildProjectName.EndsWith('Tests')) - $([MSBuild]::IsOSPlatform('Linux')) - $([MSBuild]::IsOSPlatform('Windows')) - true - false - latest - ..\..\.nuget\$(MSBuildProjectName)\PackageReleaseNotes.txt - - - - true - true - - - - net11.0;net10.0 - Copyright © Geekle 2024-2026. All rights reserved. - gimlichael - Geekle - Unitify API by Codebelt - icon.png - README.md - https://unitify.codebelt.net/ - MIT - https://github.com/codebeltnet/unitify - git - en-US - true - true - true - snupkg - true - true - $(MSBuildThisFileDirectory)unitify.snk - 7035,CA2260 - latest - Recommended - - - - - - - - - - - - - - net11.0;net10.0 - - - - Exe - false - false - false - false - true - 0 - none - NU1701,NETSDK1206 - false - true - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + $(MSBuildProjectName.EndsWith('Tests')) + $([MSBuild]::IsOSPlatform('Linux')) + $([MSBuild]::IsOSPlatform('Windows')) + true + false + latest + ..\..\.nuget\$(MSBuildProjectName)\PackageReleaseNotes.txt + + + + true + true + + + + net11.0;net10.0 + Copyright © Geekle 2024-2026. All rights reserved. + gimlichael + Geekle + Unitify API by Codebelt + icon.png + README.md + https://unitify.codebelt.net/ + MIT + https://github.com/codebeltnet/unitify + git + en-US + true + true + true + snupkg + true + true + $(MSBuildThisFileDirectory)unitify.snk + 7035,CA2260 + latest + Recommended + + + + + + + + + + + + + + + net11.0;net10.0 + + + + Exe + false + false + false + false + true + 0 + none + NU1701,NETSDK1206 + false + true + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + diff --git a/Directory.Packages.props b/Directory.Packages.props index 129ae99..88f3e56 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,12 +5,13 @@ - + - + + From df4bceba406de96d5ee9b0cd2f8713ae1e064cb8 Mon Sep 17 00:00:00 2001 From: aicia-bot Date: Fri, 30 Oct 2026 23:49:28 +0100 Subject: [PATCH 11/15] =?UTF-8?q?=F0=9F=91=B7=20move=20ci=20runners=20and?= =?UTF-8?q?=20test=20environments=20to=20ubuntu=2026.04?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CI workflow and the test runner environments now target Ubuntu 26.04, and the Docker test environments are split into net10.0 and net11.0 images. --- .github/workflows/ci-pipeline.yml | 8 +++---- testenvironments.json | 35 ++++++++++++++++++------------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 6fd63c8..2743638 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -24,7 +24,7 @@ permissions: jobs: init: name: initialize - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 outputs: run-mac-tests: ${{ steps.vars.outputs.run-mac-tests }} run-privileged-jobs: ${{ steps.vars.outputs.run-privileged-jobs }} @@ -64,7 +64,7 @@ jobs: configuration: ${{ matrix.configuration }} strong-name-key-filename: ${{ needs.init.outputs.strong-name-key-filename }} build-switches: ${{ needs.init.outputs.build-switches }} - runs-on: ${{ matrix.arch == 'ARM64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }} + runs-on: ${{ matrix.arch == 'ARM64' && 'ubuntu-26.04-arm' || 'ubuntu-26.04' }} upload-build-artifact-name: build-${{ matrix.configuration }}-${{ matrix.arch }} secrets: inherit @@ -92,7 +92,7 @@ jobs: uses: codebeltnet/jobs-dotnet-test/.github/workflows/default.yml@v3 with: include-preview: true - runs-on: ${{ matrix.arch == 'ARM64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }} + runs-on: ${{ matrix.arch == 'ARM64' && 'ubuntu-26.04-arm' || 'ubuntu-26.04' }} configuration: ${{ matrix.configuration }} build-switches: -p:SkipSignAssembly=true build: true # we need to build due to xUnitv3 @@ -140,7 +140,7 @@ jobs: if: ${{ always() }} name: test-qualitygate needs: [init, test_linux, test_windows, test_mac] - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 steps: - name: Evaluate test results shell: bash diff --git a/testenvironments.json b/testenvironments.json index 587b2ef..0651f28 100644 --- a/testenvironments.json +++ b/testenvironments.json @@ -1,15 +1,20 @@ -{ - "version": "1", - "environments": [ - { - "name": "WSL-Ubuntu", - "type": "wsl", - "wslDistribution": "Ubuntu-24.04" - }, - { - "name": "Docker-Ubuntu", - "type": "docker", - "dockerImage": "codebeltnet/ubuntu-testrunner:8-9-10-11" - } - ] -} +{ + "version": "1", + "environments": [ + { + "name": "WSL-Ubuntu", + "type": "wsl", + "wslDistribution": "Ubuntu-26.04" + }, + { + "name": "Docker-Ubuntu (net10.0)", + "type": "docker", + "dockerImage": "codebeltnet/ubuntu-testrunner:10" + }, + { + "name": "Docker-Ubuntu (net11.0)", + "type": "docker", + "dockerImage": "codebeltnet/ubuntu-testrunner:11" + } + ] +} From fd6966cd945f0b844ea5e0b1e7fedc4d09dd8704 Mon Sep 17 00:00:00 2001 From: aicia-bot Date: Fri, 30 Oct 2026 23:49:29 +0100 Subject: [PATCH 12/15] =?UTF-8?q?=F0=9F=92=AC=20document=20net10=20and=20n?= =?UTF-8?q?et11=20docker=20test=20environments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The contributing guide lists the net10.0 and net11.0 Docker test environments with their images. --- .github/CONTRIBUTING.md | 159 ++++++++++++++++++++-------------------- 1 file changed, 80 insertions(+), 79 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index a88b9ce..7bba243 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,79 +1,80 @@ -# Contributing to Unitify API by Codebelt - -This repository is part of the Codebelt .NET library estate. The instructions below describe the current checkout and its CI contract. Please keep changes focused and preserve the shared Codebelt build skeleton unless a deliberate policy change is being made. - -## Before you start - -- Read the repository `README.md` and open an issue before starting a non-trivial feature or behavioral change. -- Use an installed .NET SDK that can build the target frameworks listed below. This repository currently targets: **net11.0, net10.0**. -- The solution is `Codebelt.Unitify.slnx`. Central package versions are maintained in `Directory.Packages.props`. -- The shared build behavior is in `Directory.Build.props` and `Directory.Build.targets`; repository-specific TFMs, package references and metadata remain local to this library. - -## Repository shape - -- `src/` contains production projects. -- `test/` contains xUnit v3 test projects. -- `Codebelt.Unitify.slnx` is the solution used for local development. -- `.github/workflows/ci-pipeline.yml` is the CI workflow and the authority for the test matrix. -- `testenvironments.json` declares the supported `WSL-Ubuntu` and `Docker-Ubuntu` test environments. - -## Build - -Restore and build the solution from the repository root: - -```powershell -dotnet restore "Codebelt.Unitify.slnx" -dotnet build "Codebelt.Unitify.slnx" --configuration Release --no-restore -``` - -CI builds both Debug and Release configurations. A clean build should complete before opening a pull request. - -## Test - -Run tests one project at a time so a failing or hanging project is attributable. This mirrors the CI matrix; it does not silently turn skipped integration tests into passing tests. - -```powershell -$testProjects = Get-ChildItem test -Filter *.csproj -Recurse -foreach ($project in $testProjects) { - dotnet test --project $project.FullName --configuration Release --no-restore -} -``` - -The CI test plan currently runs **1** project(s) and excludes **0** project(s). The workflow also has an optional macOS test job. - -## Integration and infrastructure - -- `WSL-Ubuntu` — WSL distribution `Ubuntu-24.04`. -- `Docker-Ubuntu` — Docker image `codebeltnet/ubuntu-testrunner:8-9-10-11`. - -This repository has no repository-local `docker-compose.yml` service dependency in the current checkout. -Use the environments declared in `testenvironments.json` when you need the estate test runner. - -## Package and documentation - -Create packages using the same solution and Release configuration: - -```powershell -dotnet pack "Codebelt.Unitify.slnx" --configuration Release --no-restore -``` - -Package-specific release notes live under `.nuget//PackageReleaseNotes.txt` and package README files live beside them. `Directory.Build.targets` imports the release notes during packing. Public API changes also require XML documentation updates; DocFX documentation is built by the repository automation. - -## Pull requests - -1. Create or join an issue before substantial work, then fork the repository and create a branch from `main`. -2. Add or update focused tests and public API documentation where applicable. -3. Run restore, build, and the relevant per-project tests locally. -4. Keep the pull request small, explain the behavior change and validation performed, and wait for the CI checks to pass. - -## Issues - -Include the affected project, target framework, operating system, SDK version, exact command, expected result, actual result, and a minimal reproduction. Identify whether the behavior differs between local Windows/WSL, Docker-Ubuntu and GitHub Actions. - -## Coding guidelines - -Follow the existing style, the Framework Design Guidelines, the repository `.editorconfig`, and the shared Codebelt conventions. Do not make unrelated formatting or infrastructure changes in a feature pull request. - -## License - -By contributing to Unitify API by Codebelt, you agree that your contributions will be licensed under the MIT license. +# Contributing to Unitify API by Codebelt + +This repository is part of the Codebelt .NET library estate. The instructions below describe the current checkout and its CI contract. Please keep changes focused and preserve the shared Codebelt build skeleton unless a deliberate policy change is being made. + +## Before you start + +- Read the repository `README.md` and open an issue before starting a non-trivial feature or behavioral change. +- Use an installed .NET SDK that can build the target frameworks listed below. This repository currently targets: **net10.0, net11.0**. +- The solution is `Codebelt.Unitify.slnx`. Central package versions are maintained in `Directory.Packages.props`. +- The shared build behavior is in `Directory.Build.props` and `Directory.Build.targets`; repository-specific TFMs, package references and metadata remain local to this library. + +## Repository shape + +- `src/` contains production projects. +- `test/` contains xUnit v3 test projects. +- `Codebelt.Unitify.slnx` is the solution used for local development. +- `.github/workflows/ci-pipeline.yml` is the CI workflow and the authority for the test matrix. +- `testenvironments.json` declares the supported `WSL-Ubuntu` and `Docker-Ubuntu` test environments. + +## Build + +Restore and build the solution from the repository root: + +```powershell +dotnet restore "Codebelt.Unitify.slnx" +dotnet build "Codebelt.Unitify.slnx" --configuration Release --no-restore +``` + +CI builds both Debug and Release configurations. A clean build should complete before opening a pull request. + +## Test + +Run tests one project at a time so a failing or hanging project is attributable. This mirrors the CI matrix; it does not silently turn skipped integration tests into passing tests. + +```powershell +$testProjects = Get-ChildItem test -Filter *.csproj -Recurse +foreach ($project in $testProjects) { + dotnet test --project $project.FullName --configuration Release --no-restore +} +``` + +The CI test plan currently runs **1** project(s) and excludes **0** project(s). The workflow also has an optional macOS test job. + +## Integration and infrastructure + +- `WSL-Ubuntu` — WSL distribution `Ubuntu-24.04`. +- `Docker-Ubuntu (net10.0)` — Docker image `codebeltnet/ubuntu-testrunner:10`. +- `Docker-Ubuntu (net11.0)` — Docker image `codebeltnet/ubuntu-testrunner:11`. + +This repository has no repository-local `docker-compose.yml` service dependency in the current checkout. +Use the environments declared in `testenvironments.json` when you need the estate test runner. + +## Package and documentation + +Create packages using the same solution and Release configuration: + +```powershell +dotnet pack "Codebelt.Unitify.slnx" --configuration Release --no-restore +``` + +Package-specific release notes live under `.nuget//PackageReleaseNotes.txt` and package README files live beside them. `Directory.Build.targets` imports the release notes during packing. Public API changes also require XML documentation updates; DocFX documentation is built by the repository automation. + +## Pull requests + +1. Create or join an issue before substantial work, then fork the repository and create a branch from `main`. +2. Add or update focused tests and public API documentation where applicable. +3. Run restore, build, and the relevant per-project tests locally. +4. Keep the pull request small, explain the behavior change and validation performed, and wait for the CI checks to pass. + +## Issues + +Include the affected project, target framework, operating system, SDK version, exact command, expected result, actual result, and a minimal reproduction. Identify whether the behavior differs between local Windows/WSL, Docker-Ubuntu and GitHub Actions. + +## Coding guidelines + +Follow the existing style, the Framework Design Guidelines, the repository `.editorconfig`, and the shared Codebelt conventions. Do not make unrelated formatting or infrastructure changes in a feature pull request. + +## License + +By contributing to Unitify API by Codebelt, you agree that your contributions will be licensed under the MIT license. From 5015d6b6c7695094de8a371d027d127b2315ae90 Mon Sep 17 00:00:00 2001 From: aicia-bot Date: Fri, 30 Oct 2026 23:49:30 +0100 Subject: [PATCH 13/15] =?UTF-8?q?=F0=9F=94=A5=20remove=20benchmark=20promp?= =?UTF-8?q?t=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removes the benchmark prompt file from the repository. --- .github/prompts/benchmark.prompt.md | 164 ---------------------------- 1 file changed, 164 deletions(-) delete mode 100644 .github/prompts/benchmark.prompt.md diff --git a/.github/prompts/benchmark.prompt.md b/.github/prompts/benchmark.prompt.md deleted file mode 100644 index f137b63..0000000 --- a/.github/prompts/benchmark.prompt.md +++ /dev/null @@ -1,164 +0,0 @@ ---- -mode: agent -description: 'Writing Performance Benchmarks' ---- - -# Benchmark Fixture Prompt (Tuning Benchmarks) - -This prompt defines how to generate performance tests (“benchmarks”) for a project/solution using BenchmarkDotNet. -Benchmarks are *not* unit tests — they are micro- or component-level performance measurements that belong under the `tuning/` directory and follow strict conventions. - -Copilot must follow these guidelines when generating benchmark fixtures. - ---- - -## 1. Naming and Placement - -- All benchmark projects live under the `tuning/` folder. - Examples: - - `tuning/.Benchmarks/` - - `tuning/.Console.Benchmarks/` - -- **Namespaces must NOT end with `.Benchmarks`.** - They must mirror the production assembly’s namespace. - - Example: - If benchmarking a type inside `YourProject.Console`, then: - - ```csharp - namespace YourProject.Console - { - public class Sha512256Benchmark { … } - } - ``` - -* **Benchmark class names must end with `Benchmark`.** - Example: `DateSpanBenchmark`, `FowlerNollVoBenchmark`. - -* Benchmark files should be located in the matching benchmark project - (e.g., benchmarks for `YourProject.Console` go in `YourProject.Console.Benchmarks.csproj`). - -* In the `.csproj` for each benchmark project, set the root namespace to the production namespace, for example: - - ```xml - YourProject.Console - ``` - ---- - -## 2. Attributes and Configuration - -Each benchmark class should use: - -```csharp -[MemoryDiagnoser] -[GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByCategory)] -``` - -Optional but strongly recommended where meaningful: - -* `[Params(...)]` — define small, medium, large input sizes. -* `[GlobalSetup]` — deterministic initialization of benchmark data. -* `[Benchmark(Description = "...")]` — always add descriptions. -* `[Benchmark(Baseline = true)]` — when comparing two implementations. - -Avoid complex global configs; prefer explicit attributes inside the class. - ---- - -## 3. Structure and Best Practices - -A benchmark fixture must: - -* Measure a **single logical operation** per benchmark method. -* Avoid I/O, networking, disk access, logging, or side effects. -* Avoid expensive setup inside `[Benchmark]` methods. -* Use deterministic data (e.g., seeded RNG or predefined constants). -* Use `[GlobalSetup]` to allocate buffers, random payloads, or reusable test data only once. -* Avoid shared mutable state unless reset per iteration. - -Use representative input sizes such as: - -```csharp -[Params(8, 256, 4096)] -public int Count { get; set; } -``` - -BenchmarkDotNet will run each benchmark for each parameter value. - ---- - -## 4. Method Naming Conventions - -Use descriptive names that communicate intent: - -* `Parse_Short` -* `Parse_Long` -* `ComputeHash_Small` -* `ComputeHash_Large` -* `Serialize_Optimized` -* `Serialize_Baseline` - -When comparing approaches, always list them clearly and tag one as the baseline. - ---- - -## 5. Example Benchmark Fixture - -```csharp -using BenchmarkDotNet.Attributes; -using BenchmarkDotNet.Configs; - -namespace YourProject -{ - [MemoryDiagnoser] - [GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByCategory)] - public class SampleOperationBenchmark - { - [Params(8, 256, 4096)] - public int Count { get; set; } - - private byte[] _payload; - - [GlobalSetup] - public void Setup() - { - _payload = new byte[Count]; - // deterministic initialization - } - - [Benchmark(Baseline = true, Description = "Operation - baseline")] - public int Operation_Baseline() => SampleOperation.Process(_payload); - - [Benchmark(Description = "Operation - optimized")] - public int Operation_Optimized() => SampleOperation.ProcessOptimized(_payload); - } -} -``` - ---- - -## 6. Reporting and CI - -* Benchmark projects live exclusively under `tuning/`. They must not affect production builds. -* Heavy BenchmarkDotNet runs should *not* run in CI unless explicitly configured. -* Reports are produced by the benchmark runner and stored under the configured artifacts directory. - ---- - -## 7. Additional Guidelines - -* Keep benchmark fixtures focused and readable. -* Document non-obvious reasoning in short comments. -* Prefer realistic but deterministic data sets. -* When benchmarks reveal regressions or improvements, reference the associated PR or issue in a comment. -* Shared benchmark helpers belong in `tuning/` projects, not in production code. - ---- - -## Final Notes - -* Benchmarks are performance tests, not unit tests. -* Use `[Benchmark]` only for pure performance measurement. -* Avoid `MethodImplOptions.NoInlining` unless absolutely necessary. -* Use small sets of meaningful benchmark scenarios — avoid combinatorial explosion. From c4cfc820c43aaa36347dae3996dcf402d9a26d52 Mon Sep 17 00:00:00 2001 From: aicia-bot Date: Fri, 30 Oct 2026 23:49:51 +0100 Subject: [PATCH 14/15] =?UTF-8?q?=F0=9F=93=9D=20clarify=20the=20bot=20read?= =?UTF-8?q?me=20is=20the=20only=20tracked=20file=20in=20the=20bot=20folder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bot folder readme now states that it is the one tracked file there, so the rest of the folder's local-only policy is clear to contributors. --- .bot/README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.bot/README.md b/.bot/README.md index f3aa97d..9f9afda 100644 --- a/.bot/README.md +++ b/.bot/README.md @@ -1,10 +1,10 @@ -# .bot Workspace - -This folder is reserved for local-only AI working material such as: - -- brainstorm notes -- draft implementation plans -- design alternatives -- temporary agent state - -Keep this folder out of source control. Move only finalized, non-confidential guidance into `AGENTS.md`. +# .bot Workspace + +This folder is reserved for local-only AI working material such as: + +- brainstorm notes +- draft implementation plans +- design alternatives +- temporary agent state + +The `.bot/README.md` file itself is intentionally tracked in source control. All other `.bot/` working material remains local-only and excluded from source control. Move only finalized, non-confidential guidance into `AGENTS.md`. From 20e89fade6d25c6f62a9dd0bed97009c04331b95 Mon Sep 17 00:00:00 2001 From: aicia-bot Date: Fri, 30 Oct 2026 23:49:51 +0100 Subject: [PATCH 15/15] =?UTF-8?q?=F0=9F=8E=A8=20normalize=20remaining=20li?= =?UTF-8?q?ne=20endings=20in=20docfx=20and=20nuget=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These files differ from the committed copies only in line endings. Normalizing them keeps the working tree clean for later changes. --- .docfx/PublishDocfxImage.ps1 | 6 +- .../Codebelt.Unitify/PackageReleaseNotes.txt | 402 +++++++++--------- .nuget/Codebelt.Unitify/README.md | 30 +- 3 files changed, 219 insertions(+), 219 deletions(-) diff --git a/.docfx/PublishDocfxImage.ps1 b/.docfx/PublishDocfxImage.ps1 index 6e98971..83b13b8 100644 --- a/.docfx/PublishDocfxImage.ps1 +++ b/.docfx/PublishDocfxImage.ps1 @@ -1,3 +1,3 @@ -$version = minver -i -t v -v w -docker tag unitify-docfx:$version jcr.codebelt.net/geekle/unitify-docfx:$version -docker push jcr.codebelt.net/geekle/unitify-docfx:$version +$version = minver -i -t v -v w +docker tag unitify-docfx:$version jcr.codebelt.net/geekle/unitify-docfx:$version +docker push jcr.codebelt.net/geekle/unitify-docfx:$version diff --git a/.nuget/Codebelt.Unitify/PackageReleaseNotes.txt b/.nuget/Codebelt.Unitify/PackageReleaseNotes.txt index f0b959c..9d788a6 100644 --- a/.nuget/Codebelt.Unitify/PackageReleaseNotes.txt +++ b/.nuget/Codebelt.Unitify/PackageReleaseNotes.txt @@ -1,201 +1,201 @@ -Version: 11.0.0 -Availability: .NET 11 and .NET 10 - -# ALM -- CHANGED Target frameworks by adding .NET 11 (net11.0) and removing .NET 9 (net9.0), so the package now targets .NET 11 and .NET 10 - -Version: 10.0.13 -Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 10.0.12 -Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 10.0.11 -Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 10.0.10 -Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 10.0.9 -Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 10.0.8 -Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 10.0.7 -Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 10.0.6 -Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 10.0.5 -Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 10.0.4 -Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 10.0.3 -Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 10.0.2 -Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 10.0.1 -Availability: .NET 10 and .NET 9 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 10.0.0 -Availability: .NET 10 and .NET 9 - -# ALM -- ADDED Support for TFM .NET 10 (LTS) -- REMOVED Support for TFM .NET 8 (LTS) -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 9.0.8 -Availability: .NET 9 and .NET 8 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 9.0.7 -Availability: .NET 9 and .NET 8 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 9.0.6 -Availability: .NET 9 and .NET 8 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 9.0.5 -Availability: .NET 9 and .NET 8 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 9.0.4 -Availability: .NET 9 and .NET 8 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 9.0.3 -Availability: .NET 9 and .NET 8 - -# ALM -- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) - -Version: 9.0.2 -Availability: .NET 9 and .NET 8 - -# ALM -- CHANGED Dependencies to latest and greatest with respect to TFMs - -Version: 9.0.1 -Availability: .NET 9 and .NET 8 - -# ALM -- CHANGED Dependencies to latest and greatest with respect to TFMs - -Version: 9.0.0 -Availability: .NET 9 and .NET 8 - -# Breaking Changes -- REMOVED BitStorageCapacity class from the Codebelt.Unitify namespace -- REMOVED ByteStorageCapacity class from the Codebelt.Unitify namespace -- REFACTORED StorageCapacity class in the Codebelt.Unitify namespace to DataPrefixTable that represents a table of both binary and metric prefixes for units of measure, optimized for data quantity and transmission measurement standards -- REFACTORED MultipleTable class in the Codebelt.Unitify namespace to PrefixTable that represents a table of unit prefixes, indicating multiples or submultiples of a base unit -- REFACTORED PrefixMultiple class in the Codebelt.Unitify namespace to Prefix that represents the base class from which all implementations of unit prefix that can can be expressed as either a multiple or a submultiple should derive -- REFACTORED IPrefixMultiple interface in the Codebelt.Unitify namespace to IPrefix that defines a unit prefix that can can be expressed as either a multiple or a submultiple of the unit of measurement -- REFACTORED IPrefixUnit interface in the Codebelt.Unitify namespace to not include PrefixValue property -- REFACTORED UnitPrefix enum in the Codebelt.Unitify namespace to PrefixStyle that specifies ways that a string must be represented in terms of prefix style -- REFACTORED PrefixUnit class in the Codebelt.Unitify namespace to a non-abstract class that represents the prefix of a unit of measurement -- REFACTORED UnitPrefixFormatter class in the Codebelt.Unitify namespace to PrefixUnitFormatter that defines the string formatting of objects having an implementation of IPrefixUnit - -# New Features -- ADDED BaseUnit struct in the Codebelt.Unitify namespace that represents a base unit of measurement, including its category, name, and symbol -- ADDED IBaseUnit interface in the Codebelt.Unitify namespace that defines a base unit of measure, including its category, name, and symbol -- ADDED MetricPrefixTable class in the Codebelt.Unitify namespace that represents a table of metric prefixes for units of measure, optimized for metric measurement standards -- ADDED PrefixExtensions class in the Codebelt.Unitify namespace that provides extension methods for the Prefix class: ToPrefixUnit and ToBaseUnit -- ADDED PrefixTableExtensions class in the Codebelt.Unitify namespace that provides extension methods for the PrefixTable class: QuectoOrDefault, RontoOrDefault, YoctoOrDefault, ZeptoOrDefault, AttoOrDefault, FemtoOrDefault, PicoOrDefault, NanoOrDefault, MicroOrDefault, MilliOrDefault, CentiOrDefault, DeciOrDefault, DecaOrDefault, HectoOrDefault, KiloOrDefault, MegaOrDefault, GigaOrDefault, TeraOrDefault, PetaOrDefault, ExaOrDefault, ZettaOrDefault, YottaOrDefault, RonnaOrDefault, QuettaOrDefault, KibiOrDefault, MebiOrDefault, GibiOrDefault, TebiOrDefault, PebiOrDefault, ExbiOrDefault, ZebiOrDefault and YobiOrDefault -- ADDED PrefixUnitExtensions class in the Codebelt.Unitify namespace that provides extension methods for the PrefixUnit class: ToPrefixValue, ToBaseValue, ToBaseUnit, ToPrefixString, ToMetricPrefixTable and ToDataPrefixTable -- ADDED Unit class in the Codebelt.Unitify namespace that represents the base class from which all implementations of a unit of measure should derive -- ADDED UnitFactory class in the Codebelt.Unitify namespace that provides a set of static methods for generating different types of unit of measure and the option to define your own with CreateUnit -- ADDED UnitFormatter class in the Codebelt.Unitify namespace that defines the string formatting of objects having an implementation of IUnit - -Version: 6.0.0 -Availability: .NET Standard 2.0, .NET 5.0 - -# New Features -- ADDED BinaryPrefix class in the Codebelt.Unitify namespace that defines a binary unit prefix for multiples of measurement for data that refers strictly to powers of 2 -- ADDED BitStorageCapacity class in the Codebelt.Unitify namespace that represent a table of both binary and metric prefixes for a BitUnit -- ADDED BitUnit class in the Codebelt.Unitify namespace that represents a unit of measurement for bits and is used with measurement of data -- ADDED ByteStorageCapacity class in the Codebelt.Unitify namespace that represent a table of both binary and metric prefixes for a ByteUnit -- ADDED DecimalPrefix class in the Codebelt.Unitify namespace that defines a decimal (metric) unit prefix for multiples and submultiples of measurement that refers strictly to powers of 10 -- ADDED IPrefixMultiple interface in the Codebelt.Unitify namespace that defines a unit prefix that can can be expressed as a either a multiple or a submultiple of the unit of measurement -- ADDED IUnit interface in the Codebelt.Unitify namespace that defines a unit of measurement that is used as a standard for measurement of the same kind of quantity -- ADDED MultipleTable class in the Codebelt.Unitify namespace that defines a unit of measurement that provides a way to represent a table of both binary and metric prefixes that precedes a unit of measure to indicate a multiple of the unit -- ADDED NamingStyle enum in the Codebelt.Unitify namespace that specifies ways that a string must be represented in terms of naming style -- ADDED UnitFormatOptions class in the Codebelt.Unitify namespace that specifies options related to BitUnit and ByteUnit -- ADDED UnitPrefix enum in the Codebelt.Unitify namespace that specifies the two standards for binary multiples and decimal multiples -- ADDED UnitPrefixFormatter class in the Codebelt.Unitify namespace that defines the string formatting of objects having an implementation of either IPrefixUnit or IUnit -- ADDED PrefixMultiple class in the Codebelt.Unitify namespace that represents the base class from which all implementations of unit prefix that can can be expressed as a either a multiple or a submultiple of the unit of measurement should derive -- ADDED StorageCapacity class in the Codebelt.Unitify namespace that provides a way to represent a table of both binary and metric prefixes that precedes a unit of measure optimized for storage capacity measurement standards -- ADDED StorageCapacityOptions class in the Codebelt.Unitify namespace that specifies options related to StorageCapacity -- ADDED PrefixUnit class in the Codebelt.Unitify namespace that represents the base class from which all implementations of a unit of measurement should derive - -# Improvements -- CHANGED BinaryPrefix in the Codebelt.Unitify namespace from struct to sealed class -- CHANGED DecimalPrefix in the Codebelt.Unitify namespace from struct to sealed class -- REFACTORED MultipleTable in the Codebelt.Unitify namespace to be more generic and moved non-generic functionality to the new StorageCapacity class -- CHANGED BitUnit in the Codebelt.Unitify namespace from struct to sealed class -- CHANGED ByteUnit in the Codebelt.Unitify namespace from struct to sealed class - -# Quality Analysis Actions -- FIXED UnitPrefixFormatter class in the Codebelt.Unitify namespace to be compliant with https://rules.sonarsource.com/csharp/RSPEC-927 -- CHANGED BinaryPrefix class in the Codebelt.Unitify namespace to have 0 duplicated blocks of lines of code -- CHANGED DecimalPrefix class in the Codebelt.Unitify namespace to have 0 duplicated blocks of lines of code -- CHANGED BitUnit class in the Codebelt.Unitify namespace to have 0 duplicated blocks of lines of code -- CHANGED ByteUnit class in the Codebelt.Unitify namespace to have 0 duplicated blocks of lines of code -- CHANGED UnitPrefixFormatter class in the Codebelt.Unitify namespace to be compliant with https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1822 +Version: 11.0.0 +Availability: .NET 11 and .NET 10 + +# ALM +- CHANGED Target frameworks by adding .NET 11 (net11.0) and removing .NET 9 (net9.0), so the package now targets .NET 11 and .NET 10 + +Version: 10.0.13 +Availability: .NET 10 and .NET 9 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 10.0.12 +Availability: .NET 10 and .NET 9 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 10.0.11 +Availability: .NET 10 and .NET 9 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 10.0.10 +Availability: .NET 10 and .NET 9 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 10.0.9 +Availability: .NET 10 and .NET 9 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 10.0.8 +Availability: .NET 10 and .NET 9 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 10.0.7 +Availability: .NET 10 and .NET 9 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 10.0.6 +Availability: .NET 10 and .NET 9 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 10.0.5 +Availability: .NET 10 and .NET 9 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 10.0.4 +Availability: .NET 10 and .NET 9 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 10.0.3 +Availability: .NET 10 and .NET 9 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 10.0.2 +Availability: .NET 10 and .NET 9 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 10.0.1 +Availability: .NET 10 and .NET 9 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 10.0.0 +Availability: .NET 10 and .NET 9 + +# ALM +- ADDED Support for TFM .NET 10 (LTS) +- REMOVED Support for TFM .NET 8 (LTS) +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 9.0.8 +Availability: .NET 9 and .NET 8 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 9.0.7 +Availability: .NET 9 and .NET 8 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 9.0.6 +Availability: .NET 9 and .NET 8 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 9.0.5 +Availability: .NET 9 and .NET 8 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 9.0.4 +Availability: .NET 9 and .NET 8 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 9.0.3 +Availability: .NET 9 and .NET 8 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + +Version: 9.0.2 +Availability: .NET 9 and .NET 8 + +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs + +Version: 9.0.1 +Availability: .NET 9 and .NET 8 + +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs + +Version: 9.0.0 +Availability: .NET 9 and .NET 8 + +# Breaking Changes +- REMOVED BitStorageCapacity class from the Codebelt.Unitify namespace +- REMOVED ByteStorageCapacity class from the Codebelt.Unitify namespace +- REFACTORED StorageCapacity class in the Codebelt.Unitify namespace to DataPrefixTable that represents a table of both binary and metric prefixes for units of measure, optimized for data quantity and transmission measurement standards +- REFACTORED MultipleTable class in the Codebelt.Unitify namespace to PrefixTable that represents a table of unit prefixes, indicating multiples or submultiples of a base unit +- REFACTORED PrefixMultiple class in the Codebelt.Unitify namespace to Prefix that represents the base class from which all implementations of unit prefix that can can be expressed as either a multiple or a submultiple should derive +- REFACTORED IPrefixMultiple interface in the Codebelt.Unitify namespace to IPrefix that defines a unit prefix that can can be expressed as either a multiple or a submultiple of the unit of measurement +- REFACTORED IPrefixUnit interface in the Codebelt.Unitify namespace to not include PrefixValue property +- REFACTORED UnitPrefix enum in the Codebelt.Unitify namespace to PrefixStyle that specifies ways that a string must be represented in terms of prefix style +- REFACTORED PrefixUnit class in the Codebelt.Unitify namespace to a non-abstract class that represents the prefix of a unit of measurement +- REFACTORED UnitPrefixFormatter class in the Codebelt.Unitify namespace to PrefixUnitFormatter that defines the string formatting of objects having an implementation of IPrefixUnit + +# New Features +- ADDED BaseUnit struct in the Codebelt.Unitify namespace that represents a base unit of measurement, including its category, name, and symbol +- ADDED IBaseUnit interface in the Codebelt.Unitify namespace that defines a base unit of measure, including its category, name, and symbol +- ADDED MetricPrefixTable class in the Codebelt.Unitify namespace that represents a table of metric prefixes for units of measure, optimized for metric measurement standards +- ADDED PrefixExtensions class in the Codebelt.Unitify namespace that provides extension methods for the Prefix class: ToPrefixUnit and ToBaseUnit +- ADDED PrefixTableExtensions class in the Codebelt.Unitify namespace that provides extension methods for the PrefixTable class: QuectoOrDefault, RontoOrDefault, YoctoOrDefault, ZeptoOrDefault, AttoOrDefault, FemtoOrDefault, PicoOrDefault, NanoOrDefault, MicroOrDefault, MilliOrDefault, CentiOrDefault, DeciOrDefault, DecaOrDefault, HectoOrDefault, KiloOrDefault, MegaOrDefault, GigaOrDefault, TeraOrDefault, PetaOrDefault, ExaOrDefault, ZettaOrDefault, YottaOrDefault, RonnaOrDefault, QuettaOrDefault, KibiOrDefault, MebiOrDefault, GibiOrDefault, TebiOrDefault, PebiOrDefault, ExbiOrDefault, ZebiOrDefault and YobiOrDefault +- ADDED PrefixUnitExtensions class in the Codebelt.Unitify namespace that provides extension methods for the PrefixUnit class: ToPrefixValue, ToBaseValue, ToBaseUnit, ToPrefixString, ToMetricPrefixTable and ToDataPrefixTable +- ADDED Unit class in the Codebelt.Unitify namespace that represents the base class from which all implementations of a unit of measure should derive +- ADDED UnitFactory class in the Codebelt.Unitify namespace that provides a set of static methods for generating different types of unit of measure and the option to define your own with CreateUnit +- ADDED UnitFormatter class in the Codebelt.Unitify namespace that defines the string formatting of objects having an implementation of IUnit + +Version: 6.0.0 +Availability: .NET Standard 2.0, .NET 5.0 + +# New Features +- ADDED BinaryPrefix class in the Codebelt.Unitify namespace that defines a binary unit prefix for multiples of measurement for data that refers strictly to powers of 2 +- ADDED BitStorageCapacity class in the Codebelt.Unitify namespace that represent a table of both binary and metric prefixes for a BitUnit +- ADDED BitUnit class in the Codebelt.Unitify namespace that represents a unit of measurement for bits and is used with measurement of data +- ADDED ByteStorageCapacity class in the Codebelt.Unitify namespace that represent a table of both binary and metric prefixes for a ByteUnit +- ADDED DecimalPrefix class in the Codebelt.Unitify namespace that defines a decimal (metric) unit prefix for multiples and submultiples of measurement that refers strictly to powers of 10 +- ADDED IPrefixMultiple interface in the Codebelt.Unitify namespace that defines a unit prefix that can can be expressed as a either a multiple or a submultiple of the unit of measurement +- ADDED IUnit interface in the Codebelt.Unitify namespace that defines a unit of measurement that is used as a standard for measurement of the same kind of quantity +- ADDED MultipleTable class in the Codebelt.Unitify namespace that defines a unit of measurement that provides a way to represent a table of both binary and metric prefixes that precedes a unit of measure to indicate a multiple of the unit +- ADDED NamingStyle enum in the Codebelt.Unitify namespace that specifies ways that a string must be represented in terms of naming style +- ADDED UnitFormatOptions class in the Codebelt.Unitify namespace that specifies options related to BitUnit and ByteUnit +- ADDED UnitPrefix enum in the Codebelt.Unitify namespace that specifies the two standards for binary multiples and decimal multiples +- ADDED UnitPrefixFormatter class in the Codebelt.Unitify namespace that defines the string formatting of objects having an implementation of either IPrefixUnit or IUnit +- ADDED PrefixMultiple class in the Codebelt.Unitify namespace that represents the base class from which all implementations of unit prefix that can can be expressed as a either a multiple or a submultiple of the unit of measurement should derive +- ADDED StorageCapacity class in the Codebelt.Unitify namespace that provides a way to represent a table of both binary and metric prefixes that precedes a unit of measure optimized for storage capacity measurement standards +- ADDED StorageCapacityOptions class in the Codebelt.Unitify namespace that specifies options related to StorageCapacity +- ADDED PrefixUnit class in the Codebelt.Unitify namespace that represents the base class from which all implementations of a unit of measurement should derive + +# Improvements +- CHANGED BinaryPrefix in the Codebelt.Unitify namespace from struct to sealed class +- CHANGED DecimalPrefix in the Codebelt.Unitify namespace from struct to sealed class +- REFACTORED MultipleTable in the Codebelt.Unitify namespace to be more generic and moved non-generic functionality to the new StorageCapacity class +- CHANGED BitUnit in the Codebelt.Unitify namespace from struct to sealed class +- CHANGED ByteUnit in the Codebelt.Unitify namespace from struct to sealed class + +# Quality Analysis Actions +- FIXED UnitPrefixFormatter class in the Codebelt.Unitify namespace to be compliant with https://rules.sonarsource.com/csharp/RSPEC-927 +- CHANGED BinaryPrefix class in the Codebelt.Unitify namespace to have 0 duplicated blocks of lines of code +- CHANGED DecimalPrefix class in the Codebelt.Unitify namespace to have 0 duplicated blocks of lines of code +- CHANGED BitUnit class in the Codebelt.Unitify namespace to have 0 duplicated blocks of lines of code +- CHANGED ByteUnit class in the Codebelt.Unitify namespace to have 0 duplicated blocks of lines of code +- CHANGED UnitPrefixFormatter class in the Codebelt.Unitify namespace to be compliant with https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1822 diff --git a/.nuget/Codebelt.Unitify/README.md b/.nuget/Codebelt.Unitify/README.md index 109e8f7..ca35b47 100644 --- a/.nuget/Codebelt.Unitify/README.md +++ b/.nuget/Codebelt.Unitify/README.md @@ -1,15 +1,15 @@ -## About - -An open-source project (MIT license) that offers types that simplify unit management with comprehensive metric and binary support for prefixes, multiples, and submultiples. - -Your versatile "units of measure" companion for modern development with `.NET 11` and `.NET 10`. - -It is, by heart, free, flexible and built to extend and boost your agile codebelt. - -## **Codebelt.Unitify** for .NET - -The `Codebelt.Unitify` namespace offers types that simplify unit management with comprehensive metric and binary support for prefixes, multiples, and submultiples. - -More documentation available at our documentation site: - -- [Codebelt.Unitify](https://unitify.codebelt.net/api/Codebelt.Unitify.html) 🔗 +## About + +An open-source project (MIT license) that offers types that simplify unit management with comprehensive metric and binary support for prefixes, multiples, and submultiples. + +Your versatile "units of measure" companion for modern development with `.NET 11` and `.NET 10`. + +It is, by heart, free, flexible and built to extend and boost your agile codebelt. + +## **Codebelt.Unitify** for .NET + +The `Codebelt.Unitify` namespace offers types that simplify unit management with comprehensive metric and binary support for prefixes, multiples, and submultiples. + +More documentation available at our documentation site: + +- [Codebelt.Unitify](https://unitify.codebelt.net/api/Codebelt.Unitify.html) 🔗