Skip to content

Initial development#1

Merged
Chris-Wolfgang merged 4 commits into
mainfrom
development
Jan 18, 2026
Merged

Initial development#1
Chris-Wolfgang merged 4 commits into
mainfrom
development

Conversation

@Chris-Wolfgang

Copy link
Copy Markdown
Owner

Description

Fixes/Complete # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactor

How Has This Been Tested?

  • Test A
  • Test B

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Screenshots (if applicable)

Additional context

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request represents the initial development of a .NET library providing extension methods for types implementing IComparable. The PR transforms the repository from a template into a working project with comprehensive multi-framework support, examples, and CI/CD infrastructure.

Changes:

  • Adds IsBetween and IsInRange extension methods for IComparable types with comprehensive unit tests
  • Configures multi-framework targeting (.NET Framework 4.6.2-4.8.1, .NET Standard 2.0, .NET 5.0-9.0)
  • Implements enhanced CI/CD workflows with staged testing, coverage gating (90% threshold), and security scanning

Reviewed changes

Copilot reviewed 17 out of 23 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Wolfgang.Extensions.IComparable/Wolfgang.Extensions.IComparable.csproj Main library project configuration with multi-framework targeting and NuGet package metadata
src/Wolfgang.Extensions.IComparable/IComparableExtensions.cs Core extension methods (IsBetween, IsInRange) for IComparable types
src/Wolfgang.Extensions.IComparable/icon.ico Package icon for NuGet
tests/Wolfgang.Extensions.IComparable.Tests.Unit/Wolfgang.Extensions.IComparable.Tests.Unit.csproj Test project with extensive framework coverage
tests/Wolfgang.Extensions.IComparable.Tests.Unit/IComparableExtensionsTests.cs Comprehensive unit tests covering integers, dates, strings, and chars
examples/Wolfgang.Extensions.IComparable.DotNet8.Example1/* .NET 8.0 console example demonstrating extension method usage
examples/Wolfgang.Extensions.IComparable.DotNet462.Example1/* .NET Framework 4.6.2 example project
README.md Updated project description
.gitignore Added test results and coverage report exclusions
.github/workflows/pr.yaml Enhanced PR validation with 3-stage testing and coverage gating
.github/workflows/release.yaml Updated release workflow for Windows-only builds
.github/workflows/docfx.yaml Updated documentation build workflow
.github/workflows/create-labels.yaml Enhanced label creation with better error handling
assets/icon.png Package icon asset

Comment thread src/Wolfgang.Extensions.IComparable/Wolfgang.Extensions.IComparable.csproj Outdated
Comment thread src/Wolfgang.Extensions.IComparable/IComparableExtensions.cs Outdated
Comment thread README.md Outdated
Comment thread src/Wolfgang.Extensions.IComparable/IComparableExtensions.cs Outdated
Chris-Wolfgang and others added 3 commits January 18, 2026 16:01
…rable.csproj

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Chris-Wolfgang Chris-Wolfgang merged commit 4b57a50 into main Jan 18, 2026
9 checks passed
@Chris-Wolfgang Chris-Wolfgang deleted the development branch January 18, 2026 21:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 23 changed files in this pull request and generated 5 comments.

Comment on lines +12 to +14
{
}
}

Copilot AI Jan 18, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Main method is empty and does not demonstrate the usage of the IComparable extension methods. This example project should contain actual demonstration code similar to the DotNet8.Example1 project, or it should be removed as it provides no value to users.

Suggested change
{
}
}
{
int value = 5;
int lower = 1;
int upper = 10;
bool isBetweenInts = value.IsBetween(lower, upper);
Console.WriteLine($"{value} is between {lower} and {upper}: {isBetweenInts}");
int otherValue = 7;
Console.WriteLine($"{value} < {otherValue}: {value.IsLessThan(otherValue)}");
Console.WriteLine($"{value} > {otherValue}: {value.IsGreaterThan(otherValue)}");
string text = "m";
string textLower = "a";
string textUpper = "z";
bool isBetweenStrings = text.IsBetween(textLower, textUpper);
Console.WriteLine($"\"{text}\" is between \"{textLower}\" and \"{textUpper}\": {isBetweenStrings}");
}
}
internal static class ComparableExtensions
{
public static bool IsBetween<T>(this T value, T min, T max)
where T : IComparable<T>
{
if (value == null)
{
throw new ArgumentNullException(nameof(value));
}
return value.CompareTo(min) >= 0 && value.CompareTo(max) <= 0;
}
public static bool IsLessThan<T>(this T value, T other)
where T : IComparable<T>
{
if (value == null)
{
throw new ArgumentNullException(nameof(value));
}
return value.CompareTo(other) < 0;
}
public static bool IsGreaterThan<T>(this T value, T other)
where T : IComparable<T>
{
if (value == null)
{
throw new ArgumentNullException(nameof(value));
}
return value.CompareTo(other) > 0;
}
}

Copilot uses AI. Check for mistakes.
Comment on lines +103 to +109
<ItemGroup Condition="
'$(TargetFramework)' == 'net8.0' or
'$(TargetFramework)' == 'net9.0' or
'$(TargetFramework)' == 'net10.0'
">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.0">

Copilot AI Jan 18, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conditional package references for .NET 8.0-10.0 specify xunit.runner.visualstudio version 3.0.0, but this version may not be compatible with .NET 10.0 since .NET 10.0 does not exist yet. Once .NET 10.0 is removed from the target frameworks, this comment can be ignored, but the versioning strategy should be reviewed to ensure compatibility.

Copilot uses AI. Check for mistakes.
Comment thread README.md
Comment on lines +1 to +5
# Wolfgang.Extensions.IComparable

This repository is intended to be used as a template for creating other repositories.
A collection of extension methods for the `IComparable` struct in C#.

## Methods

Copilot AI Jan 18, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README.md file is incomplete. It contains only a title and a "Methods" heading with no actual content. Users need documentation explaining what the library does, how to install it, and how to use the IsBetween and IsInRange extension methods with examples.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/pr.yaml
echo ""

failed_projects=""
threshold=90

Copilot AI Jan 18, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The coverage threshold is set to 90%, but according to the repository template guidelines, the minimum required coverage is 80%. This higher threshold may be intentional, but it deviates from the documented template standard and could cause unnecessary build failures.

Copilot uses AI. Check for mistakes.
<Copyright>Copyright 2026 Chris Wolfgang </Copyright>
<PackageProjectUrl>https://github.com/Chris-Wolfgang/Wolfgang.Extensions.IComparable</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<AssemblyVersion>1.0.0</AssemblyVersion>

Copilot AI Jan 18, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package version is set to "0.1.0-rc1" (release candidate), but the AssemblyVersion is set to "1.0.0". This version mismatch could cause confusion. The AssemblyVersion should typically match the major version of the package version, or both should use the same version number for consistency.

Suggested change
<AssemblyVersion>1.0.0</AssemblyVersion>
<AssemblyVersion>0.1.0</AssemblyVersion>

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants