summaryrefslogtreecommitdiff
path: root/src/SMAPI/Events
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Events')
-rw-r--r--src/SMAPI/Events/EventPriority.cs24
-rw-r--r--src/SMAPI/Events/EventPriorityAttribute.cs31
2 files changed, 19 insertions, 36 deletions
diff --git a/src/SMAPI/Events/EventPriority.cs b/src/SMAPI/Events/EventPriority.cs
index 17f5fbb7..e1fb00ac 100644
--- a/src/SMAPI/Events/EventPriority.cs
+++ b/src/SMAPI/Events/EventPriority.cs
@@ -1,29 +1,15 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
namespace StardewModdingAPI.Events
{
- /// <summary>
- /// Event priority for method handlers.
- /// </summary>
+ /// <summary>The event priorities for method handlers.</summary>
public enum EventPriority
{
- /// <summary>
- /// Low priority.
- /// </summary>
+ /// <summary>Low priority.</summary>
Low = 3,
- /// <summary>
- /// Normal priority. This is the default.
- /// </summary>
+ /// <summary>The default priority.</summary>
Normal = 2,
- /// <summary>
- /// High priority.
- /// </summary>
- High = 1,
+ /// <summary>High priority.</summary>
+ High = 1
}
}
diff --git a/src/SMAPI/Events/EventPriorityAttribute.cs b/src/SMAPI/Events/EventPriorityAttribute.cs
index c5683931..207e7862 100644
--- a/src/SMAPI/Events/EventPriorityAttribute.cs
+++ b/src/SMAPI/Events/EventPriorityAttribute.cs
@@ -1,27 +1,24 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace StardewModdingAPI.Events
{
- /// <summary>
- /// An attribute for controlling event priority of an event handler.
- /// </summary>
+ /// <summary>An attribute which specifies the priority for an event handler.</summary>
[AttributeUsage(AttributeTargets.Method)]
- public class EventPriorityAttribute : System.Attribute
+ public class EventPriorityAttribute : Attribute
{
- /// <summary>
- /// The priority for the method marked by this attribute.
- /// </summary>
- public EventPriority Priority { get; }
+ /*********
+ ** Accessors
+ *********/
+ /// <summary>The event handler priority, relative to other handlers across all mods registered for this event.</summary>
+ internal EventPriority Priority { get; }
- /// <summary>
- /// Constructor.
- /// </summary>
- /// <param name="priority">The priority for method marked by this attribute.</param>
- public EventPriorityAttribute( EventPriority priority )
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Construct an instance.</summary>
+ /// <param name="priority">The event handler priority, relative to other handlers across all mods registered for this event. Higher-priority handlers are notified before lower-priority handlers.</param>
+ public EventPriorityAttribute(EventPriority priority)
{
this.Priority = priority;
}