/// <summary> /// Carrega o estado do armazenamento. /// </summary> void IPersistentCacheStorage.LoadStorageState() { try { lock (_itemDict.SyncRoot) { _itemDict.Clear(); IEnumerator enumerator = _internalStore.GetEnumerator(); while (enumerator.MoveNext()) { MemArea current = (MemArea)enumerator.Current; if (!current.IsFree) { StoreItem item = StoreItem.FromBinary(current.GetMemContents(), base.CacheContext); _itemDict.Add(item.Key, new MmfObjectPtr(current.View, current)); } } } } catch (Exception exception) { Trace.Error("MmfStorageProvider.IPersistentCacheStorage()".GetFormatter(), exception.GetFormatter()); } }
/// <summary> /// Define uma <see cref="MemArea"/> para a chave informada. /// </summary> /// <param name="key"></param> /// <param name="areaTmp"></param> public void SetMemArea(object key, MemArea areaTmp) { _itemDict[key] = areaTmp; }