CollectionsMarshal.GetValueRef(Dictionary)#49388
Conversation
|
Tagging subscribers to this area: @eiriktsarpalis Issue DetailsStill needs doc comments and tests Resolves #27062
|
src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/CollectionsMarshal.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/CollectionsMarshal.cs
Outdated
Show resolved
Hide resolved
Are there places outside of Dictionary we should be using the new method, too? |
For However |
It also needs to be something reasonably hot to make it worth the trouble. |
While CoreLib does create dictionaries, it doesn't really do much modifying of them and alas my search-fu isn't good enough to check all the other libs; though I definitely have uses further downstream Looks like a ref enumerator ref struct RefEnumerator
{
(TKey key, ref TValue) Current { get; }
bool MoveNext();
}would be helpful too, but small steps 😉 |
310ad9b to
66feb3c
Compare
b45aaa5 to
8d37543
Compare
src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/CollectionsMarshal.cs
Outdated
Show resolved
Hide resolved
|
Thanks, @benaadams. |
|
|
src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs
Outdated
Show resolved
Hide resolved
76c7749 to
4b9cc40
Compare
|
Rebased to reset CI |
|
🥳 |
Implement the api
Contributes to #27062
/cc @layomia