Skip to content

Conversation

@Tyrrrz
Copy link
Owner

@Tyrrrz Tyrrrz commented Nov 27, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 27, 2025 14:52
@Tyrrrz Tyrrrz added the enhancement New feature or request label Nov 27, 2025
Copilot finished reviewing on behalf of Tyrrrz November 27, 2025 14:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds polyfill implementations for Queue<T>.TryDequeue(out T?) and Queue<T>.TryPeek(out T?) methods, which were introduced in .NET Core 2.0. These polyfills enable older frameworks (.NET Framework, .NET Core 1.x, and .NET Standard < 2.1) to use these convenient "Try" pattern methods that safely attempt to dequeue or peek at queue elements without throwing exceptions when the queue is empty.

Key changes:

  • Added polyfill implementations for Queue<T>.TryDequeue and Queue<T>.TryPeek in PolyShim/NetCore20/Queue.cs
  • Added comprehensive unit tests covering both success and failure scenarios
  • Updated documentation to reflect the two new method signatures

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
PolyShim/NetCore20/Queue.cs Implements polyfills for TryDequeue and TryPeek methods on Queue<T> using check-then-act pattern with Count property
PolyShim.Tests/NetCore20/QueueTests.cs Adds comprehensive test coverage for both methods including empty queue, multiple elements, and peek-after-dequeue scenarios
PolyShim/Signatures.md Updates total signature counts and adds documentation entries for the two new Queue methods

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Tyrrrz Tyrrrz merged commit 95420f0 into master Nov 27, 2025
3 checks passed
@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (fff75c2) to head (1eab9e8).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@     Coverage Diff      @@
##   master   #48   +/-   ##
============================
============================

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants