ObjectCacheItem.cs 512 B

123456789101112131415
  1. //------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //------------------------------------------------------------
  4. namespace System.Runtime.Collections
  5. {
  6. abstract class ObjectCacheItem<T>
  7. where T : class
  8. {
  9. // only valid when you've called TryAddReference successfully
  10. public abstract T Value { get; }
  11. public abstract bool TryAddReference();
  12. public abstract void ReleaseReference();
  13. }
  14. }