diff --git a/src/ConductorSharp.Engine/ExecutionManager.cs b/src/ConductorSharp.Engine/ExecutionManager.cs index fbdf2128..82fd77dc 100644 --- a/src/ConductorSharp.Engine/ExecutionManager.cs +++ b/src/ConductorSharp.Engine/ExecutionManager.cs @@ -68,7 +68,10 @@ public async Task StartAsync(CancellationToken cancellationToken) private Type GetInputType(Type workerType) { - var interfaces = workerType.GetInterfaces().Where(a => a.GetGenericTypeDefinition() == typeof(ITaskRequestHandler<,>)).First(); + var interfaces = workerType + .GetInterfaces() + .Where(a => a.IsGenericType && a.GetGenericTypeDefinition() == typeof(ITaskRequestHandler<,>)) + .First(); var genericArguments = interfaces.GetGenericArguments(); var inputType = genericArguments[0];