diff options
Diffstat (limited to 'src/SMAPI/Framework/StateTracking/FieldWatchers/NetDictionaryWatcher.cs')
-rw-r--r-- | src/SMAPI/Framework/StateTracking/FieldWatchers/NetDictionaryWatcher.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/StateTracking/FieldWatchers/NetDictionaryWatcher.cs b/src/SMAPI/Framework/StateTracking/FieldWatchers/NetDictionaryWatcher.cs index a0fcc236..3bd8e09d 100644 --- a/src/SMAPI/Framework/StateTracking/FieldWatchers/NetDictionaryWatcher.cs +++ b/src/SMAPI/Framework/StateTracking/FieldWatchers/NetDictionaryWatcher.cs @@ -32,6 +32,9 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers ** Accessors *********/ /// <inheritdoc /> + public string Name { get; } + + /// <inheritdoc /> public bool IsChanged => this.PairsAdded.Count > 0 || this.PairsRemoved.Count > 0; /// <inheritdoc /> @@ -45,9 +48,11 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers ** Public methods *********/ /// <summary>Construct an instance.</summary> + /// <param name="name">A name which identifies what the watcher is watching, used for troubleshooting.</param> /// <param name="field">The field to watch.</param> - public NetDictionaryWatcher(NetDictionary<TKey, TValue, TField, TSerialDict, TSelf> field) + public NetDictionaryWatcher(string name, NetDictionary<TKey, TValue, TField, TSerialDict, TSelf> field) { + this.Name = name; this.Field = field; field.OnValueAdded += this.OnValueAdded; |