-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Add additional methods to ConditionalWeakTable #19632
Comments
I don't have an opinion either way, but I seem to recall a deliberate choice to not implement any of the collection/dictionary interfaces and not treat We could expose |
I've been thinking about how to best implement the enumerator, and all of the safe implementations I've thought of necessitate having a finalizer in case Dispose isn't called. As such, for now at least I'm removing the struct enumerator from the proposal. We can explicitly implement |
What's the scenario for iterating over it? There are some concerns that making |
@terrajobst, why don't you believe it makes sense? Examples:
|
We concluded that @stephentoub will take a look whether we can actually implement these APIs without holding references for too long. If we can, the API seem fine as proposed. |
ConditionalWeakTable<T>
is a specialized dictionary but it lacks several useful public members. We just added AddOrUpdate in https://github.com/dotnet/corefx/issues/8429. We should also add:The text was updated successfully, but these errors were encountered: