From 391b48614d598b5fbfad68b610520a5ae7a57b70 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Fri, 28 Dec 2018 15:21:02 +0100 Subject: Remove FireEventIfNotNull It's a pretty useless "helper" class --- Emby.Server.Implementations/HttpServer/HttpListenerHost.cs | 2 +- Emby.Server.Implementations/HttpServer/WebSocketConnection.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Emby.Server.Implementations/HttpServer') diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs index 704b7f8a6..66b930a80 100644 --- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -184,7 +184,7 @@ namespace Emby.Server.Implementations.HttpServer if (WebSocketConnected != null) { - EventHelper.FireEventIfNotNull(WebSocketConnected, this, new GenericEventArgs(connection), _logger); + WebSocketConnected?.Invoke(this, new GenericEventArgs(connection)); } } diff --git a/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs b/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs index 8b5dfd444..095675ec4 100644 --- a/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs +++ b/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs @@ -118,7 +118,7 @@ namespace Emby.Server.Implementations.HttpServer void socket_Closed(object sender, EventArgs e) { - EventHelper.FireEventIfNotNull(Closed, this, EventArgs.Empty, _logger); + Closed?.Invoke(this, EventArgs.Empty); } /// -- cgit v1.2.3