From 7ffb903637837ff39605457d9fbe0624c639bc6c Mon Sep 17 00:00:00 2001 From: konard Date: Sun, 14 Sep 2025 04:45:47 +0300 Subject: [PATCH 1/3] Initial commit with task details for issue #30 Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: https://github.com/linksplatform/Ranges/issues/30 --- 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..d37e8b1 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,5 @@ +Issue to solve: https://github.com/linksplatform/Ranges/issues/30 +Your prepared branch: issue-30-c6b6c2d5 +Your prepared working directory: /tmp/gh-issue-solver-1757814344355 + +Proceed. \ No newline at end of file From af0574492c3012074aa7a06dd09c8eee1a8595f6 Mon Sep 17 00:00:00 2001 From: konard Date: Sun, 14 Sep 2025 04:50:28 +0300 Subject: [PATCH 2/3] Add Positive static properties to Range class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implements issue #30 by adding PositiveInt64, PositiveInt32, PositiveInt16, and PositiveSByte static properties to the Range class. These properties provide ranges starting from 1 to the respective maximum values, replacing the need for tuple patterns like (1L, long.MaxValue). - Added Range.PositiveInt64 for (1L, long.MaxValue) replacement - Added Range.PositiveInt32, PositiveInt16, PositiveSByte for consistency - Added comprehensive unit tests for all new positive range properties - All tests pass and build is successful 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- csharp/Platform.Ranges.Tests/RangeTests.cs | 16 +++++++++++++++ csharp/Platform.Ranges/Range.cs | 24 ++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/csharp/Platform.Ranges.Tests/RangeTests.cs b/csharp/Platform.Ranges.Tests/RangeTests.cs index 8806ded..61025c4 100644 --- a/csharp/Platform.Ranges.Tests/RangeTests.cs +++ b/csharp/Platform.Ranges.Tests/RangeTests.cs @@ -53,5 +53,21 @@ public static void EqualityTest() Assert.True(range1 != range2); Assert.NotEqual(range1, range2); } + + [Fact] + public static void PositiveRangesTest() + { + Assert.Equal(1, Range.PositiveSByte.Minimum); + Assert.Equal(sbyte.MaxValue, Range.PositiveSByte.Maximum); + + Assert.Equal(1, Range.PositiveInt16.Minimum); + Assert.Equal(short.MaxValue, Range.PositiveInt16.Maximum); + + Assert.Equal(1, Range.PositiveInt32.Minimum); + Assert.Equal(int.MaxValue, Range.PositiveInt32.Maximum); + + Assert.Equal(1L, Range.PositiveInt64.Minimum); + Assert.Equal(long.MaxValue, Range.PositiveInt64.Maximum); + } } } diff --git a/csharp/Platform.Ranges/Range.cs b/csharp/Platform.Ranges/Range.cs index 33422cd..516aa8a 100644 --- a/csharp/Platform.Ranges/Range.cs +++ b/csharp/Platform.Ranges/Range.cs @@ -71,5 +71,29 @@ public static class Range /// Возвращает весь диапазон значений . /// public static readonly Range Decimal = new Range(decimal.MinValue, decimal.MaxValue); + + /// + /// Gets the positive values range (from 1 to ). + /// Возвращает положительный диапазон значений (от 1 до ). + /// + public static readonly Range PositiveSByte = new Range(1, sbyte.MaxValue); + + /// + /// Gets the positive values range (from 1 to ). + /// Возвращает положительный диапазон значений (от 1 до ). + /// + public static readonly Range PositiveInt16 = new Range(1, short.MaxValue); + + /// + /// Gets the positive values range (from 1 to ). + /// Возвращает положительный диапазон значений (от 1 до ). + /// + public static readonly Range PositiveInt32 = new Range(1, int.MaxValue); + + /// + /// Gets the positive values range (from 1 to ). + /// Возвращает положительный диапазон значений (от 1 до ). + /// + public static readonly Range PositiveInt64 = new Range(1L, long.MaxValue); } } From 687e5fbe2e27a28d33cfcedec40121f5ed3c8b50 Mon Sep 17 00:00:00 2001 From: konard Date: Sun, 14 Sep 2025 04:51:08 +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 d37e8b1..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,5 +0,0 @@ -Issue to solve: https://github.com/linksplatform/Ranges/issues/30 -Your prepared branch: issue-30-c6b6c2d5 -Your prepared working directory: /tmp/gh-issue-solver-1757814344355 - -Proceed. \ No newline at end of file