/// <summary> /// Sets cached keys to <paramref name="keys"/>. /// </summary> /// <param name="keys">The keys.</param> public void Update(IEnumerable <Key> keys, long?count) { FetchedKeys.Clear(); TotalItemCount = count; foreach (var key in keys) { FetchedKeys.Add(key); } Rebind(); }
private void UpdateStateDisconnected(IEnumerable <Key> syncronizedKeys, long?count) { FetchedKeys.Clear(); var countExceptRemoved = 0; foreach (var key in syncronizedKeys) { FetchedKeys.Add(key); if (!removedKeys.ContainsKey(key)) { countExceptRemoved++; } } TotalItemCount = count.HasValue ? countExceptRemoved + AddedItemsCount : count; Rebind(); }