mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-11-19 13:17:10 +00:00
Returned MiraEventWrapper
This commit is contained in:
1 parent
32642fa6b5
commit
87dd7b5441
1 file changed
+21
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
|
||||
namespace MiraAPI.Events;
|
||||
|
||||
/// <summary>
|
||||
/// Wrapper for <see cref="MiraEvent"/> handlers.
|
||||
/// </summary>
|
||||
/// <param name="eventHandler">The action for the event handler.</param>
|
||||
/// <param name="priority">The priority of the handler.</param>
|
||||
public class MiraEventWrapper(Delegate eventHandler, int priority)
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the event handler delegate.
|
||||
/// </summary>
|
||||
public Delegate EventHandler => eventHandler;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the priority of the handler. Lower values are called first.
|
||||
/// </summary>
|
||||
public int Priority => priority;
|
||||
}
|
||||
Reference in new issue
Block a user