Source/NFX/ApplicationModel/Volatile/ObjectStoreService.cs
/// <summary>
/// Retrieves an object reference from the store identified by the "key" or returns null if such object does not exist.
/// Object is not going to be persisted until it is checked back in the store using the same number of calls to CheckIn() for the same GUID.
/// </summary>
Retrieves an object reference from the store identified by the "key" or returns null if such object does not exist.
Object is not going to be persisted until it is checked back in the store using the same number of calls to CheckIn() for the same GUID.
Retrieves an object reference from the store identified by the " key " or returns null if such object does not exist . Object is not going to be persisted until it is checked back in the store using the same number of calls to CheckIn () for the same GUID .
public object CheckOut(Guid key)
    {
      if (this.Status != ControlStatus.Active) return null;
      var bucket = getBucket(key);
      ObjectStoreEntry entry = null;
      lock (bucket)
        if (!bucket.TryGetValue(key, out entry)) return null;
      lock (entry)
      {
        if (entry.Status == ObjectStoreEntryStatus.Deleted) return null;
        entry.Status = ObjectStoreEntryStatus.CheckedOut;
        entry.CheckoutCount++;
        entry.LastTime = App.LocalizedTime;
        return entry.Value;
      }
    }
public object CheckOut ( Guid key ) { if ( this . Status != ControlStatus . Active ) return null ; var bucket = getBucket ( key ) ; ObjectStoreEntry entry = null ; lock ( bucket ) if ( ! bucket . TryGetValue ( key , out entry ) ) return null ; lock ( entry ) { if ( entry . Status == ObjectStoreEntryStatus . Deleted ) return null ; entry . Status = ObjectStoreEntryStatus . CheckedOut ; entry . CheckoutCount ++ ; entry . LastTime = App . LocalizedTime ; return entry . Value ; } }
Retrieves an object reference from the store identified by the "key" or returns null if such object does not exist.
Retrieves an object reference from the store identified by the " key " or returns null if such object does not exist .
key
Guid