using System.Threading.Tasks;
namespace Tapeti.Transient
{
///
///
/// Default implementation of ITransientPublisher
///
public 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));
}
}
}