perf: delegate InvokeSafe method allocations are lowered
This commit is contained in:
parent
feb2a05aa3
commit
61a7f685c1
@ -6,7 +6,7 @@ public static class DelegateExtensions
|
||||
{
|
||||
public static void InvokeSafe(this Delegate @delegate, params object?[] args)
|
||||
{
|
||||
foreach (Delegate invocation in @delegate.GetInvocationList())
|
||||
foreach (Delegate invocation in Delegate.EnumerateInvocationList(@delegate))
|
||||
try { invocation.DynamicInvoke(args); }
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user