private static IUnityContainer ConfigureContainer() { var container = new UnityContainer(); var mediaBuilder = new MediatorBuilder(); mediaBuilder.RegisterHandlers(typeof(MediatorNetUnit).Assembly); UnityExtensioins.Configure(mediaBuilder, container); return(container); }
public void GivenAContainer() { var mediaBuilder = new MediatorBuilder(); mediaBuilder.RegisterHandlers(TestUtilAssembly.Assembly) .ConfigureCommandReceivePipe(x => { x.UseSimpleMiddleware(); }); _container = new UnityContainer(); _container.RegisterType <SimpleService>(); _container.RegisterType <AnotherSimpleService>(); UnityExtensioins.Configure(mediaBuilder, _container); }
private static IUnityContainer ConfigureContainer() { var container = new UnityContainer(); var mediaBuilder = new MediatorBuilder(); mediaBuilder.RegisterHandlers(typeof(Program).Assembly); UnityExtensioins.Configure(mediaBuilder, container); container.RegisterType <ConnectionListener>(); container.RegisterInstance(new RootConfig() { NetworkConfig = new NetworkConfig() { Address = Address, Port = Port } }); return(container); }