mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Make all event notifications fail fast
--HG-- branch : dev
This commit is contained in:
@@ -21,11 +21,6 @@ namespace Orchard.Events {
|
|||||||
|
|
||||||
|
|
||||||
public IEnumerable Notify(string messageName, IDictionary<string, object> eventData) {
|
public IEnumerable Notify(string messageName, IDictionary<string, object> eventData) {
|
||||||
// call ToArray to ensure evaluation has taken place
|
|
||||||
return NotifyHandlers(messageName, eventData, false/*failFast*/).ToArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable NotifyFailFast(string messageName, IDictionary<string, object> eventData) {
|
|
||||||
// call ToArray to ensure evaluation has taken place
|
// call ToArray to ensure evaluation has taken place
|
||||||
return NotifyHandlers(messageName, eventData, true/*failFast*/).ToArray();
|
return NotifyHandlers(messageName, eventData, true/*failFast*/).ToArray();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,5 @@ using System.Collections.Generic;
|
|||||||
namespace Orchard.Events {
|
namespace Orchard.Events {
|
||||||
public interface IEventBus : IDependency {
|
public interface IEventBus : IDependency {
|
||||||
IEnumerable Notify(string messageName, IDictionary<string, object> eventData);
|
IEnumerable Notify(string messageName, IDictionary<string, object> eventData);
|
||||||
IEnumerable NotifyFailFast(string messageName, IDictionary<string, object> eventData);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user