-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Added AsReadOnly() extension to ISet<T> #106037
Added AsReadOnly() extension to ISet<T> #106037
Conversation
Note regarding the
|
1 similar comment
Note regarding the
|
Yes, the implementation of |
Unfortunately I still get the following error:
|
This is editing the wrong System.Private.CoreLib project file. You instead want to add it to https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems. CoreLib for coreclr, mono, and native aot is slightly different for each. Most of the source is the same, and that shared source is listed in the above projitems file. The file you edited is the one that contains just the additional source specific to coreclr. |
74d8a2c
to
d6050da
Compare
@stephentoub @artl93 can we make an exception and slot this API into .NET 9? It's low risk and complements the newly introduced |
src/libraries/System.Collections/tests/Generic/CollectionExtensionsTests.cs
Outdated
Show resolved
Hide resolved
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.
Thanks
Sorry if I'm misunderstanding this, but if the type is moved from |
@stephentoub Is there something missing that is holding this back? |
This looks ready to merge. I've updated the PR branch to give this another run with more recent bits. |
I believe it will need to updated with type forwards, as suggested in #106037 (comment). |
@Mrxx99 when possible, could you take a look at the outstanding issue? |
I can take a look but I am not familiar with the type forwarders so that could be much work and still would need to be reviewed by one knowledgeable person anyway. Maybe it would be easier if some expert would do it directly. |
6a0f7b3
to
ee5d655
Compare
ed8bfb1
to
b7d1e0e
Compare
/ba-g failures are unrelated |
Thanks |
@stephentoub Thanks for finishing the PR |
this adds the asReadOnly extension method to ISet
unfortunately CollectionExtensions does not find ReadOnlySet, I guess it either has to be moved to System.Private.CoreLib and/or type forwarders have to be added. But I don't know how to do that.
fixes #29387