-
Notifications
You must be signed in to change notification settings - Fork 179
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
C5.HashDictionary<K, int>.Values are returned on first call only #41
Comments
To be precise: |
Could you supply a piece of code to reproduce the bug? |
Test |
@ondfisk |
I have found the change that caused the issue: inside:
became
The new enumerator:
And within that: (in MoveNext)
Is only ever called once and never updated. if you add I noticed that the Keys collection resolves differently at runtime. Values uses the ValuesCollection and ValueEnumerator resolving to C5.TreeSet<C5.KeyValuePair<,>.Enumerator (which has the old stamp value of '0'), but Keys resolves to C5.SortedDictionaryBase<, >.SortedKeysCollection.KeyEnumerator. So I assume this bug would also affect Keys if Keys used the KeysCollection in the same way as the Values uses ValuesCollection. I hope this helps in solving the problem. |
It certainly does. Thanks. |
- in the ValueCollection and KeyCollection an enumerator was not properly generated. Now it's been introduced in the GetEnumerator function of both classes. - to avoid confusions some fields have been renamed: _internalList to _keyValuePairs, _internalEnumerator to _keyEnumerator and to _valueEnumerator and so on - another bug is fixed --> _keyValuePairEnumerator.Dispose(); after the collection ends looping so it can restart once it has finished
Thanks |
I've pushed a new version to NuGet. Please verify that the issue has been resolved |
C5 2.4.5891.40110 (NuGet)
Net 4.5.2
The text was updated successfully, but these errors were encountered: