Connecting your own IoC container in NServiceBus 4

It seems that in version 5 the NServiceBus API allows you to inject an instance of your own IoC container into the 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 insert an instance of your container into version 4 of NServiceBus? That is, you can only tell NServiceBus about another container, not you.

+3


source to share


1 answer


Yes, it is supported. Syntax:



Configure.With().UnityBuilder(container);

      

+3


source







All Articles