diff options
10 files changed, 55 insertions, 55 deletions
diff --git a/src/SMAPI/Framework/StateTracking/FieldWatchers/ComparableListWatcher.cs b/src/SMAPI/Framework/StateTracking/FieldWatchers/ComparableListWatcher.cs index 256370ce..3d178a36 100644 --- a/src/SMAPI/Framework/StateTracking/FieldWatchers/ComparableListWatcher.cs +++ b/src/SMAPI/Framework/StateTracking/FieldWatchers/ComparableListWatcher.cs @@ -26,13 +26,13 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers /********* ** Accessors *********/ - /// <summary>Whether the value changed since the last reset.</summary> + /// <inheritdoc /> public bool IsChanged => this.AddedImpl.Count > 0 || this.RemovedImpl.Count > 0; - /// <summary>The values added since the last reset.</summary> + /// <inheritdoc /> public IEnumerable<TValue> Added => this.AddedImpl; - /// <summary>The values removed since the last reset.</summary> + /// <inheritdoc /> public IEnumerable<TValue> Removed => this.RemovedImpl; @@ -48,7 +48,7 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers this.LastValues = new HashSet<TValue>(comparer); } - /// <summary>Update the current value if needed.</summary> + /// <inheritdoc /> public void Update() { this.AssertNotDisposed(); @@ -71,7 +71,7 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers this.LastValues = curValues; } - /// <summary>Set the current value as the baseline.</summary> + /// <inheritdoc /> public void Reset() { this.AssertNotDisposed(); diff --git a/src/SMAPI/Framework/StateTracking/FieldWatchers/ComparableWatcher.cs b/src/SMAPI/Framework/StateTracking/FieldWatchers/ComparableWatcher.cs index 5f76fe0a..e51c46c1 100644 --- a/src/SMAPI/Framework/StateTracking/FieldWatchers/ComparableWatcher.cs +++ b/src/SMAPI/Framework/StateTracking/FieldWatchers/ComparableWatcher.cs @@ -20,13 +20,13 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers /********* ** Accessors *********/ - /// <summary>The field value at the last reset.</summary> + /// <inheritdoc /> public TValue PreviousValue { get; private set; } - /// <summary>The latest value.</summary> + /// <inheritdoc /> public TValue CurrentValue { get; private set; } - /// <summary>Whether the value changed since the last reset.</summary> + /// <inheritdoc /> public bool IsChanged { get; private set; } @@ -44,21 +44,21 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers this.PreviousValue = this.CurrentValue; } - /// <summary>Update the current value if needed.</summary> + /// <inheritdoc /> public void Update() { this.CurrentValue = this.GetValue(); this.IsChanged = !this.Comparer.Equals(this.PreviousValue, this.CurrentValue); } - /// <summary>Set the current value as the baseline.</summary> + /// <inheritdoc /> public void Reset() { this.PreviousValue = this.CurrentValue; this.IsChanged = false; } - /// <summary>Release any references if needed when the field is no longer needed.</summary> + /// <inheritdoc /> public void Dispose() { } } } diff --git a/src/SMAPI/Framework/StateTracking/FieldWatchers/ImmutableCollectionWatcher.cs b/src/SMAPI/Framework/StateTracking/FieldWatchers/ImmutableCollectionWatcher.cs index 84340fbf..b46e0b24 100644 --- a/src/SMAPI/Framework/StateTracking/FieldWatchers/ImmutableCollectionWatcher.cs +++ b/src/SMAPI/Framework/StateTracking/FieldWatchers/ImmutableCollectionWatcher.cs @@ -13,26 +13,26 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers /// <summary>A singleton collection watcher instance.</summary> public static ImmutableCollectionWatcher<TValue> Instance { get; } = new(); - /// <summary>Whether the collection changed since the last reset.</summary> + /// <inheritdoc /> public bool IsChanged { get; } = false; - /// <summary>The values added since the last reset.</summary> + /// <inheritdoc /> public IEnumerable<TValue> Added { get; } = Array.Empty<TValue>(); - /// <summary>The values removed since the last reset.</summary> + /// <inheritdoc /> public IEnumerable<TValue> Removed { get; } = Array.Empty<TValue>(); /********* ** Public methods *********/ - /// <summary>Update the current value if needed.</summary> + /// <inheritdoc /> public void Update() { } - /// <summary>Set the current value as the baseline.</summary> + /// <inheritdoc /> public void Reset() { } - /// <summary>Stop watching the field and release all references.</summary> + /// <inheritdoc /> public override void Dispose() { } } } diff --git a/src/SMAPI/Framework/StateTracking/FieldWatchers/NetCollectionWatcher.cs b/src/SMAPI/Framework/StateTracking/FieldWatchers/NetCollectionWatcher.cs index 676c9fb4..e278fa99 100644 --- a/src/SMAPI/Framework/StateTracking/FieldWatchers/NetCollectionWatcher.cs +++ b/src/SMAPI/Framework/StateTracking/FieldWatchers/NetCollectionWatcher.cs @@ -24,13 +24,13 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers /********* ** Accessors *********/ - /// <summary>Whether the collection changed since the last reset.</summary> + /// <inheritdoc /> public bool IsChanged => this.AddedImpl.Count > 0 || this.RemovedImpl.Count > 0; - /// <summary>The values added since the last reset.</summary> + /// <inheritdoc /> public IEnumerable<TValue> Added => this.AddedImpl; - /// <summary>The values removed since the last reset.</summary> + /// <inheritdoc /> public IEnumerable<TValue> Removed => this.RemovedImpl; @@ -46,13 +46,13 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers field.OnValueRemoved += this.OnValueRemoved; } - /// <summary>Update the current value if needed.</summary> + /// <inheritdoc /> public void Update() { this.AssertNotDisposed(); } - /// <summary>Set the current value as the baseline.</summary> + /// <inheritdoc /> public void Reset() { this.AssertNotDisposed(); @@ -61,7 +61,7 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers this.RemovedImpl.Clear(); } - /// <summary>Stop watching the field and release all references.</summary> + /// <inheritdoc /> public override void Dispose() { if (!this.IsDisposed) diff --git a/src/SMAPI/Framework/StateTracking/FieldWatchers/NetDictionaryWatcher.cs b/src/SMAPI/Framework/StateTracking/FieldWatchers/NetDictionaryWatcher.cs index f55e4cea..a0fcc236 100644 --- a/src/SMAPI/Framework/StateTracking/FieldWatchers/NetDictionaryWatcher.cs +++ b/src/SMAPI/Framework/StateTracking/FieldWatchers/NetDictionaryWatcher.cs @@ -31,13 +31,13 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers /********* ** Accessors *********/ - /// <summary>Whether the collection changed since the last reset.</summary> + /// <inheritdoc /> public bool IsChanged => this.PairsAdded.Count > 0 || this.PairsRemoved.Count > 0; - /// <summary>The values added since the last reset.</summary> + /// <inheritdoc /> public IEnumerable<KeyValuePair<TKey, TValue>> Added => this.PairsAdded; - /// <summary>The values removed since the last reset.</summary> + /// <inheritdoc /> public IEnumerable<KeyValuePair<TKey, TValue>> Removed => this.PairsRemoved; @@ -54,13 +54,13 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers field.OnValueRemoved += this.OnValueRemoved; } - /// <summary>Update the current value if needed.</summary> + /// <inheritdoc /> public void Update() { this.AssertNotDisposed(); } - /// <summary>Set the current value as the baseline.</summary> + /// <inheritdoc /> public void Reset() { this.AssertNotDisposed(); @@ -69,7 +69,7 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers this.PairsRemoved.Clear(); } - /// <summary>Stop watching the field and release all references.</summary> + /// <inheritdoc /> public override void Dispose() { if (!this.IsDisposed) diff --git a/src/SMAPI/Framework/StateTracking/FieldWatchers/NetListWatcher.cs b/src/SMAPI/Framework/StateTracking/FieldWatchers/NetListWatcher.cs index 0b4d3030..79c3cb8b 100644 --- a/src/SMAPI/Framework/StateTracking/FieldWatchers/NetListWatcher.cs +++ b/src/SMAPI/Framework/StateTracking/FieldWatchers/NetListWatcher.cs @@ -25,13 +25,13 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers /********* ** Accessors *********/ - /// <summary>Whether the collection changed since the last reset.</summary> + /// <inheritdoc /> public bool IsChanged => this.AddedImpl.Count > 0 || this.RemovedImpl.Count > 0; - /// <summary>The values added since the last reset.</summary> + /// <inheritdoc /> public IEnumerable<TValue> Added => this.AddedImpl; - /// <summary>The values removed since the last reset.</summary> + /// <inheritdoc /> public IEnumerable<TValue> Removed => this.RemovedImpl; @@ -47,20 +47,20 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers field.OnArrayReplaced += this.OnArrayReplaced; } - /// <summary>Set the current value as the baseline.</summary> + /// <inheritdoc /> public void Reset() { this.AddedImpl.Clear(); this.RemovedImpl.Clear(); } - /// <summary>Update the current value if needed.</summary> + /// <inheritdoc /> public void Update() { this.AssertNotDisposed(); } - /// <summary>Stop watching the field and release all references.</summary> + /// <inheritdoc /> public override void Dispose() { if (!this.IsDisposed) diff --git a/src/SMAPI/Framework/StateTracking/FieldWatchers/NetValueWatcher.cs b/src/SMAPI/Framework/StateTracking/FieldWatchers/NetValueWatcher.cs index 48d5d681..d00f4582 100644 --- a/src/SMAPI/Framework/StateTracking/FieldWatchers/NetValueWatcher.cs +++ b/src/SMAPI/Framework/StateTracking/FieldWatchers/NetValueWatcher.cs @@ -17,13 +17,13 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers /********* ** Accessors *********/ - /// <summary>Whether the value changed since the last reset.</summary> + /// <inheritdoc /> public bool IsChanged { get; private set; } - /// <summary>The field value at the last reset.</summary> + /// <inheritdoc /> public TValue PreviousValue { get; private set; } - /// <summary>The latest value.</summary> + /// <inheritdoc /> public TValue CurrentValue { get; private set; } @@ -42,13 +42,13 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers field.fieldChangeEvent += this.OnValueChanged; } - /// <summary>Update the current value if needed.</summary> + /// <inheritdoc /> public void Update() { this.AssertNotDisposed(); } - /// <summary>Set the current value as the baseline.</summary> + /// <inheritdoc /> public void Reset() { this.AssertNotDisposed(); @@ -57,7 +57,7 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers this.IsChanged = false; } - /// <summary>Stop watching the field and release all references.</summary> + /// <inheritdoc /> public override void Dispose() { if (!this.IsDisposed) diff --git a/src/SMAPI/Framework/StateTracking/FieldWatchers/ObservableCollectionWatcher.cs b/src/SMAPI/Framework/StateTracking/FieldWatchers/ObservableCollectionWatcher.cs index 97aedca8..f503c47f 100644 --- a/src/SMAPI/Framework/StateTracking/FieldWatchers/ObservableCollectionWatcher.cs +++ b/src/SMAPI/Framework/StateTracking/FieldWatchers/ObservableCollectionWatcher.cs @@ -28,13 +28,13 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers /********* ** Accessors *********/ - /// <summary>Whether the collection changed since the last reset.</summary> + /// <inheritdoc /> public bool IsChanged => this.AddedImpl.Count > 0 || this.RemovedImpl.Count > 0; - /// <summary>The values added since the last reset.</summary> + /// <inheritdoc /> public IEnumerable<TValue> Added => this.AddedImpl; - /// <summary>The values removed since the last reset.</summary> + /// <inheritdoc /> public IEnumerable<TValue> Removed => this.RemovedImpl; @@ -49,13 +49,13 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers field.CollectionChanged += this.OnCollectionChanged; } - /// <summary>Update the current value if needed.</summary> + /// <inheritdoc /> public void Update() { this.AssertNotDisposed(); } - /// <summary>Set the current value as the baseline.</summary> + /// <inheritdoc /> public void Reset() { this.AssertNotDisposed(); @@ -64,7 +64,7 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers this.RemovedImpl.Clear(); } - /// <summary>Stop watching the field and release all references.</summary> + /// <inheritdoc /> public override void Dispose() { if (!this.IsDisposed) diff --git a/src/SMAPI/Framework/StateTracking/LocationTracker.cs b/src/SMAPI/Framework/StateTracking/LocationTracker.cs index ff72a19b..036ed73a 100644 --- a/src/SMAPI/Framework/StateTracking/LocationTracker.cs +++ b/src/SMAPI/Framework/StateTracking/LocationTracker.cs @@ -25,7 +25,7 @@ namespace StardewModdingAPI.Framework.StateTracking /********* ** Accessors *********/ - /// <summary>Whether the value changed since the last reset.</summary> + /// <inheritdoc /> public bool IsChanged => this.Watchers.Any(p => p.IsChanged); /// <summary>The tracked location.</summary> @@ -88,7 +88,7 @@ namespace StardewModdingAPI.Framework.StateTracking this.UpdateChestWatcherList(added: location.Objects.Pairs, removed: Array.Empty<KeyValuePair<Vector2, SObject>>()); } - /// <summary>Update the current value if needed.</summary> + /// <inheritdoc /> public void Update() { foreach (IWatcher watcher in this.Watchers) @@ -100,7 +100,7 @@ namespace StardewModdingAPI.Framework.StateTracking watcher.Value.Update(); } - /// <summary>Set the current value as the baseline.</summary> + /// <inheritdoc /> public void Reset() { foreach (IWatcher watcher in this.Watchers) @@ -110,7 +110,7 @@ namespace StardewModdingAPI.Framework.StateTracking watcher.Value.Reset(); } - /// <summary>Stop watching the player fields and release all references.</summary> + /// <inheritdoc /> public void Dispose() { foreach (IWatcher watcher in this.Watchers) diff --git a/src/SMAPI/Framework/StateTracking/WorldLocationsTracker.cs b/src/SMAPI/Framework/StateTracking/WorldLocationsTracker.cs index 817a6011..f328d659 100644 --- a/src/SMAPI/Framework/StateTracking/WorldLocationsTracker.cs +++ b/src/SMAPI/Framework/StateTracking/WorldLocationsTracker.cs @@ -37,7 +37,7 @@ namespace StardewModdingAPI.Framework.StateTracking /// <summary>Whether locations were added or removed since the last reset.</summary> public bool IsLocationListChanged => this.Added.Any() || this.Removed.Any(); - /// <summary>Whether any tracked location data changed since the last reset.</summary> + /// <inheritdoc /> public bool IsChanged => this.IsLocationListChanged || this.Locations.Any(p => p.IsChanged); /// <summary>The tracked locations.</summary> @@ -64,7 +64,7 @@ namespace StardewModdingAPI.Framework.StateTracking this.VolcanoLocationListWatcher = WatcherFactory.ForReferenceList(activeVolcanoLocations); } - /// <summary>Update the current value if needed.</summary> + /// <inheritdoc /> public void Update() { // update watchers @@ -120,7 +120,7 @@ namespace StardewModdingAPI.Framework.StateTracking this.VolcanoLocationListWatcher.Reset(); } - /// <summary>Set the current value as the baseline.</summary> + /// <inheritdoc /> public void Reset() { this.ResetLocationList(); @@ -135,7 +135,7 @@ namespace StardewModdingAPI.Framework.StateTracking return this.LocationDict.ContainsKey(location); } - /// <summary>Stop watching the player fields and release all references.</summary> + /// <inheritdoc /> public void Dispose() { foreach (IWatcher watcher in this.GetWatchers()) |