mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Changed IEventBus Notify method to accept an IDictionary rather than Dictionary
This commit is contained in:
@@ -25,7 +25,7 @@ namespace Orchard.Tests.Modules.Settings.Topology {
|
|||||||
public void Notify_Obsolete(string messageName, IDictionary<string, string> eventData) {
|
public void Notify_Obsolete(string messageName, IDictionary<string, string> eventData) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Notify(string messageName, Dictionary<string, object> eventData) {
|
public void Notify(string messageName, IDictionary<string, object> eventData) {
|
||||||
LastMessageName = messageName;
|
LastMessageName = messageName;
|
||||||
LastEventData = eventData;
|
LastEventData = eventData;
|
||||||
}
|
}
|
||||||
|
@@ -26,7 +26,7 @@ namespace Orchard.Events {
|
|||||||
_handlers().Invoke(handler => handler.Process(messageName, eventData), Logger);
|
_handlers().Invoke(handler => handler.Process(messageName, eventData), Logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Notify(string messageName, Dictionary<string, object> eventData) {
|
public void Notify(string messageName, IDictionary<string, object> eventData) {
|
||||||
string[] parameters = messageName.Split('.');
|
string[] parameters = messageName.Split('.');
|
||||||
if (parameters.Length != 2) {
|
if (parameters.Length != 2) {
|
||||||
throw new ArgumentException(messageName + T(" is not formatted correctly"));
|
throw new ArgumentException(messageName + T(" is not formatted correctly"));
|
||||||
|
@@ -3,6 +3,6 @@
|
|||||||
namespace Orchard.Events {
|
namespace Orchard.Events {
|
||||||
public interface IEventBus : IDependency {
|
public interface IEventBus : IDependency {
|
||||||
void Notify_Obsolete(string messageName, IDictionary<string, string> eventData);
|
void Notify_Obsolete(string messageName, IDictionary<string, string> eventData);
|
||||||
void Notify(string messageName, Dictionary<string, object> eventData);
|
void Notify(string messageName, IDictionary<string, object> eventData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user