Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

[ReadOnly]RefEnumerable<T>.DangerousCreate static constructors - #3645

Merged
Sergio0694 merged 4 commits into
CommunityToolkit:masterfrom
Sergio0694:feature/dangerous-ref-enumerable
Feb 12, 2021
Merged

[ReadOnly]RefEnumerable<T>.DangerousCreate static constructors#3645
Sergio0694 merged 4 commits into
CommunityToolkit:masterfrom
Sergio0694:feature/dangerous-ref-enumerable

Conversation

@Sergio0694

Copy link
Copy Markdown
Member

Closes #3641

PR Type

What kind of change does this PR introduce?

  • Feature

What is the current behavior?

There is no way to manually create a RefEnumerable<T> or a ReadOnlyRefEnumerable<T> instance.

What is the new behavior?

This PR adds a new [ReadOnly]RefEnumerable<T>.DangerousCreate static constructor.
This gives the two types feature parity on this front with the likes of [ReadOnly]Span2D<T>, that expose this API.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Pull Request has been submitted to the documentation repository instructions. Link:
  • Sample in sample app has been added / updated (for bug fixes / features)
  • New major technical changes in the toolkit have or will be added to the Wiki e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

@Sergio0694 Sergio0694 added feature request 📬 A request for new changes to improve functionality high-performance 🚂 Issues/PRs for the Microsoft.Toolkit.HighPerformance package labels Dec 22, 2020
@Sergio0694 Sergio0694 added this to the 7.0 milestone Dec 22, 2020
@ghost ghost added the in progress 🚧 label Dec 22, 2020
@ghost

ghost commented Dec 22, 2020

Copy link
Copy Markdown

Thanks Sergio0694 for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@ghost ghost removed this from the 7.0 milestone Jan 6, 2021
@Kyaa-dost Kyaa-dost added this to the 7.0 milestone Jan 7, 2021
@Kyaa-dost Kyaa-dost added feature 💡 and removed feature request 📬 A request for new changes to improve functionality labels Jan 21, 2021
@Sergio0694
Sergio0694 force-pushed the feature/dangerous-ref-enumerable branch from 110e88a to 3fae98f Compare February 8, 2021 19:26
@michael-hawker michael-hawker added the next preview ✈️ Label for marking what we want to include in the next preview release for developers to try. label Feb 8, 2021
@ghost

ghost commented Feb 11, 2021

Copy link
Copy Markdown

Hello @michael-hawker!

Because this pull request has the auto merge :zap: label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@Sergio0694
Sergio0694 force-pushed the feature/dangerous-ref-enumerable branch from 3fae98f to 24c1288 Compare February 11, 2021 23:11
@michael-hawker

Copy link
Copy Markdown
Member

Re-kicked the build due to the transient ColorCode issue.

@Sergio0694
Sergio0694 force-pushed the feature/dangerous-ref-enumerable branch from 24c1288 to d57b5d0 Compare February 12, 2021 21:36
@Sergio0694
Sergio0694 merged commit d437373 into CommunityToolkit:master Feb 12, 2021
@Sergio0694
Sergio0694 deleted the feature/dangerous-ref-enumerable branch February 12, 2021 23:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

auto merge ⚡ feature 💡 high-performance 🚂 Issues/PRs for the Microsoft.Toolkit.HighPerformance package in progress 🚧 next preview ✈️ Label for marking what we want to include in the next preview release for developers to try.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Support for creating a RefEnumerable manually

4 participants