From b0011bf65c6ea7ba8d66a219501ac181cbd64c90 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 25 Mar 2022 01:02:26 -0400 Subject: [PATCH] use immutable set for invalidated asset names (#766) --- src/SMAPI/Events/AssetsInvalidatedEventArgs.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SMAPI/Events/AssetsInvalidatedEventArgs.cs b/src/SMAPI/Events/AssetsInvalidatedEventArgs.cs index 0127f83a..f3d83dd6 100644 --- a/src/SMAPI/Events/AssetsInvalidatedEventArgs.cs +++ b/src/SMAPI/Events/AssetsInvalidatedEventArgs.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Collections.Immutable; using System.Linq; namespace StardewModdingAPI.Events @@ -11,7 +12,7 @@ namespace StardewModdingAPI.Events ** Accessors *********/ /// The asset names that were invalidated. - public IEnumerable Names { get; } + public IReadOnlySet Names { get; } /********* @@ -21,7 +22,7 @@ namespace StardewModdingAPI.Events /// The asset names that were invalidated. internal AssetsInvalidatedEventArgs(IEnumerable names) { - this.Names = names.ToArray(); + this.Names = names.ToImmutableHashSet(); } } }