mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-11-19 13:17:10 +00:00
Renamed property and used IsSubclassOf to allow generics
This commit is contained in:
1 parent
d83bcde8a9
commit
7755274863
2 files changed
+3
-3
No files matched your search
@@ -36,7 +36,7 @@ public static class MiraEventManager
|
||||
return false;
|
||||
}
|
||||
|
||||
var callableHandlers = handlers.Where(x => x.ConstructedType.IsAssignableTo(type)).ToList();
|
||||
var callableHandlers = handlers.Where(x => IsSubclassOf(type, x.DefinedType)).ToList();
|
||||
if (callableHandlers.Count == 0)
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -17,7 +17,7 @@ public class MiraEventWrapper
|
||||
/// </summary>
|
||||
public int Priority { get; }
|
||||
|
||||
internal Type ConstructedType { get; }
|
||||
internal Type DefinedType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MiraEventWrapper"/> class.
|
||||
@@ -29,6 +29,6 @@ public class MiraEventWrapper
|
||||
{
|
||||
EventHandler = eventHandler;
|
||||
Priority = priority;
|
||||
ConstructedType = type;
|
||||
DefinedType = type;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user