public static Configuration StructureMapBuilder(this Configuration configuration, IContainer container)
 {
     var builder = new StructureMapBuilder(container);
     return configuration
         .CommandExecutorFactoryOf(builder)
         .EventHandlerFactoryOf(builder);
 }
Example #2
0
        /// <summary>
        /// Creates the NSB test container from structure map container.
        /// </summary>
        /// <param name="container">The container.</param>
        /// <returns></returns>
        protected NServiceBus.ObjectBuilder.Common.IContainer CreateNsbTestContainer(StructureMap.IContainer container)
        {
            StructureMapBuilder builder  = new StructureMapBuilder();
            SettingsHolder      settings = new SettingsHolder();

            settings.Set("ExistingContainer", container);
            return(builder.CreateContainer(settings));
        }