Skip to content
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

Remove OfType/ToArray usage from ReflectTypeDescriptionProvider #66949

Merged
merged 1 commit into from
Mar 22, 2022

Conversation

stephentoub
Copy link
Member

Under the covers we're getting an array, using OfType to produce a new enumerable that will return everything from the original array, and then ToArray'ing that... we can just return the original array. (These "helper" extension methods really muddy the waters.)

@ghost
Copy link

ghost commented Mar 21, 2022

Tagging subscribers to this area: @dotnet/area-system-componentmodel
See info in area-owners.md if you want to be subscribed.

Issue Details

Under the covers we're getting an array, using OfType to produce a new enumerable that will return everything from the original array, and then ToArray'ing that... we can just return the original array. (These "helper" extension methods really muddy the waters.)

Author: stephentoub
Assignees: stephentoub
Labels:

area-System.ComponentModel

Milestone: -

Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks.

@danmoseley
Copy link
Member

#66694

@eerhardt eerhardt merged commit bf1af7f into dotnet:main Mar 22, 2022
radekdoulik pushed a commit to radekdoulik/runtime that referenced this pull request Mar 30, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Apr 22, 2022
@stephentoub stephentoub deleted the reflectattributes branch May 18, 2022 20:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants