Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
EventInfoExtensions.cs
Go to the documentation of this file.
1namespace System.Reflection;
2
3public static class EventInfoExtensions
4{
5 public static MethodInfo? GetAddMethod(this EventInfo eventInfo)
6 {
7 ArgumentNullException.ThrowIfNull(eventInfo, "eventInfo");
8 return eventInfo.GetAddMethod();
9 }
10
11 public static MethodInfo? GetAddMethod(this EventInfo eventInfo, bool nonPublic)
12 {
13 ArgumentNullException.ThrowIfNull(eventInfo, "eventInfo");
14 return eventInfo.GetAddMethod(nonPublic);
15 }
16
17 public static MethodInfo? GetRaiseMethod(this EventInfo eventInfo)
18 {
19 ArgumentNullException.ThrowIfNull(eventInfo, "eventInfo");
20 return eventInfo.GetRaiseMethod();
21 }
22
23 public static MethodInfo? GetRaiseMethod(this EventInfo eventInfo, bool nonPublic)
24 {
25 ArgumentNullException.ThrowIfNull(eventInfo, "eventInfo");
26 return eventInfo.GetRaiseMethod(nonPublic);
27 }
28
29 public static MethodInfo? GetRemoveMethod(this EventInfo eventInfo)
30 {
31 ArgumentNullException.ThrowIfNull(eventInfo, "eventInfo");
32 return eventInfo.GetRemoveMethod();
33 }
34
35 public static MethodInfo? GetRemoveMethod(this EventInfo eventInfo, bool nonPublic)
36 {
37 ArgumentNullException.ThrowIfNull(eventInfo, "eventInfo");
38 return eventInfo.GetRemoveMethod(nonPublic);
39 }
40}
static void ThrowIfNull([NotNull] object? argument, [CallerArgumentExpression("argument")] string? paramName=null)
static ? MethodInfo GetAddMethod(this EventInfo eventInfo, bool nonPublic)
static ? MethodInfo GetRemoveMethod(this EventInfo eventInfo, bool nonPublic)
static ? MethodInfo GetRemoveMethod(this EventInfo eventInfo)
static ? MethodInfo GetRaiseMethod(this EventInfo eventInfo)
static ? MethodInfo GetRaiseMethod(this EventInfo eventInfo, bool nonPublic)
static ? MethodInfo GetAddMethod(this EventInfo eventInfo)
MethodInfo? GetAddMethod()
Definition EventInfo.cs:59
MethodInfo? GetRaiseMethod()
Definition EventInfo.cs:69
MethodInfo? GetRemoveMethod()
Definition EventInfo.cs:64