Skip to content

Instantly share code, notes, and snippets.

Last active September 16, 2020 22:36
What would you like to do?
public class DemoBehavior : IPipelineBehavior<PlaceOrder, Unit>
private readonly ILogger<DemoBehavior> _logger;
public DemoBehavior(ILogger<DemoBehavior> logger)
_logger = logger;
public async Task<Unit> Handle(PlaceOrder request, CancellationToken cancellationToken, RequestHandlerDelegate<Unit> next)
_logger.LogInformation($"Handling {nameof(PlaceOrder)}");
var response = await next();
return response;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment