From 26782c0534a0eaa26e8ae6956e9c996b64d6dd2d Mon Sep 17 00:00:00 2001 From: Alex Peck Date: Tue, 25 Apr 2023 12:29:27 -0700 Subject: [PATCH] validate --- BitFaster.Caching/BitFaster.Caching.csproj | 2 ++ BitFaster.Caching/ICache.cs | 4 +++- BitFaster.Caching/Lifetime.cs | 2 +- BitFaster.Caching/Scoped.cs | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/BitFaster.Caching/BitFaster.Caching.csproj b/BitFaster.Caching/BitFaster.Caching.csproj index 8c928cd8..68a81b1c 100644 --- a/BitFaster.Caching/BitFaster.Caching.csproj +++ b/BitFaster.Caching/BitFaster.Caching.csproj @@ -22,6 +22,8 @@ snupkg 1.0.7.0 1.0.7.0 + true + 1.0.3 diff --git a/BitFaster.Caching/ICache.cs b/BitFaster.Caching/ICache.cs index 245d4e65..315447dc 100644 --- a/BitFaster.Caching/ICache.cs +++ b/BitFaster.Caching/ICache.cs @@ -63,9 +63,11 @@ public interface ICache /// The new value. void AddOrUpdate(K key, V value); +#if NETCOREAPP3_0_OR_GREATER /// /// Removes all keys and values from the cache. /// - void Clear(); + void Clear() { } +#endif } } diff --git a/BitFaster.Caching/Lifetime.cs b/BitFaster.Caching/Lifetime.cs index 378d3eea..74ebf899 100644 --- a/BitFaster.Caching/Lifetime.cs +++ b/BitFaster.Caching/Lifetime.cs @@ -9,7 +9,7 @@ namespace BitFaster.Caching /// lifetime is disposed. /// /// The type of value - public sealed class Lifetime : IDisposable + public class Lifetime : IDisposable { private readonly Action onDisposeAction; private readonly ReferenceCount refCount; diff --git a/BitFaster.Caching/Scoped.cs b/BitFaster.Caching/Scoped.cs index dad6ee46..6379e442 100644 --- a/BitFaster.Caching/Scoped.cs +++ b/BitFaster.Caching/Scoped.cs @@ -11,7 +11,7 @@ namespace BitFaster.Caching /// the wrapped object from being diposed until the calling code completes. /// /// The type of scoped value. - public sealed class Scoped : IDisposable where T : IDisposable + public class Scoped : IDisposable where T : IDisposable { private ReferenceCount refCount; private bool isDisposed;