summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/StateTracking/FieldWatchers
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-05-23 12:57:33 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-05-23 12:57:33 -0400
commit9933acad35375c994ada78109eb1af957288d9ea (patch)
tree0f3ff3fb197804cb8b43ad9ef986c0ea3737bf64 /src/SMAPI/Framework/StateTracking/FieldWatchers
parent62665649bdec8b1b45b04e2d48bc68da689124d4 (diff)
downloadSMAPI-9933acad35375c994ada78109eb1af957288d9ea.tar.gz
SMAPI-9933acad35375c994ada78109eb1af957288d9ea.tar.bz2
SMAPI-9933acad35375c994ada78109eb1af957288d9ea.zip
use <inheritdoc/> in watchers
Diffstat (limited to 'src/SMAPI/Framework/StateTracking/FieldWatchers')
-rw-r--r--src/SMAPI/Framework/StateTracking/FieldWatchers/ComparableListWatcher.cs10
-rw-r--r--src/SMAPI/Framework/StateTracking/FieldWatchers/ComparableWatcher.cs12
-rw-r--r--src/SMAPI/Framework/StateTracking/FieldWatchers/ImmutableCollectionWatcher.cs12
-rw-r--r--src/SMAPI/Framework/StateTracking/FieldWatchers/NetCollectionWatcher.cs12
-rw-r--r--src/SMAPI/Framework/StateTracking/FieldWatchers/NetDictionaryWatcher.cs12
-rw-r--r--src/SMAPI/Framework/StateTracking/FieldWatchers/NetListWatcher.cs12
-rw-r--r--src/SMAPI/Framework/StateTracking/FieldWatchers/NetValueWatcher.cs12
-rw-r--r--src/SMAPI/Framework/StateTracking/FieldWatchers/ObservableCollectionWatcher.cs12
8 files changed, 47 insertions, 47 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)