public class Bus<T>
{
public static readonly IList<IHandler<T>> Handlers = new List<IHandler<T>>();
public static void Register(IHandler<T> handler)
{
if (handler != null)
Handlers.Add(handler);
}
public static void Raise(T eventData)
{
foreach (var handler in Handlers)
{
handler.Handle(eventData);
}
}