-
-
Notifications
You must be signed in to change notification settings - Fork 4
Add polyfills for Random.NextInt64(...), Random.NextSingle(...), Random.GetItems(...), Random.Shuffle(...), Random.GetHexString(...), Random.GetString(...)
#60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…`Random.GetItems(...)`, `Random.Shuffle(...)`, `Random.GetHexString(...)`, `Random.GetString(...)`
There was a problem hiding this 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 polyfills for six Random class methods to enable their use in older .NET Framework, .NET Standard, and .NET Core versions. The polyfills target methods introduced in .NET 6.0, 8.0, and 10.0.
- Implements
NextInt64,NextSinglefor .NET 6.0 compatibility - Implements
GetItems,Shufflefor .NET 8.0 compatibility - Implements
GetHexString,GetStringfor .NET 10.0 compatibility
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| PolyShim/Signatures.md | Updates documentation to reflect 9 new Random method signatures |
| PolyShim/Net60/Random.cs | Adds polyfills for NextInt64 (3 overloads) and NextSingle |
| PolyShim/Net80/Random.cs | Adds polyfills for GetItems and Shuffle |
| PolyShim/Net100/Random.cs | Adds polyfills for GetHexString and GetString (2 overloads) |
| PolyShim.Tests/Net60/RandomTests.cs | Adds tests for NextInt64 and NextSingle methods |
| PolyShim.Tests/Net80/RandomTests.cs | Adds tests for GetItems and Shuffle methods |
| PolyShim.Tests/Net100/RandomTests.cs | Adds tests for GetHexString and GetString methods |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
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 7 out of 7 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #60 +/- ##
============================
============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.