aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Monteiro <marknr.monteiro@protonmail.com>2020-03-21 23:28:27 +0100
committerMark Monteiro <marknr.monteiro@protonmail.com>2020-03-21 23:28:27 +0100
commitb8580e58aadbbef6f99dfc15ab0fcc38f5210dd8 (patch)
treec0b026304fa5b4130b8c090d8ece8f2853d17b41
parent6f8c81ff7e8aba4eaa14b715cc180b824c735905 (diff)
Check for implementation of IService correctly
-rw-r--r--Emby.Server.Implementations/Services/ServiceController.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Services/ServiceController.cs b/Emby.Server.Implementations/Services/ServiceController.cs
index 3f9c8778b..d546317a9 100644
--- a/Emby.Server.Implementations/Services/ServiceController.cs
+++ b/Emby.Server.Implementations/Services/ServiceController.cs
@@ -8,12 +8,17 @@ using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.Services
{
public delegate object ActionInvokerFn(object intance, object request);
+
public delegate void VoidActionInvokerFn(object intance, object request);
public class ServiceController
{
private readonly ILogger _log;
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ServiceController"/> class.
+ /// </summary>
+ /// <param name="log">The <see cref="ServiceController"/> logger.</param>
public ServiceController(ILogger<ServiceController> log)
{
_log = log;
@@ -30,7 +35,7 @@ namespace Emby.Server.Implementations.Services
public void RegisterService(HttpListenerHost appHost, Type serviceType)
{
// Make sure the provided type implements IService
- if (!serviceType.IsAssignableFrom(typeof(IService)))
+ if (!typeof(IService).IsAssignableFrom(serviceType))
{
_log.LogWarning("Tried to register a service that does not implement IService: {ServiceType}", serviceType);
return;