summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/StateTracking/IWatcher.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Framework/StateTracking/IWatcher.cs')
-rw-r--r--src/SMAPI/Framework/StateTracking/IWatcher.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/StateTracking/IWatcher.cs b/src/SMAPI/Framework/StateTracking/IWatcher.cs
new file mode 100644
index 00000000..8c7fa51c
--- /dev/null
+++ b/src/SMAPI/Framework/StateTracking/IWatcher.cs
@@ -0,0 +1,24 @@
+using System;
+
+namespace StardewModdingAPI.Framework.StateTracking
+{
+ /// <summary>A watcher which detects changes to something.</summary>
+ internal interface IWatcher : IDisposable
+ {
+ /*********
+ ** Accessors
+ *********/
+ /// <summary>Whether the value changed since the last reset.</summary>
+ bool IsChanged { get; }
+
+
+ /*********
+ ** Methods
+ *********/
+ /// <summary>Update the current value if needed.</summary>
+ void Update();
+
+ /// <summary>Set the current value as the baseline.</summary>
+ void Reset();
+ }
+}