Skip to content

Instantly share code, notes, and snippets.

@dcomartin

dcomartin/Policy.cs

Created Sep 23, 2020
Embed
What would you like to do?
public class PlaceOrderHandler : RequestHandler<PlaceOrder>
{
private readonly IAmACommandProcessor _commandProcessor;
public PlaceOrderHandler(IAmACommandProcessor commandProcessor)
{
_commandProcessor = commandProcessor;
}
[UsePolicy(CommandProcessor.RETRYPOLICY, 3)]
public override PlaceOrder Handle(PlaceOrder command)
{
throw new InvalidOperationException();
return base.Handle(command);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment