diff --git a/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs b/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs index 9064166d03..1408b8d805 100644 --- a/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs +++ b/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs @@ -598,7 +598,6 @@ namespace BizHawk.Client.EmuHawk else { unavailable.Add(tool); - ServiceInjector.ClearServices(tool); // the services of the old emulator core are no longer valid on the tool if (tool is IExternalToolForm) ApiInjector.ClearApis(tool); } } diff --git a/src/BizHawk.Emulation.Common/ServiceInjector.cs b/src/BizHawk.Emulation.Common/ServiceInjector.cs index 781945c90b..1b9fe3a6c7 100644 --- a/src/BizHawk.Emulation.Common/ServiceInjector.cs +++ b/src/BizHawk.Emulation.Common/ServiceInjector.cs @@ -10,22 +10,6 @@ namespace BizHawk.Emulation.Common /// public static class ServiceInjector { - /// - /// clears all services from a target - /// - public static void ClearServices(object target) - { - Type targetType = target.GetType(); - object?[] tmp = { null }; - - foreach (var propInfo in - targetType.GetPropertiesWithAttrib(typeof(RequiredServiceAttribute)) - .Concat(targetType.GetPropertiesWithAttrib(typeof(OptionalServiceAttribute)))) - { - propInfo.GetSetMethod(true).Invoke(target, tmp); - } - } - /// /// Feeds the target its required services. ///