Source/NFX/ApplicationModel/Volatile/ObjectStoreService.cs
/// <summary>
/// Deletes object identified by key. Returns true when object was found and marked for deletion
/// </summary>
Deletes object identified by key. Returns true when object was found and marked for deletion
Deletes object identified by key . Returns true when object was found and marked for deletion
public bool Delete(Guid key)
    {
      if (Status != ControlStatus.Active) return false;
      var bucket = getBucket(key);
      ObjectStoreEntry entry = null;
      lock (bucket)
        if (!bucket.TryGetValue(key, out entry)) return false;
      lock (entry)
      {
        if (entry.Status == ObjectStoreEntryStatus.Deleted) return false;
        entry.Status = ObjectStoreEntryStatus.Deleted;
        entry.LastTime = App.LocalizedTime;
      }
      return true;
    }
public bool Delete ( Guid key ) { if ( Status != ControlStatus . Active ) return false ; var bucket = getBucket ( key ) ; ObjectStoreEntry entry = null ; lock ( bucket ) if ( ! bucket . TryGetValue ( key , out entry ) ) return false ; lock ( entry ) { if ( entry . Status == ObjectStoreEntryStatus . Deleted ) return false ; entry . Status = ObjectStoreEntryStatus . Deleted ; entry . LastTime = App . LocalizedTime ; } return true ; }
Deletes object identified by key.
Deletes object identified by key .
key
Guid