using System.Threading.Tasks;
namespace Tapeti.Transient
{
///
///
/// Default implementation of ITransientPublisher
///
internal class TransientPublisher : ITransientPublisher
{
private readonly TransientRouter router;
private readonly IPublisher publisher;
///
///
public TransientPublisher(TransientRouter router, IPublisher publisher)
{
this.router = router;
this.publisher = publisher;
}
///
public async Task RequestResponse(TRequest request)
{
return (TResponse)await router.RequestResponse(publisher, request);
}
}
}