private static IMessageBus GetMessageBus()
{
IServiceLocator serviceLocator = ServiceLocator.Current;
if (serviceLocator == null)
{
throw new ConfigurationErrorsException("AspComet has not been configured. Either use the default configuration or set up a service locator");
}
return serviceLocator.GetInstance<IMessageBus>();
}