Ejemplo n.º 1
0
        public virtual void Return(SignalWrapper <TSignal> item)
        {
            if (item.IsPersistentlyStored == false)
            {
                //Temp storage item will be deleted after flushing to permanent storage.
                EnqueueItem(item, FlushAction.Insert);
            }

            if (item.IsPersistentlyStored == true && item.IsUpdated)
            {
                //Temp storage item will be deleted after flushing to permanent storage.
                //Until then, preserve changes made to TempStorage.
                if (IsTemporaryStorageEnabled && item.TempStorageId != null)
                {
                    _temporaryStorage.Update(_temporaryStorageParameters, item.TempStorageId.Value, item.Signal);
                }

                EnqueueItem(item, FlushAction.Update);
            }
        }