public static IWindsorContainer ConfigureForNode(this IWindsorContainer container) { InstallConfiguration installConfiguration = new InstallConfiguration { ServiceProfiles = new[] { ServiceAttribute.DefaultProfile }, ScopedLifestyle = lf => lf.PerThread }; return(container.ConfigureForAll(installConfiguration)); }
private static IWindsorContainer ConfigureForAll(this IWindsorContainer container, InstallConfiguration installConfiguration) { // umožní resolvovat i kolekce závislostí - IEnumerable<IDependency> container.Kernel.Resolver.AddSubResolver(new CollectionResolver(container.Kernel)); // facilities container.AddFacility <TypedFactoryFacility>(); container.Register(Component.For(typeof(IServiceFactory <>)).AsFactory()); InstallHavitServices(container); container.InstallByServiceAttibute(typeof(BlockchainTurorial.Services.Properties.AssemblyInfo).Assembly, installConfiguration.ServiceProfiles, installConfiguration.ScopedLifestyle); return(container); }