Skip to content

Add generic version of Sequence for any number type#893

Merged
atifaziz merged 8 commits intomorelinq:masterfrom
atifaziz:generic-number-sequence
Sep 23, 2024
Merged

Add generic version of Sequence for any number type#893
atifaziz merged 8 commits intomorelinq:masterfrom
atifaziz:generic-number-sequence

Conversation

@atifaziz
Copy link
Member

@atifaziz atifaziz commented Nov 19, 2022

This PR adds a generic version of Sequence as described in #892.

Under .NET 7, Sequence(int, int, int) defers to Sequence<T>(T, T, T) and is therefore tested for when T is int.

@atifaziz atifaziz linked an issue Nov 19, 2022 that may be closed by this pull request
@atifaziz atifaziz force-pushed the generic-number-sequence branch from 399fbc4 to f1bf4e8 Compare November 19, 2022 14:46
@atifaziz atifaziz marked this pull request as ready for review November 19, 2022 16:08
@codecov
Copy link

codecov bot commented Nov 19, 2022

Codecov Report

Attention: Patch coverage is 94.44444% with 1 line in your changes missing coverage. Please review.

Project coverage is 93.22%. Comparing base (5dc9e18) to head (1ac5b79).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
MoreLinq/Sequence.cs 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #893      +/-   ##
==========================================
- Coverage   93.23%   93.22%   -0.01%     
==========================================
  Files         112      112              
  Lines        3400     3410      +10     
  Branches      962      962              
==========================================
+ Hits         3170     3179       +9     
- Misses        214      215       +1     
  Partials       16       16              
Flag Coverage Δ
93.22% <94.44%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@viceroypenguin
Copy link
Contributor

Approved in principle. Will wait to give final approval.

Copy link
Contributor

@viceroypenguin viceroypenguin left a comment

Choose a reason for hiding this comment

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

This PR should wait until v4.0.0, along with .net7 release. Expectation is that v3.4.0 is existing changes plus nullability fixes to include at most .net6 (including conflicting behavior in certain methods). Future improvements should be delayed until after 3.4.0 is released.

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.

Generic Sequence for any number type

2 participants