LazyCache icon indicating copy to clipboard operation
LazyCache copied to clipboard

Issue72 Deprecate Add<T> method in favor of Set<T>

Open matthew-p opened this issue 5 years ago • 2 comments

An attempt to address issue # 72, deprecating the IAppCache.Add<T>(...) method with a .Set<T>() method

Replaces the functionality as-is, adds [Obsolete] attributes to the Add method, and a unit test to confirm that all classes implementing IAppCache have an Obsolete attribute on their Add method

https://github.com/alastairtree/LazyCache/issues/72

matthew-p avatar Sep 27 '20 08:09 matthew-p

Tip: To prevent IntelliSense from suggestion both Set and Add you can add [EditorBrowsable(EditorBrowsableState.Never)] to the obsolete methods.

jnyrup avatar Sep 27 '20 09:09 jnyrup

Tip: To prevent IntelliSense from suggestion both Set and Add you can add [EditorBrowsable(EditorBrowsableState.Never)] to the obsolete methods.

Did not know that, very useful! Let's use it.

alastairtree avatar Oct 04 '20 13:10 alastairtree