Skip to content
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

When EnableReadDeepClone is true HashSet method Remove fails #481

Open
jkatsiotis opened this issue Jul 7, 2023 · 1 comment
Open

When EnableReadDeepClone is true HashSet method Remove fails #481

jkatsiotis opened this issue Jul 7, 2023 · 1 comment

Comments

@jkatsiotis
Copy link
Contributor

jkatsiotis commented Jul 7, 2023

Description

When you store a HashSet object in MemoryCache and retrieve the object when you are trying to remove an item from the collection operations fail.

Steps to Reproduce

  1. Create a HashSet with 2 items
  2. Store it in MemoryCache with EnableReadDeepClone = true
  3. Retrieve it from Cache
  4. Remove the 1st item
  5. Item is not being removed

Expected behavior: .Remove() method should work as expected

Actual behavior: .Remove() method returns false

Workaround: Implement GetHashCode() of the object that is inside the HashSet

Specifications

  • Provider : InMemory (version 1.9.0)
@jkatsiotis
Copy link
Contributor Author

This is possibly related with that one: force-net/DeepCloner#17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant