diff --git a/Tapeti/Default/ControllerMethodBinding.cs b/Tapeti/Default/ControllerMethodBinding.cs index 22c019d..3722877 100644 --- a/Tapeti/Default/ControllerMethodBinding.cs +++ b/Tapeti/Default/ControllerMethodBinding.cs @@ -14,7 +14,7 @@ namespace Tapeti.Default /// instead use the ITapetiConfigBuilder RegisterController / RegisterAllControllers extension /// methods. /// - internal class ControllerMethodBinding : IBinding + internal class ControllerMethodBinding : IControllerMethodBinding { /// /// Contains all the required information to bind a controller method to a queue. @@ -83,6 +83,12 @@ namespace Tapeti.Default /// public string QueueName { get; private set; } + /// + public Type Controller => bindingInfo.ControllerType; + + /// + public MethodInfo Method => bindingInfo.Method; + /// public ControllerMethodBinding(IDependencyResolver dependencyResolver, BindingInfo bindingInfo) diff --git a/Test/Program.cs b/Test/Program.cs index ccca437..771a4a0 100644 --- a/Test/Program.cs +++ b/Test/Program.cs @@ -37,9 +37,10 @@ namespace Test { var flowStore = container.GetInstance(); var flowStore2 = container.GetInstance(); - Console.WriteLine("IFlowHandler is singleton = " + (flowStore == flowStore2)); + flowStore.Load().Wait(); + connection.Connected += (sender, e) => { Console.WriteLine("Event Connected"); }; connection.Disconnected += (sender, e) => { Console.WriteLine("Event Disconnected"); }; connection.Reconnected += (sender, e) => { Console.WriteLine("Event Reconnected"); }; @@ -52,6 +53,7 @@ namespace Test Console.WriteLine("Done!"); + /* var response = container.GetInstance() .RequestResponse( new PoloConfirmationRequestMessage @@ -60,11 +62,12 @@ namespace Test }).Result; Console.WriteLine(response.ShouldMatchState); + */ //connection.GetPublisher().Publish(new FlowEndController.PingMessage()); - //container.GetInstance().Start(c => c.StartFlow, true).Wait(); - //container.GetInstance().Start(c => c.TestParallelRequest).Wait(); + container.GetInstance().Start(c => c.StartFlow, true).Wait(); + container.GetInstance().Start(c => c.TestParallelRequest).Wait(); Thread.Sleep(1000);