From d3869249bf3ed83f4eb5933ea878795821980c1e Mon Sep 17 00:00:00 2001 From: konard Date: Sat, 13 Sep 2025 02:56:33 +0300 Subject: [PATCH 1/3] Initial commit with task details for issue #68 Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: https://github.com/linksplatform/Exceptions/issues/68 --- CLAUDE.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..0378529 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,5 @@ +Issue to solve: https://github.com/linksplatform/Exceptions/issues/68 +Your prepared branch: issue-68-3059a465 +Your prepared working directory: /tmp/gh-issue-solver-1757721387421 + +Proceed. \ No newline at end of file From f27211aa0f6a50e70ee10e7501c3a071f476711a Mon Sep 17 00:00:00 2001 From: konard Date: Sat, 13 Sep 2025 03:10:08 +0300 Subject: [PATCH 2/3] Move Ensure and ExtensionRoots to Platform.Assertions library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Create new Platform.Assertions library with Ensure functionality - Move Ensure.cs, EnsureExtensions.cs and ExtensionRoots to Platform.Assertions - Update namespaces from Platform.Exceptions to Platform.Assertions - Move all Ensure-related tests to Platform.Assertions.Tests - Update Platform.Exceptions to reference Platform.Assertions - Remove Ensure-related tags from Platform.Exceptions.csproj - Add Platform.Assertions projects to solution file - All tests pass and solution builds successfully 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../EnsuranceTests.cs | 6 +-- .../Ignore/EnsureExtensions.cs | 6 +-- .../Ignore/IgnoredEnsuranceTests.cs | 4 +- .../Platform.Assertions.Tests.csproj | 25 ++++++++++++ .../Ensure.cs | 6 +-- .../EnsureExtensions.cs | 8 ++-- .../EnsureAlwaysExtensionRoot.cs | 4 +- .../EnsureOnDebugExtensionRoot.cs | 4 +- .../Platform.Assertions.csproj | 38 +++++++++++++++++++ csharp/Platform.Exceptions.sln | 28 ++++++++++++++ .../Platform.Exceptions.csproj | 6 ++- 11 files changed, 115 insertions(+), 20 deletions(-) rename csharp/{Platform.Exceptions.Tests => Platform.Assertions.Tests}/EnsuranceTests.cs (61%) rename csharp/{Platform.Exceptions.Tests => Platform.Assertions.Tests}/Ignore/EnsureExtensions.cs (83%) rename csharp/{Platform.Exceptions.Tests => Platform.Assertions.Tests}/Ignore/IgnoredEnsuranceTests.cs (93%) create mode 100644 csharp/Platform.Assertions.Tests/Platform.Assertions.Tests.csproj rename csharp/{Platform.Exceptions => Platform.Assertions}/Ensure.cs (96%) rename csharp/{Platform.Exceptions => Platform.Assertions}/EnsureExtensions.cs (98%) rename csharp/{Platform.Exceptions => Platform.Assertions}/ExtensionRoots/EnsureAlwaysExtensionRoot.cs (85%) rename csharp/{Platform.Exceptions => Platform.Assertions}/ExtensionRoots/EnsureOnDebugExtensionRoot.cs (85%) create mode 100644 csharp/Platform.Assertions/Platform.Assertions.csproj diff --git a/csharp/Platform.Exceptions.Tests/EnsuranceTests.cs b/csharp/Platform.Assertions.Tests/EnsuranceTests.cs similarity index 61% rename from csharp/Platform.Exceptions.Tests/EnsuranceTests.cs rename to csharp/Platform.Assertions.Tests/EnsuranceTests.cs index 2bb4881..ba797de 100644 --- a/csharp/Platform.Exceptions.Tests/EnsuranceTests.cs +++ b/csharp/Platform.Assertions.Tests/EnsuranceTests.cs @@ -1,15 +1,15 @@ using System; using Xunit; -namespace Platform.Exceptions.Tests +namespace Platform.Assertions.Tests { public static class EnsuranceTests { [Fact] public static void ArgumentNotNullEnsuranceTest() { - // Should throw an exception (even if in neighbour "Ignore" namespace it was overridden, but here this namespace is not used) + // Should throw an exception Assert.Throws(() => Ensure.Always.ArgumentNotNull(null, "object")); } } -} +} \ No newline at end of file diff --git a/csharp/Platform.Exceptions.Tests/Ignore/EnsureExtensions.cs b/csharp/Platform.Assertions.Tests/Ignore/EnsureExtensions.cs similarity index 83% rename from csharp/Platform.Exceptions.Tests/Ignore/EnsureExtensions.cs rename to csharp/Platform.Assertions.Tests/Ignore/EnsureExtensions.cs index 676a1c2..2107c6f 100644 --- a/csharp/Platform.Exceptions.Tests/Ignore/EnsureExtensions.cs +++ b/csharp/Platform.Assertions.Tests/Ignore/EnsureExtensions.cs @@ -1,7 +1,7 @@ using System.Diagnostics; -using Platform.Exceptions.ExtensionRoots; +using Platform.Assertions.ExtensionRoots; -namespace Platform.Exceptions.Tests.Ignore +namespace Platform.Assertions.Tests.Ignore { public static class EnsureExtensions { @@ -12,4 +12,4 @@ public static void ArgumentNotNull(this EnsureAlwaysExtensionRoot roo // Override logic to do nothing (this should be used to reduce the overhead of the Ensure checks, when it is critical to performance) } } -} +} \ No newline at end of file diff --git a/csharp/Platform.Exceptions.Tests/Ignore/IgnoredEnsuranceTests.cs b/csharp/Platform.Assertions.Tests/Ignore/IgnoredEnsuranceTests.cs similarity index 93% rename from csharp/Platform.Exceptions.Tests/Ignore/IgnoredEnsuranceTests.cs rename to csharp/Platform.Assertions.Tests/Ignore/IgnoredEnsuranceTests.cs index ed12efa..0c8ad17 100644 --- a/csharp/Platform.Exceptions.Tests/Ignore/IgnoredEnsuranceTests.cs +++ b/csharp/Platform.Assertions.Tests/Ignore/IgnoredEnsuranceTests.cs @@ -1,6 +1,6 @@ using Xunit; -namespace Platform.Exceptions.Tests.Ignore +namespace Platform.Assertions.Tests.Ignore { public static class IgnoredEnsuranceTests { @@ -13,4 +13,4 @@ public static void EnsuranceIgnoredTest() Ensure.Always.ArgumentNotNull(null, "object"); } } -} +} \ No newline at end of file diff --git a/csharp/Platform.Assertions.Tests/Platform.Assertions.Tests.csproj b/csharp/Platform.Assertions.Tests/Platform.Assertions.Tests.csproj new file mode 100644 index 0000000..dfa5cec --- /dev/null +++ b/csharp/Platform.Assertions.Tests/Platform.Assertions.Tests.csproj @@ -0,0 +1,25 @@ + + + + net8 + false + latest + enable + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/csharp/Platform.Exceptions/Ensure.cs b/csharp/Platform.Assertions/Ensure.cs similarity index 96% rename from csharp/Platform.Exceptions/Ensure.cs rename to csharp/Platform.Assertions/Ensure.cs index 295e1fe..149bcbb 100644 --- a/csharp/Platform.Exceptions/Ensure.cs +++ b/csharp/Platform.Assertions/Ensure.cs @@ -1,6 +1,6 @@ -using Platform.Exceptions.ExtensionRoots; +using Platform.Assertions.ExtensionRoots; -namespace Platform.Exceptions +namespace Platform.Assertions { /// /// Contains two extensible classes instances that can be supplemented with static helper methods by using the extension mechanism. These methods ensure the contract compliance. @@ -20,4 +20,4 @@ public static class Ensure /// public static readonly EnsureOnDebugExtensionRoot OnDebug = new EnsureOnDebugExtensionRoot(); } -} +} \ No newline at end of file diff --git a/csharp/Platform.Exceptions/EnsureExtensions.cs b/csharp/Platform.Assertions/EnsureExtensions.cs similarity index 98% rename from csharp/Platform.Exceptions/EnsureExtensions.cs rename to csharp/Platform.Assertions/EnsureExtensions.cs index 83501a6..2deb566 100644 --- a/csharp/Platform.Exceptions/EnsureExtensions.cs +++ b/csharp/Platform.Assertions/EnsureExtensions.cs @@ -1,11 +1,11 @@ using System; using System.Diagnostics; using System.Runtime.CompilerServices; -using Platform.Exceptions.ExtensionRoots; +using Platform.Assertions.ExtensionRoots; #pragma warning disable IDE0060 // Remove unused parameter -namespace Platform.Exceptions +namespace Platform.Assertions { /// /// Provides a set of extension methods for and objects. @@ -161,7 +161,7 @@ public static void ArgumentMeetsCriteria(this EnsureAlwaysExtensionRo /// /// Ensures that the argument meets the criteria. This check is performed only for DEBUG build configuration. - /// Гарантирует, что аргумент соответствует критерию. Эта проверка выполняется только для конфигурации сборки DEBUG. + /// Гарантirует, что аргумент соответствует критерию. Эта проверка выполняется только для конфигурации сборки DEBUG. /// /// Type of argument.Тип аргумента. /// The extension root to which this method is bound.Корень-расширения, к которому привязан этот метод. @@ -172,4 +172,4 @@ public static void ArgumentMeetsCriteria(this EnsureAlwaysExtensionRo #endregion } -} +} \ No newline at end of file diff --git a/csharp/Platform.Exceptions/ExtensionRoots/EnsureAlwaysExtensionRoot.cs b/csharp/Platform.Assertions/ExtensionRoots/EnsureAlwaysExtensionRoot.cs similarity index 85% rename from csharp/Platform.Exceptions/ExtensionRoots/EnsureAlwaysExtensionRoot.cs rename to csharp/Platform.Assertions/ExtensionRoots/EnsureAlwaysExtensionRoot.cs index fa2ddcd..ca8a3ac 100644 --- a/csharp/Platform.Exceptions/ExtensionRoots/EnsureAlwaysExtensionRoot.cs +++ b/csharp/Platform.Assertions/ExtensionRoots/EnsureAlwaysExtensionRoot.cs @@ -1,4 +1,4 @@ -namespace Platform.Exceptions.ExtensionRoots +namespace Platform.Assertions.ExtensionRoots { /// /// Represents the extension root class for Ensure.Always. @@ -7,4 +7,4 @@ namespace Platform.Exceptions.ExtensionRoots public class EnsureAlwaysExtensionRoot { } -} +} \ No newline at end of file diff --git a/csharp/Platform.Exceptions/ExtensionRoots/EnsureOnDebugExtensionRoot.cs b/csharp/Platform.Assertions/ExtensionRoots/EnsureOnDebugExtensionRoot.cs similarity index 85% rename from csharp/Platform.Exceptions/ExtensionRoots/EnsureOnDebugExtensionRoot.cs rename to csharp/Platform.Assertions/ExtensionRoots/EnsureOnDebugExtensionRoot.cs index 73dabae..0f3ba70 100644 --- a/csharp/Platform.Exceptions/ExtensionRoots/EnsureOnDebugExtensionRoot.cs +++ b/csharp/Platform.Assertions/ExtensionRoots/EnsureOnDebugExtensionRoot.cs @@ -1,4 +1,4 @@ -namespace Platform.Exceptions.ExtensionRoots +namespace Platform.Assertions.ExtensionRoots { /// /// Represents the extension root class for Ensure.OnDebug. @@ -7,4 +7,4 @@ namespace Platform.Exceptions.ExtensionRoots public class EnsureOnDebugExtensionRoot { } -} +} \ No newline at end of file diff --git a/csharp/Platform.Assertions/Platform.Assertions.csproj b/csharp/Platform.Assertions/Platform.Assertions.csproj new file mode 100644 index 0000000..3410db5 --- /dev/null +++ b/csharp/Platform.Assertions/Platform.Assertions.csproj @@ -0,0 +1,38 @@ + + + + LinksPlatform's Platform.Assertions Class Library + Konstantin Diachenko + Platform.Assertions + 0.1.0 + Konstantin Diachenko + net8 + Platform.Assertions + Platform.Assertions + LinksPlatform;Assertions;Ensure;EnsureExtensions;ExtensionRoots;EnsureAlwaysExtensionRoot;EnsureOnDebugExtensionRoot + https://raw.githubusercontent.com/linksplatform/Documentation/18469f4d033ee9a5b7b84caab9c585acab2ac519/doc/Avatar-rainbow-icon-64x64.png + https://linksplatform.github.io/Assertions + Unlicense + git + git://github.com/linksplatform/Assertions + false + false + true + true + true + true + snupkg + latest + Initial release with assertion functionality moved from Platform.Exceptions. + enable + + + + + + + + + + + \ No newline at end of file diff --git a/csharp/Platform.Exceptions.sln b/csharp/Platform.Exceptions.sln index e44d38a..e283a8f 100644 --- a/csharp/Platform.Exceptions.sln +++ b/csharp/Platform.Exceptions.sln @@ -6,6 +6,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Platform.Exceptions", "Plat EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Platform.Exceptions.Tests", "Platform.Exceptions.Tests\Platform.Exceptions.Tests.csproj", "{1B2D5587-35A6-42B4-A3DA-271AEFBD4DDD}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Platform.Assertions", "Platform.Assertions\Platform.Assertions.csproj", "{B5A89421-3053-41A9-B0C5-ED1308631615}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Platform.Assertions.Tests", "Platform.Assertions.Tests\Platform.Assertions.Tests.csproj", "{2B2D5587-35A6-42B4-A3DA-271AEFBD4DDE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -40,6 +44,30 @@ Global {1B2D5587-35A6-42B4-A3DA-271AEFBD4DDD}.Release|x64.Build.0 = Release|Any CPU {1B2D5587-35A6-42B4-A3DA-271AEFBD4DDD}.Release|x86.ActiveCfg = Release|Any CPU {1B2D5587-35A6-42B4-A3DA-271AEFBD4DDD}.Release|x86.Build.0 = Release|Any CPU + {B5A89421-3053-41A9-B0C5-ED1308631615}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B5A89421-3053-41A9-B0C5-ED1308631615}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B5A89421-3053-41A9-B0C5-ED1308631615}.Debug|x64.ActiveCfg = Debug|Any CPU + {B5A89421-3053-41A9-B0C5-ED1308631615}.Debug|x64.Build.0 = Debug|Any CPU + {B5A89421-3053-41A9-B0C5-ED1308631615}.Debug|x86.ActiveCfg = Debug|Any CPU + {B5A89421-3053-41A9-B0C5-ED1308631615}.Debug|x86.Build.0 = Debug|Any CPU + {B5A89421-3053-41A9-B0C5-ED1308631615}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B5A89421-3053-41A9-B0C5-ED1308631615}.Release|Any CPU.Build.0 = Release|Any CPU + {B5A89421-3053-41A9-B0C5-ED1308631615}.Release|x64.ActiveCfg = Release|Any CPU + {B5A89421-3053-41A9-B0C5-ED1308631615}.Release|x64.Build.0 = Release|Any CPU + {B5A89421-3053-41A9-B0C5-ED1308631615}.Release|x86.ActiveCfg = Release|Any CPU + {B5A89421-3053-41A9-B0C5-ED1308631615}.Release|x86.Build.0 = Release|Any CPU + {2B2D5587-35A6-42B4-A3DA-271AEFBD4DDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2B2D5587-35A6-42B4-A3DA-271AEFBD4DDE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2B2D5587-35A6-42B4-A3DA-271AEFBD4DDE}.Debug|x64.ActiveCfg = Debug|Any CPU + {2B2D5587-35A6-42B4-A3DA-271AEFBD4DDE}.Debug|x64.Build.0 = Debug|Any CPU + {2B2D5587-35A6-42B4-A3DA-271AEFBD4DDE}.Debug|x86.ActiveCfg = Debug|Any CPU + {2B2D5587-35A6-42B4-A3DA-271AEFBD4DDE}.Debug|x86.Build.0 = Debug|Any CPU + {2B2D5587-35A6-42B4-A3DA-271AEFBD4DDE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2B2D5587-35A6-42B4-A3DA-271AEFBD4DDE}.Release|Any CPU.Build.0 = Release|Any CPU + {2B2D5587-35A6-42B4-A3DA-271AEFBD4DDE}.Release|x64.ActiveCfg = Release|Any CPU + {2B2D5587-35A6-42B4-A3DA-271AEFBD4DDE}.Release|x64.Build.0 = Release|Any CPU + {2B2D5587-35A6-42B4-A3DA-271AEFBD4DDE}.Release|x86.ActiveCfg = Release|Any CPU + {2B2D5587-35A6-42B4-A3DA-271AEFBD4DDE}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/csharp/Platform.Exceptions/Platform.Exceptions.csproj b/csharp/Platform.Exceptions/Platform.Exceptions.csproj index fde4379..e2c831c 100644 --- a/csharp/Platform.Exceptions/Platform.Exceptions.csproj +++ b/csharp/Platform.Exceptions/Platform.Exceptions.csproj @@ -9,7 +9,7 @@ net8 Platform.Exceptions Platform.Exceptions - LinksPlatform;Exceptions;Ensure;EnsureExtensions;ExceptionExtensions;IgnoredExceptions;Throw;ThrowExtensions;ExtensionRoots;EnsureAlwaysExtensionRoot;EnsureOnDebugExtensionRoot;ThrowExtensionRoot + LinksPlatform;Exceptions;ExceptionExtensions;IgnoredExceptions;Throw;ThrowExtensions;ExtensionRoots;ThrowExtensionRoot https://raw.githubusercontent.com/linksplatform/Documentation/18469f4d033ee9a5b7b84caab9c585acab2ac519/doc/Avatar-rainbow-icon-64x64.png https://linksplatform.github.io/Exceptions Unlicense @@ -35,6 +35,10 @@ + + + + From 75a670304256412b63c21ec771468cc8e9b31648 Mon Sep 17 00:00:00 2001 From: konard Date: Sat, 13 Sep 2025 03:10:57 +0300 Subject: [PATCH 3/3] Remove CLAUDE.md - Claude command completed --- CLAUDE.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 0378529..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,5 +0,0 @@ -Issue to solve: https://github.com/linksplatform/Exceptions/issues/68 -Your prepared branch: issue-68-3059a465 -Your prepared working directory: /tmp/gh-issue-solver-1757721387421 - -Proceed. \ No newline at end of file