Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Tyrrrz/PolyShim
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.5
Choose a base ref
...
head repository: Tyrrrz/PolyShim
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.6
Choose a head ref
  • 10 commits
  • 145 files changed
  • 3 contributors

Commits on Feb 16, 2026

  1. Add Span<T>.Contains extension methods for older frameworks (#74)

    * Initial plan
    
    * Add Span<T>.Contains and ReadOnlySpan<T>.Contains extension methods for System.Memory package
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Address code review feedback: simplify conditional directive and restore Signatures.md
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Restore original Signatures.md content
    
    * Add Span<T>.Contains extension methods for System.Memory package
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Address PR feedback: fix conditional compilation, merge tests, restore Signatures.md
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Address feedback: move Contains to MemoryExtensions.cs, remove redundant test code
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Fix List-Signatures.ps1 to work on Linux by supporting forward slashes in path regex
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Move Contains polyfills from MemoryExtensions.cs to separate SpanPolyfills.cs file
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Rename SpanPolyfills.cs to MemoryExtensions.Contains.cs and add explanatory comment
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Add ExcludeFromCodeCoverage attribute to System.PolyfillExtensions in MemoryExtensions.Contains.cs
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    Copilot and Tyrrrz authored Feb 16, 2026
    Configuration menu
    Copy the full SHA
    15c5ec3 View commit details
    Browse the repository at this point in the history
  2. Replace shared PolyfillExtensions partial class with unique per-file …

    …extension classes (#75)
    
    * Initial plan
    
    * Replace PolyfillExtensions with unique MemberPolyfills_* classes
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Remove redundant ExcludeFromCodeCoverage from nested class
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Remove redundant using directives from attribute files
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    Copilot and Tyrrrz authored Feb 16, 2026
    Configuration menu
    Copy the full SHA
    7585585 View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2026

  1. Add polyfills for RandomNumberGenerator class and `Fill(Span<byte>)…

    …` method (#76)
    
    * Initial plan
    
    * Add RandomNumberGenerator.Fill polyfill with review feedback addressed
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Address code review feedback: move CopyTo inside using block and add empty span test
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Add null check for RandomNumberGenerator.Create and improve test assertion
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Remove unnecessary null check and clarify test assertion comment
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Address PR feedback: simplify compilation guards, improve test assertions, use try-finally for disposal
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Use scoped using declaration (using var) with conditional compilation for net35
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Remove NET35 conditional by casting to IDisposable in using statement
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Add RandomNumberGenerator polyfill for netstandard<1.3, use try-finally, remove comment
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Move RandomNumberGenerator class polyfill to NetCore10, use Random wrapper, add IDisposable cast comment
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Use arrow method for GetBytes, reorder Dispose methods
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Move buffer allocation inside try, add period to comment, fix signature script to detect abstract classes
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    Copilot and Tyrrrz authored Feb 17, 2026
    Configuration menu
    Copy the full SHA
    66a278d View commit details
    Browse the repository at this point in the history
  2. Add missing RandomNumberGenerator polyfills for .NET Core 2.0-3.0, .N…

    …ET 6.0-8.0 (#77)
    
    * Initial plan
    
    * Add RandomNumberGenerator polyfills for Net60, Net80, and Net90
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Add documentation URL to RandomNumberGenerator type polyfill
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Address code review feedback: improve error messages and add clarity to bias rejection logic
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Fix TFM boundaries: move GetHexString and GetString to Net80
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Add additional RandomNumberGenerator polyfills: GetBytes(int), GetNonZeroBytes, GetItems/Shuffle span overloads
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Add GetBytes(Span<byte>) instance method to RandomNumberGenerator
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Address code review feedback: fix GC pressure, overflow checks, and exception types
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Reorganize RandomNumberGenerator polyfills by correct TFM and remove guards
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Address code review: simplify test names, use Linq/using statements, use arrow methods
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Add 0-100 loops to random tests, use Linq for all array checks, restore comment
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Refactor polyfills: add loop to partial array test, use OnlyContain, reuse GetItems, use GetInt32 for GetNonZeroBytes, reorder methods
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Fix test AAA pattern: add blank lines between Arrange-Act-Assert sections, use GetInt32 in GetNonZeroBytes Span
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    Copilot and Tyrrrz authored Feb 17, 2026
    Configuration menu
    Copy the full SHA
    7f86257 View commit details
    Browse the repository at this point in the history
  3. Optimize large buffer allocations with ArrayPool (#78)

    * Initial plan
    
    * Replace array allocations with ArrayPool for memory optimization
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Revert ArrayPool changes for small buffers - not beneficial
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Fix TextReader.ReadAsync to correctly slice pooled buffer
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Add buffer size constants for clarity and consistency
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Address PR feedback: rename variable, inline expressions, use MemoryPool, read full buffer
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Address feedback: rename to buffer, append char-by-char, simplify slicing, use MemoryPool in File
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Inline span variable access in char-by-char append loops
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Incorporate review feedback: use ArrayPool with array-based ReadAsync, chunk append, slice and clear RNG buffer
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    Copilot and Tyrrrz authored Feb 17, 2026
    Configuration menu
    Copy the full SHA
    cc8bb0e View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2026

  1. Add polyfills for TimeProvider and ITimer (#79)

    * Initial plan
    
    * Add TimeProvider and ITimer polyfills for .NET 8
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Update README to mention Microsoft.Bcl.TimeProvider compatibility package
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Address code review feedback: simplify conditionals, remove guards, use polyfilled APIs
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Address review feedback: remove conditional for Tasks using, inline System property, add comments, fix conditionals
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Address review: add polyfills, reorganize properties, remove guards, simplify code
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Address review: fix timer disposal, use CancelAfter, move guards to members
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Address review: separate conditionals, add comments, fix registration disposal, use FromCanceled, simplify logic
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Fix folder naming: move polyfills to NetCore10, dispose timer in ContinueWith, pass cancellation token, move comment
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Refactor Task polyfills: move FromCanceled after FromResult, add generic version, limit Delay to pre-NET45, move TimerCallback to NetCore10
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Refine polyfills: simplify delay check, move FromCanceled after FromResult, use non-generic TCS, remove redundant disposal
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Make TimeProvider methods virtual for testability, use object type for FromCanceled, simplify Task.Delay, return continuation task
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Merge timer declaration and assignment in Task.Delay
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Remove Delay and CreateCancellationTokenSource methods - not part of TimeProvider API
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Update PolyShim/NetCore10/Task.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    3 people authored Feb 18, 2026
    Configuration menu
    Copy the full SHA
    328ab8f View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2026

  1. Add polyfills for Interlocked.And and Interlocked.Or (#80)

    * Initial plan
    
    * Add Interlocked.Or<T> and Interlocked.And<T> polyfills with tests
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Fix Interlocked polyfills - use generic CompareExchange and fix test data types
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Add comment about NET11 conditional compilation
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Address PR feedback: simplify implementation, remove Theory tests, fix conditionals
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Add specific overloads for int/uint/long/ulong, remove namespace qualification
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Refactor to use unsafe pointers for non-generic overloads, keep Unsafe for generic methods
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Extend Interlocked polyfills to support .NET Standard 2.0+ by implementing And/Or with CompareExchange
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Extend Interlocked polyfills to all TFMs using standard Net100 pattern
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Refactor: Move non-generic Interlocked.And/Or to Net50, keep generic methods in Net100
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Fix CompareExchange loop logic in Net50/Interlocked.cs
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Remove generic Interlocked.And<T> and Interlocked.Or<T> polyfills - these methods don't exist in .NET
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Fix return values - And/Or methods should return original value, not new value
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Address PR feedback: simplify test names, reorder methods, add ALLOW_UNSAFE_BLOCKS check
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Remove unsafe modifier from method signatures, use internal unsafe blocks instead
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Reset Signatures.md to original version before merge
    
    * Regenerate Signatures.md after merging master
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    Copilot and Tyrrrz authored Feb 19, 2026
    Configuration menu
    Copy the full SHA
    9bb9128 View commit details
    Browse the repository at this point in the history
  2. Clean up

    Tyrrrz committed Feb 19, 2026
    Configuration menu
    Copy the full SHA
    88d317b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8a9074f View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2026

  1. Add Timer class polyfill for .NET Standard 1.0–1.1 via Task.Delay (

    …#81)
    
    * Initial plan
    
    * Add Timer class polyfill for .NET Standard 1.0-1.1 using Task.Delay
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Remove Timer tests (can't run against netstandard 1.0-1.1 targets)
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Address review feedback on Timer polyfill
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Fix callback exception surfacing in Timer polyfill
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Inline ValidateTimes; fix Dispose CTS leak
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Update PolyShim/NetCore10/Timer.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Fix period==0 behavior, Dispose/Change race, and null callback validation
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Refactor Start to accept CancellationToken instead of CancellationTokenSource
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Inline CreateAndSchedule into Schedule; keep CreateCts for field initializer only
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Remove CreateCts by making _cts nullable with lazy init via primary constructor refactor
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Move Start after CTS exchange; null-check callback in full-arg constructor
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Update PolyShim/NetCore10/Timer.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Guard cts.Cancel() against ObjectDisposedException in Dispose/Schedule race recheck
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    * Guard oldCts.Cancel() against ObjectDisposedException in Schedule
    
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    3 people authored Feb 20, 2026
    Configuration menu
    Copy the full SHA
    8d7308a View commit details
    Browse the repository at this point in the history
Loading