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 --- .../AppBase/BaseConfigurationManager.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs') diff --git a/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs b/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs index fddf19893..bc5168fe8 100644 --- a/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs +++ b/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs @@ -283,12 +283,11 @@ namespace Emby.Server.Implementations.AppBase validatingStore.Validate(currentConfiguration, configuration); } - EventHelper.FireEventIfNotNull(NamedConfigurationUpdating, this, new ConfigurationUpdateEventArgs + NamedConfigurationUpdating?.Invoke( this, new ConfigurationUpdateEventArgs { Key = key, NewConfiguration = configuration - - }, Logger); + }); _configurations.AddOrUpdate(key, configuration, (k, v) => configuration); @@ -305,12 +304,11 @@ namespace Emby.Server.Implementations.AppBase protected virtual void OnNamedConfigurationUpdated(string key, object configuration) { - EventHelper.FireEventIfNotNull(NamedConfigurationUpdated, this, new ConfigurationUpdateEventArgs + NamedConfigurationUpdated?.Invoke(this, new ConfigurationUpdateEventArgs { Key = key, NewConfiguration = configuration - - }, Logger); + }); } public Type GetConfigurationType(string key) -- cgit v1.2.3