use immutable set for invalidated asset names (#766)

This commit is contained in:
Jesse Plamondon-Willard 2022-03-25 01:02:26 -04:00
parent e88666f5b2
commit b0011bf65c
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
1 changed files with 3 additions and 2 deletions

View File

@ -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
*********/
/// <summary>The asset names that were invalidated.</summary>
public IEnumerable<IAssetName> Names { get; }
public IReadOnlySet<IAssetName> Names { get; }
/*********
@ -21,7 +22,7 @@ namespace StardewModdingAPI.Events
/// <param name="names">The asset names that were invalidated.</param>
internal AssetsInvalidatedEventArgs(IEnumerable<IAssetName> names)
{
this.Names = names.ToArray();
this.Names = names.ToImmutableHashSet();
}
}
}