Reputation: 11887
It seems that in version 5 of NServiceBus the API allows you to inject an instance of your own IoC container into NServiceBus with the following syntax:
configuration.UseContainer<UnityBuilder>(c => c.UseExistingContainer(unityContainer));
The only mentioned syntax for version 4 is as follows:
Configure.With().UsingContainer<UnityObjectBuilder>();
Is it correct that you cannot inject an instance of your own container in version 4 of NServiceBus? I.e. you can only tell NServiceBus to use another container, but not yours specifically.
Upvotes: 3
Views: 207
Reputation: 28016
Yes, that's supported. The syntax is:
Configure.With().UnityBuilder(container);
Upvotes: 3