chore: removed unnecessary null check
This commit is contained in:
@@ -6,9 +6,6 @@ public static class DelegateHelpers
|
|||||||
{
|
{
|
||||||
public static void InvokeSafe(this Delegate @delegate, params object?[] args)
|
public static void InvokeSafe(this Delegate @delegate, params object?[] args)
|
||||||
{
|
{
|
||||||
if (@delegate is null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
foreach (Delegate invocation in @delegate.GetInvocationList())
|
foreach (Delegate invocation in @delegate.GetInvocationList())
|
||||||
try { invocation.DynamicInvoke(args); }
|
try { invocation.DynamicInvoke(args); }
|
||||||
catch (Exception exception)
|
catch (Exception exception)
|
||||||
|
Reference in New Issue
Block a user