mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-25 02:46:47 +00:00
25 lines
671 B
C#
25 lines
671 B
C#
using System;
|
|
|
|
namespace MiraAPI.Events;
|
|
|
|
/// <summary>
|
|
/// Register a <see cref="MiraEvent"/> handler.
|
|
/// </summary>
|
|
[AttributeUsage(AttributeTargets.Method)]
|
|
public class RegisterEventAttribute : Attribute
|
|
{
|
|
/// <summary>
|
|
/// Gets the priority of the event. Lower values are called first.
|
|
/// </summary>
|
|
public int Priority { get; }
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="RegisterEventAttribute"/> class.
|
|
/// </summary>
|
|
/// <param name="priority">The priority of the event. Lower values are called first.</param>
|
|
public RegisterEventAttribute(int priority = 0)
|
|
{
|
|
Priority = priority;
|
|
}
|
|
}
|