summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Events/EventArgsValueChanged.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-04-05 14:55:46 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-04-05 14:55:46 -0400
commitdbb9bd84306830456032778fc11fb9a34dd140c7 (patch)
tree0219cab065bfffbbbb9b048b6a30044f510be2c5 /src/StardewModdingAPI/Events/EventArgsValueChanged.cs
parent9c9833c9086b758589dafee10243e3bf47e12d73 (diff)
parent4675da0600edf6781cd740549ad0a175b606fc1e (diff)
downloadSMAPI-dbb9bd84306830456032778fc11fb9a34dd140c7.tar.gz
SMAPI-dbb9bd84306830456032778fc11fb9a34dd140c7.tar.bz2
SMAPI-dbb9bd84306830456032778fc11fb9a34dd140c7.zip
Merge branch 'develop-1.9' into stable
Diffstat (limited to 'src/StardewModdingAPI/Events/EventArgsValueChanged.cs')
-rw-r--r--src/StardewModdingAPI/Events/EventArgsValueChanged.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Events/EventArgsValueChanged.cs b/src/StardewModdingAPI/Events/EventArgsValueChanged.cs
new file mode 100644
index 00000000..1d25af49
--- /dev/null
+++ b/src/StardewModdingAPI/Events/EventArgsValueChanged.cs
@@ -0,0 +1,31 @@
+using System;
+
+namespace StardewModdingAPI.Events
+{
+ /// <summary>Event arguments for a field that changed value.</summary>
+ /// <typeparam name="T">The value type.</typeparam>
+ public class EventArgsValueChanged<T> : EventArgs
+ {
+ /*********
+ ** Accessors
+ *********/
+ /// <summary>The previous value.</summary>
+ public T PriorValue { get; }
+
+ /// <summary>The current value.</summary>
+ public T NewValue { get; }
+
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Construct an instance.</summary>
+ /// <param name="priorValue">The previous value.</param>
+ /// <param name="newValue">The current value.</param>
+ public EventArgsValueChanged(T priorValue, T newValue)
+ {
+ this.PriorValue = priorValue;
+ this.NewValue = newValue;
+ }
+ }
+} \ No newline at end of file