Skip to content

Commit

Permalink
Removed Lazy initialization for Service Bus
Browse files Browse the repository at this point in the history
  • Loading branch information
abnanda1 committed Mar 25, 2014
1 parent d8ce39c commit e4f84ba
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public static IDependencyResolver UseServiceBus(this IDependencyResolver resolve
/// <remarks>Note: Only Windows Azure Service Bus is supported. Service Bus for Windows Server (on-premise) is not supported.</remarks>
public static IDependencyResolver UseServiceBus(this IDependencyResolver resolver, ServiceBusScaleoutConfiguration configuration)
{
var bus = new Lazy<ServiceBusMessageBus>(() => new ServiceBusMessageBus(resolver, configuration));
resolver.Register(typeof(IMessageBus), () => bus.Value);
var bus = new ServiceBusMessageBus(resolver, configuration);
resolver.Register(typeof(IMessageBus), () => bus);

return resolver;
}
Expand Down

0 comments on commit e4f84ba

Please sign in to comment.