public bool TryPin(out IPinnedValue <TKey, TValue> pin) { if (this.pins.TryAddCount()) { pin = new Pin(this.cache, this, this.value.Value); return(true); } else { pin = null; return(false); } }
public ReadOnlyPin(IPinnedValue <TKey, TChunk> pin) { Contracts.Requires.That(pin != null); this.pin = pin; }