mark structs readonly

This commit is contained in:
Jesse Plamondon-Willard 2018-12-27 13:41:19 -05:00
parent c4a82418ac
commit 2e63fff9ab
No known key found for this signature in database
GPG Key ID: 7D7C8097B62033CE
2 changed files with 4 additions and 4 deletions

View File

@ -400,7 +400,7 @@ namespace StardewModdingAPI.Framework.ModLoading
** Private models ** Private models
*********/ *********/
/// <summary>Represents a dependency from one mod to another.</summary> /// <summary>Represents a dependency from one mod to another.</summary>
private struct ModDependency private readonly struct ModDependency
{ {
/********* /*********
** Accessors ** Accessors

View File

@ -3,16 +3,16 @@ using System.Reflection;
namespace StardewModdingAPI.Framework.Reflection namespace StardewModdingAPI.Framework.Reflection
{ {
/// <summary>A cached member reflection result.</summary> /// <summary>A cached member reflection result.</summary>
internal struct CacheEntry internal readonly struct CacheEntry
{ {
/********* /*********
** Accessors ** Accessors
*********/ *********/
/// <summary>Whether the lookup found a valid match.</summary> /// <summary>Whether the lookup found a valid match.</summary>
public bool IsValid; public bool IsValid { get; }
/// <summary>The reflection data for this member (or <c>null</c> if invalid).</summary> /// <summary>The reflection data for this member (or <c>null</c> if invalid).</summary>
public MemberInfo MemberInfo; public MemberInfo MemberInfo { get; }
/********* /*********