Exemple #1
0
        public void Commit()
        {
            foreach (var item in cache)
            {
                switch (item.Value.State)
                {
                case TrackState.Added:
                case TrackState.Changed:
                    store.Put(Key(item.Key), item.Value.Node.ToArray());
                    break;

                case TrackState.Deleted:
                    store.Delete(Key(item.Key));
                    break;
                }
            }
            cache.Clear();
        }
Exemple #2
0
 protected override void DeleteInternal(StorageKey key)
 {
     snapshot?.Delete(key.ToArray());
 }
Exemple #3
0
 protected override void DeleteInternal(TKey key)
 {
     snapshot?.Delete(prefix, key.ToArray());
 }