mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-10 21:23:53 +00:00
18 lines
434 B
C#
18 lines
434 B
C#
using System;
|
|
|
|
namespace SocketIOClient.Extensions
|
|
{
|
|
internal static class EventHandlerExtensions
|
|
{
|
|
public static void TryInvoke<T>(this EventHandler<T> handler, object sender, T args)
|
|
{
|
|
handler?.Invoke(sender, args);
|
|
}
|
|
|
|
public static void TryInvoke(this EventHandler handler, object sender, EventArgs args)
|
|
{
|
|
handler?.Invoke(sender, args);
|
|
}
|
|
}
|
|
}
|