[ci skip] Fixed: Binding.ForMethod failed because ControllerMethodBinding did not implement IControllerMethodBinding
This commit is contained in:
parent
8ec85ac99f
commit
0aa44cfefd
@ -14,7 +14,7 @@ namespace Tapeti.Default
|
|||||||
/// instead use the ITapetiConfigBuilder RegisterController / RegisterAllControllers extension
|
/// instead use the ITapetiConfigBuilder RegisterController / RegisterAllControllers extension
|
||||||
/// methods.
|
/// methods.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class ControllerMethodBinding : IBinding
|
internal class ControllerMethodBinding : IControllerMethodBinding
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains all the required information to bind a controller method to a queue.
|
/// Contains all the required information to bind a controller method to a queue.
|
||||||
@ -83,6 +83,12 @@ namespace Tapeti.Default
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public string QueueName { get; private set; }
|
public string QueueName { get; private set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public Type Controller => bindingInfo.ControllerType;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public MethodInfo Method => bindingInfo.Method;
|
||||||
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public ControllerMethodBinding(IDependencyResolver dependencyResolver, BindingInfo bindingInfo)
|
public ControllerMethodBinding(IDependencyResolver dependencyResolver, BindingInfo bindingInfo)
|
||||||
|
@ -37,9 +37,10 @@ namespace Test
|
|||||||
{
|
{
|
||||||
var flowStore = container.GetInstance<IFlowStore>();
|
var flowStore = container.GetInstance<IFlowStore>();
|
||||||
var flowStore2 = container.GetInstance<IFlowStore>();
|
var flowStore2 = container.GetInstance<IFlowStore>();
|
||||||
|
|
||||||
Console.WriteLine("IFlowHandler is singleton = " + (flowStore == flowStore2));
|
Console.WriteLine("IFlowHandler is singleton = " + (flowStore == flowStore2));
|
||||||
|
|
||||||
|
flowStore.Load().Wait();
|
||||||
|
|
||||||
connection.Connected += (sender, e) => { Console.WriteLine("Event Connected"); };
|
connection.Connected += (sender, e) => { Console.WriteLine("Event Connected"); };
|
||||||
connection.Disconnected += (sender, e) => { Console.WriteLine("Event Disconnected"); };
|
connection.Disconnected += (sender, e) => { Console.WriteLine("Event Disconnected"); };
|
||||||
connection.Reconnected += (sender, e) => { Console.WriteLine("Event Reconnected"); };
|
connection.Reconnected += (sender, e) => { Console.WriteLine("Event Reconnected"); };
|
||||||
@ -52,6 +53,7 @@ namespace Test
|
|||||||
|
|
||||||
Console.WriteLine("Done!");
|
Console.WriteLine("Done!");
|
||||||
|
|
||||||
|
/*
|
||||||
var response = container.GetInstance<ITransientPublisher>()
|
var response = container.GetInstance<ITransientPublisher>()
|
||||||
.RequestResponse<PoloConfirmationRequestMessage, PoloConfirmationResponseMessage>(
|
.RequestResponse<PoloConfirmationRequestMessage, PoloConfirmationResponseMessage>(
|
||||||
new PoloConfirmationRequestMessage
|
new PoloConfirmationRequestMessage
|
||||||
@ -60,11 +62,12 @@ namespace Test
|
|||||||
}).Result;
|
}).Result;
|
||||||
|
|
||||||
Console.WriteLine(response.ShouldMatchState);
|
Console.WriteLine(response.ShouldMatchState);
|
||||||
|
*/
|
||||||
|
|
||||||
//connection.GetPublisher().Publish(new FlowEndController.PingMessage());
|
//connection.GetPublisher().Publish(new FlowEndController.PingMessage());
|
||||||
|
|
||||||
//container.GetInstance<IFlowStarter>().Start<MarcoController, bool>(c => c.StartFlow, true).Wait();
|
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>(c => c.TestParallelRequest).Wait();
|
||||||
|
|
||||||
Thread.Sleep(1000);
|
Thread.Sleep(1000);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user