summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Reflection
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-06 18:24:59 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-06 18:24:59 -0400
commita593eda30f82af474887d91458b0e9158f66fefc (patch)
tree8aa0e0586e3cce7627e8c4ff445a953665953f8f /src/SMAPI/Framework/Reflection
parent29f909a8d5dbb83d6df1a54d2680e6f9898f3b19 (diff)
downloadSMAPI-a593eda30f82af474887d91458b0e9158f66fefc.tar.gz
SMAPI-a593eda30f82af474887d91458b0e9158f66fefc.tar.bz2
SMAPI-a593eda30f82af474887d91458b0e9158f66fefc.zip
use target-typed new
Diffstat (limited to 'src/SMAPI/Framework/Reflection')
-rw-r--r--src/SMAPI/Framework/Reflection/Reflector.cs4
1 files changed, 2 insertions, 2 deletions
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
*********/
/// <summary>The cached fields and methods found via reflection.</summary>
- private readonly MemoryCache Cache = new MemoryCache(typeof(Reflector).FullName);
+ private readonly MemoryCache Cache = new(typeof(Reflector).FullName);
/// <summary>The sliding cache expiration time.</summary>
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;
}