public static IEventBus GetSingleton(object key)
{
// Look for existing event-bus.
IEventBus bus = Helper.Collection.First(singletons, delegate(object o)
{
return ((IEventBus)o).Key == key;
}) as IEventBus;
if (bus != null) return bus;
// Create and store a new instance of the event-bus.
bus = new EventBus(key);
singletons.Add(bus);
// Finish up.
return bus;
}
#endregion