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);
     }
 }
Beispiel #2
0
                public ReadOnlyPin(IPinnedValue <TKey, TChunk> pin)
                {
                    Contracts.Requires.That(pin != null);

                    this.pin = pin;
                }