2020-07-03 13:51:41 +00:00
|
|
|
|
using System;
|
|
|
|
|
using ExampleLib;
|
|
|
|
|
using Messaging.TapetiExample;
|
2023-04-14 13:47:27 +00:00
|
|
|
|
using Tapeti.Config.Annotations;
|
2020-07-03 13:51:41 +00:00
|
|
|
|
|
|
|
|
|
namespace _06_StatelessRequestResponse
|
|
|
|
|
{
|
|
|
|
|
[MessageController]
|
|
|
|
|
[DynamicQueue("tapeti.example.06")]
|
|
|
|
|
public class ExampleMessageController
|
|
|
|
|
{
|
|
|
|
|
private readonly IExampleState exampleState;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ExampleMessageController(IExampleState exampleState)
|
|
|
|
|
{
|
|
|
|
|
this.exampleState = exampleState;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[ResponseHandler]
|
|
|
|
|
public void HandleQuoteResponse(QuoteResponseMessage message)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine("Received response: " + message.Quote);
|
|
|
|
|
exampleState.Done();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|