To improve the extensibility I have introduced the base GetOrAddEntry and ReplaceEntry methods.
Another important thing is to inversion the control, instead of passing the delegates to operate on the particular type of Entry (either Single entry or Conflicting Hash entry) the GetOrAddEntry is returning the entry, then it can be updated or added based on the type on the consumer side, and then passed to the ReplaceEntry.
To improve the extensibility I have introduced the base
GetOrAddEntry
andReplaceEntry
methods. Another important thing is to inversion the control, instead of passing the delegates to operate on the particular type of Entry (either Single entry or Conflicting Hash entry) theGetOrAddEntry
is returning the entry, then it can be updated or added based on the type on the consumer side, and then passed to theReplaceEntry
.