Last active
September 16, 2020 22:36
-
-
Save dcomartin/260ec63888fcb5946b96120d8727f9f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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