Open cdiddy77 opened 8 years ago
The reason why the cache is being incorrectly constructed is because in the switch statement on line 86 in "TemporaryCache.cs", there is no case for JsonToken.EndOfObject. To fix all you have to do is add:
case JsonToken.EndOfObject: break;
As for why the eventhandler is fired four times is because the eventhandler is called for every single value. Your todo object contains two values hence for each todo the eventhandler is fired twice resulting in 4 notifications. Currently figuring out a way to rewrite the cache to fire notifications per object.
Can we please get this bug fix into the master branch? I just spent an hour fixing this issue.
This commit https://github.com/AButler/FireSharp/commit/c405f9635c03bc8cd16e6a115257a8b7ff06c447 fixes the issue. But NuGet package won't have this fix. Please do change as in the commit to TemporaryChange.cs
I think this is probably causing #62 among others. Paste the below code into your FiresharpTests and see the failure. When you parse the update from the server, you incorrectly construct the SimpleCacheItem tree. The first member of the collection contains the second member, contains the third, etc. Not sure why that results in 4 notifications