From 80b61db317172c7331724d3717ef3269a77ee3ac Mon Sep 17 00:00:00 2001 From: Menno van Lavieren Date: Fri, 7 Jul 2017 11:38:34 +0200 Subject: [PATCH] Adding controller types to the dependency container if supported --- Tapeti/TapetiConfig.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tapeti/TapetiConfig.cs b/Tapeti/TapetiConfig.cs index adb5e56..32f5907 100644 --- a/Tapeti/TapetiConfig.cs +++ b/Tapeti/TapetiConfig.cs @@ -141,6 +141,8 @@ namespace Tapeti { var controllerQueueInfo = GetQueueInfo(controller); + (dependencyResolver as IDependencyContainer)?.RegisterController(controller); + foreach (var method in controller.GetMembers(BindingFlags.Public | BindingFlags.Instance) .Where(m => m.MemberType == MemberTypes.Method && m.DeclaringType != typeof(object)) .Select(m => (MethodInfo)m))