Uh oh!
There was an error while loading. Please reload this page.
DCS work nicely with collectible AssemblyLoadContext - #90437
Conversation
Uh oh!
There was an error while loading. Please reload this page.
| } | ||
| public DataContract? GetItem(int index) => _contracts[index].strong ?? (_contracts[index].weak?.TryGetTarget(out DataContract? ret) == true ? ret : null); | ||
There was a problem hiding this comment.
It's only a style thing, but did you consider having providing an indexer property instead of switching to Get and Set methods?
There was a problem hiding this comment.
Sort of an evolution of the context-aware side of the design that got away from the original usage pattern. An indexer would fit the original code. But the nullable notation of the original code was incorrect, even if our code was dilligent about null-checking. Maybe I've still got Monday brain, but I don't know of a way to make the getter nullable and the setter non-nullable... notation-wise anyway.
Uh oh!
There was an error while loading. Please reload this page.
mconnew
commented
Aug 12, 2023
The only change that needs to happen is move the second check inside of the locks then this is good to merge. |
…unning the 'create' delegate. Docs suggest this is intentional and will remain the case.
This replaces the draft PR (#88791) that I was using earlier. The pre-requisite changes that were staged in the first few commits of that draft got checked in under their own PR with proper contributor attribution (#73893), so this PR cherry-picks the rest of that draft and then addresses the feedback.
Fixes#77877