You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can someone let me know if it is possible to call the custom webhook's NotifyAsync outside of a MVC or WebApi controller? I already send webhooks within controllers but now also need to add NotifyAsync to a WCF callback. I cannot see how I can get access to the Web hook manager.
The text was updated successfully, but these errors were encountered:
Ok after much trolling through the library code this works
// this can be used outside of a MVC or WebAPI controller
public static async Task NotifyAsync(string action, object data)
{
var logger = CommonServices.GetLogger();
var store = CustomServices.GetStore();
var sender = CustomServices.GetSender(logger);
var manager = new WebHookManager(store, sender, logger);
var notifications = new NotificationDictionary[] { new NotificationDictionary(action, data) };
await manager.NotifyAllAsync(notifications, null);
}
Can someone let me know if it is possible to call the custom webhook's NotifyAsync outside of a MVC or WebApi controller? I already send webhooks within controllers but now also need to add NotifyAsync to a WCF callback. I cannot see how I can get access to the Web hook manager.
The text was updated successfully, but these errors were encountered: