Skip to content

Instantly share code, notes, and snippets.

@mattbrailsford
Last active February 19, 2020 13:46
Show Gist options
  • Save mattbrailsford/f6dbce117efed0c89ea9fbdce722107e to your computer and use it in GitHub Desktop.
Save mattbrailsford/f6dbce117efed0c89ea9fbdce722107e to your computer and use it in GitHub Desktop.
Vendr Notification Handling
using Umbraco.Core.Composing;
using Vendr.Core.Events.Notification;
namespace MyNamespace
{
public class MyComposer : IUserComposer
{
public void Compose(Composition composition)
{
composition.WithNotificationEvent<OrderFinalizedNotification>()
.RegisterHandler<MyOrderFinalizedHandler>();
}
}
}
using Vendr.Core.Events.Notification;
namespace MyNamespace
{
public class MyOrderFinalizedHandler : NotificationEventHandlerBase<OrderFinalizedNotification>
{
public override void Handle(OrderFinalizedNotification evt)
{
var finalizedOrder = evt.Order;
// Do your thing
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment