blob: 912662e31ec66f3143bb47404e5646bb8cf7d29a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
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>
public bool IsValid { get; }
/// <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="isValid">Whether the lookup found a valid match.</param>
/// <param name="memberInfo">The reflection data for this member (or <c>null</c> if invalid).</param>
public CacheEntry(bool isValid, MemberInfo memberInfo)
{
this.IsValid = isValid;
this.MemberInfo = memberInfo;
}
}
}
|