1
0
mirror of synced 2024-11-05 02:59:16 +00:00

[ci skip] Fixed: Binding.ForMethod failed because ControllerMethodBinding did not implement IControllerMethodBinding

This commit is contained in:
Mark van Renswoude 2019-08-15 12:10:29 +02:00
parent 8ec85ac99f
commit 0aa44cfefd
2 changed files with 13 additions and 4 deletions

View File

@ -14,7 +14,7 @@ namespace Tapeti.Default
/// instead use the ITapetiConfigBuilder RegisterController / RegisterAllControllers extension
/// methods.
/// </summary>
internal class ControllerMethodBinding : IBinding
internal class ControllerMethodBinding : IControllerMethodBinding
{
/// <summary>
/// Contains all the required information to bind a controller method to a queue.
@ -83,6 +83,12 @@ namespace Tapeti.Default
/// <inheritdoc />
public string QueueName { get; private set; }
/// <inheritdoc />
public Type Controller => bindingInfo.ControllerType;
/// <inheritdoc />
public MethodInfo Method => bindingInfo.Method;
/// <inheritdoc />
public ControllerMethodBinding(IDependencyResolver dependencyResolver, BindingInfo bindingInfo)

View File

@ -37,9 +37,10 @@ namespace Test
{
var flowStore = container.GetInstance<IFlowStore>();
var flowStore2 = container.GetInstance<IFlowStore>();
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<ITransientPublisher>()
.RequestResponse<PoloConfirmationRequestMessage, PoloConfirmationResponseMessage>(
new PoloConfirmationRequestMessage
@ -60,11 +62,12 @@ namespace Test
}).Result;
Console.WriteLine(response.ShouldMatchState);
*/
//connection.GetPublisher().Publish(new FlowEndController.PingMessage());
//container.GetInstance<IFlowStarter>().Start<MarcoController, bool>(c => c.StartFlow, true).Wait();
//container.GetInstance<IFlowStarter>().Start<MarcoController>(c => c.TestParallelRequest).Wait();
container.GetInstance<IFlowStarter>().Start<MarcoController, bool>(c => c.StartFlow, true).Wait();
container.GetInstance<IFlowStarter>().Start<MarcoController>(c => c.TestParallelRequest).Wait();
Thread.Sleep(1000);