private void ProcessUsingHandler(INotificationTemplate notificationTemplate, NotificationOptions options, INotificationHandler handler) { var handlerName = handler.GetType().Name; this._logger.LogDebug("Processing notification. handler={0}", handlerName); handler.Handle(notificationTemplate, options); }
public Task Handle(TNotification notification, CancellationToken cancellationToken) { if (runtimeOptions.SkipOutOfBandDecorators) { // Skipping is only important for current handler and must be disabled before invoking the handler // because the handler might invoke additional inner handlers which might be marked as out-of-band. runtimeOptions.SkipOutOfBandDecorators = false; return(inner.Handle(notification, cancellationToken)); } else { EnqueueHangfireJob(inner.GetType(), notification); return(Task.CompletedTask); } }