summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Reflection/CacheEntry.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-05-31 18:32:23 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-05-31 18:32:23 -0400
commit9992915f565578949cad8d9bb8ceb360e0db5c85 (patch)
tree1ff34ba24733fcdf44f52fb8ee10b2a956f1a708 /src/SMAPI/Framework/Reflection/CacheEntry.cs
parent9ef3f7edb1589a52794c7da7075996d4a02de6e7 (diff)
downloadSMAPI-9992915f565578949cad8d9bb8ceb360e0db5c85.tar.gz
SMAPI-9992915f565578949cad8d9bb8ceb360e0db5c85.tar.bz2
SMAPI-9992915f565578949cad8d9bb8ceb360e0db5c85.zip
replace MemoryCache with custom cache
This was causing significant frame stutters for some players since the migration to .NET 5 in Stardew Valley 1.5.5.
Diffstat (limited to 'src/SMAPI/Framework/Reflection/CacheEntry.cs')
-rw-r--r--src/SMAPI/Framework/Reflection/CacheEntry.cs30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/SMAPI/Framework/Reflection/CacheEntry.cs b/src/SMAPI/Framework/Reflection/CacheEntry.cs
deleted file mode 100644
index 27f48a1f..00000000
--- a/src/SMAPI/Framework/Reflection/CacheEntry.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System.Diagnostics.CodeAnalysis;
-using System.Reflection;
-
-namespace StardewModdingAPI.Framework.Reflection
-{
- /// <summary>A cached member reflection result.</summary>
- internal readonly struct CacheEntry
- {
- /*********
- ** Accessors
- *********/
- /// <summary>Whether the lookup found a valid match.</summary>
- [MemberNotNullWhen(true, nameof(CacheEntry.MemberInfo))]
- public bool IsValid => this.MemberInfo != null;
-
- /// <summary>The reflection data for this member (or <c>null</c> if invalid).</summary>
- public MemberInfo? MemberInfo { get; }
-
-
- /*********
- ** Public methods
- *********/
- /// <summary>Construct an instance.</summary>
- /// <param name="memberInfo">The reflection data for this member (or <c>null</c> if invalid).</param>
- public CacheEntry(MemberInfo? memberInfo)
- {
- this.MemberInfo = memberInfo;
- }
- }
-}