From a593eda30f82af474887d91458b0e9158f66fefc Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 6 Apr 2022 18:24:59 -0400 Subject: use target-typed new --- src/SMAPI/Framework/Reflection/Reflector.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/SMAPI/Framework/Reflection') diff --git a/src/SMAPI/Framework/Reflection/Reflector.cs b/src/SMAPI/Framework/Reflection/Reflector.cs index 889c7ed6..3a93ab5d 100644 --- a/src/SMAPI/Framework/Reflection/Reflector.cs +++ b/src/SMAPI/Framework/Reflection/Reflector.cs @@ -13,7 +13,7 @@ namespace StardewModdingAPI.Framework.Reflection ** Fields *********/ /// The cached fields and methods found via reflection. - private readonly MemoryCache Cache = new MemoryCache(typeof(Reflector).FullName); + private readonly MemoryCache Cache = new(typeof(Reflector).FullName); /// The sliding cache expiration time. private readonly TimeSpan SlidingCacheExpiry = TimeSpan.FromMinutes(5); @@ -268,7 +268,7 @@ namespace StardewModdingAPI.Framework.Reflection // fetch & cache new value TMemberInfo result = fetch(); - CacheEntry cacheEntry = new CacheEntry(result != null, result); + CacheEntry cacheEntry = new(result != null, result); this.Cache.Add(key, cacheEntry, new CacheItemPolicy { SlidingExpiration = this.SlidingCacheExpiry }); return result; } -- cgit