Last active
February 19, 2020 13:46
-
-
Save mattbrailsford/f6dbce117efed0c89ea9fbdce722107e to your computer and use it in GitHub Desktop.
Vendr Notification Handling
This file contains hidden or 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
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>(); | |
} | |
} | |
} |
This file contains hidden or 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
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