public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register( Classes.FromAssemblyInDirectory(new AssemblyFilter(HttpRuntime.BinDirectory, "Application.Web.*")) .BasedOn<IController>() .LifestyleTransient(), Classes.FromAssemblyInDirectory(new AssemblyFilter(HttpRuntime.BinDirectory, "Application.Web.*")) .BasedOn<IHttpController>() .LifestyleTransient() ); container.Register( Component.For<IQueryableUnitOfWork, UnitOfWork>().ImplementedBy<UnitOfWork>(), Component.For<IProfileRepository, ProfileRepository>().ImplementedBy<ProfileRepository>(), Component.For<IAddressRepository, AddressRepository>().ImplementedBy<AddressRepository>(), Component.For<IAddressTypeRepository, AddressTypeRepository>().ImplementedBy<AddressTypeRepository>(), Component.For<IPhoneTypeRepository, PhoneTypeRepository>().ImplementedBy<PhoneTypeRepository>(), Component.For<IPhoneRepository, PhoneRepository>().ImplementedBy<PhoneRepository>(), Component.For<IProfileAddressRepository, ProfileAddressRepository>().ImplementedBy<ProfileAddressRepository>(), Component.For<IProfilePhoneRepository, ProfilePhoneRepository>().ImplementedBy<ProfilePhoneRepository>().LifestyleSingleton(), Component.For<IContactManager>().ImplementedBy<ContactManager>() ); container.AddFacility<LoggingFacility>(f => f.UseLog4Net()); LoggerFactory.SetCurrent(new TraceSourceLogFactory()); EntityValidatorFactory.SetCurrent(new DataAnnotationsEntityValidatorFactory()); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register(Component.For<LastTasksByUserPresenter>() .Named("InnerLastTasksByUserPresenter") .LifeStyle.Transient); container.Register(Component.For<ILastTasksByUserPresenter>() .ImplementedBy<LastTasksByUserPresenterWithScope>() .ServiceOverrides(ServiceOverride.ForKey<ILastTasksByUserPresenter>().Eq("InnerLastTasksByUserPresenter")) .LifeStyle.Transient); container.Register(AllTypes.FromThisAssembly() .Where(Component.IsInSameNamespaceAs<IBlogsFromDatabasePresenter>()) .WithService.DefaultInterface() .Configure(c => c.LifeStyle.Transient)); //container.Register(AllTypes.FromThisAssembly() // .Where(Component.IsInSameNamespaceAs<ILastTasksByUserPresenter>()) // .WithService.DefaultInterface() // .Configure(c => c.LifeStyle.Transient)); container.Register(AllTypes.FromThisAssembly() .Where(Component.IsInSameNamespaceAs<ILastTasksByUserQuery>()) .WithService.DefaultInterface() .Configure(c => c.LifeStyle.Transient)); container.Register(AllTypes.FromThisAssembly() .Where(Component.IsInSameNamespaceAs<IAddPostCommand>()) .WithService.DefaultInterface() .Configure(c => c.LifeStyle.Transient)); }
public void Install( Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register(Component.For<IUser>().ImplementedBy<WebUser>()); container.Register(Component.For<ILoginService>().ImplementedBy<LoginService>()); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.IConfigurationStore store) { container.Register(Component.For<Service.IPersonRepository>() .ImplementedBy<Service.PersonRepository>()); container.Register(Component.For<Service.IPersonQuery>() .ImplementedBy<Service.PersonQuery>()); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register(Component.For<IDB4oServer>() .ImplementedBy<DB4oServer>()); container.Register(Component.For<IContextoProceso>() .ImplementedBy<ContextoProceso>()); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register(Component.For<IAgentService>().LifestylePerThread().ImplementedBy<AgentService>()); container.Register(Component.For<ILog>().LifestylePerThread().UsingFactoryMethod((kernel, componentModel, creationContext) => LogManager.GetLogger(creationContext.Handler.ComponentModel.Implementation))); container.Register(Component.For<InstrumentationConfig>().LifestyleSingleton().Instance(InstrumentationConfig.Config)); container.Register(Component.For<IProviderFactory>().LifestyleSingleton().UsingFactoryMethod(kernel => new ProviderFactory { Kernel = kernel})); container.Register(Component.For<ConnectionStringSettings>().LifestyleSingleton().Instance(ConfigurationManager.ConnectionStrings["NSBInstrumentation"])); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register(Component.For<IUserService>().ImplementedBy<UserService>()); container.Register(Component.For<IApplicationService>().ImplementedBy<ApplicationService>()); container.Register(Component.For<IReportService>().ImplementedBy<ReportService>()); container.Register(Component.For<IEmailService>().ImplementedBy<EmailService>()); container.Register(Component.For<ITileService>().ImplementedBy<TileService>()); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register(Component.For<BalanceDate>() .LifeStyle.Transient ); container.Register(Component.For<IBalanceDateFactory>() .AsFactory() ); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register(AllTypes.FromThisAssembly().BasedOn<IController>().WithServiceSelf().LifestyleTransient()); container.Register( Component.For<ISession>().UsingFactoryMethod(x => Global.CurrentSession).LifestyleTransient() ); System.Web.Mvc.ControllerBuilder.Current.SetControllerFactory(new WindsorControllerFactory(container)); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register(Component.For<CashflowProjectionGroup>() .LifeStyle.Transient ); container.Register(Component.For<ICashflowProjectionGroupFactory>() .AsFactory() ); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register( AllTypes.FromAssemblyInDirectory(new KeyHubApplicationAssemblyFilter()) .BasedOn<IKernelEvent>() .WithService.FirstInterface() .LifestyleTransient()); container.Register(Component.For<IKernelContext>().ImplementedBy<KernelContext>().LifestyleSingleton()); }
public void Install(Castle.Windsor.IWindsorContainer container, IConfigurationStore store) { container.Register(Component.For<HttpRequestBase>() .LifeStyle.PerWebRequest .UsingFactoryMethod(() => new HttpRequestWrapper(HttpContext.Current.Request))); container.Register(Component.For<HttpContextBase>() .LifeStyle.PerWebRequest .UsingFactoryMethod(() => new HttpContextWrapper(HttpContext.Current))); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register(Component.For<IAdministradorEntidad<Rol>>() .ImplementedBy<AdministradorPerfiles>()); container.Register( Component.For<IAdministradorEntidad<Usuario>>() .ImplementedBy<AdministradorUsuarios>() ); container.Register(Component.For<IBugtracker>() .ImplementedBy<BugTrackerPersistente>()); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register(Component.For<StartTaskViewModel>() .Interceptors<LogInterceptor>() .LifestyleTransient()); container.Register(Component.For<WorkbookViewModel>() .Interceptors<LogInterceptor>() .LifestyleTransient()); container.Register(Component.For<IStartTaskViewModelFactory>().AsFactory()); container.Register(Component.For<IWorkbookViewModelFactory>().AsFactory()); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register(Component.For<TaskAutomation>()); container.Register(Component.For<StartTaskAction, ITrayAction>() .Interceptors<LogInterceptor>() .ImplementedBy<StartTaskAction>()); container.Register(Component.For<ViewWorkbookAction, ITrayAction>() .Interceptors<LogInterceptor>() .ImplementedBy<ViewWorkbookAction>()); container.Register(Component.For<Tray>()); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.AddFacility<TypedFactoryFacility>(); container.Register(Classes.FromThisAssembly().BasedOn(typeof(IHub)).LifestyleTransient()); var signalRDependencyResolver = new SignalRDependencyResolver(container); Microsoft.AspNet.SignalR.GlobalHost.DependencyResolver = signalRDependencyResolver; container.Register( Component.For<IUserServiceFactory>().AsFactory() ); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register(AllTypes.FromThisAssembly() .Where(Component.IsInSameNamespaceAs<TasksService>()) .WithService.DefaultInterface() .Configure(c => c.LifeStyle.Transient)); container.Register(Component.For<IEmployeService>() .Named("SpecialEmployeServiceWhichDoesVerySpecialThings") .ImplementedBy<SpecialEmployeServiceWhichDoesVerySpecialThings>() .LifeStyle.Transient); }
/// <summary> /// Performs the installation in the <see cref="T:Castle.Windsor.IWindsorContainer"/>. /// </summary> /// <param name="container">The container.</param> /// <param name="store">The configuration store.</param> public void Install( Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store ) { var conventions = container.Resolve<BootstrapConventions>(); var currentDirectory = Helpers.EnvironmentHelper.GetCurrentDirectory(); container.Register ( AllTypes.FromAssemblyInDirectory( new AssemblyFilter( currentDirectory ).FilterByAssembly( conventions.IncludeAssemblyInContainerScan ) ) .IncludeNonPublicTypes() .Where( t => conventions.IsViewModel( t ) && !conventions.IsExcluded( t ) ) .WithService.Select( ( type, baseTypes ) => conventions.SelectViewModelContracts( type ) ) .Configure( r => { r.PropertiesIgnore( conventions.IgnoreViewModelPropertyInjection ); var services = this.GetServices( r ); if ( conventions.IsShellViewModel( services, r.Implementation) ) { r.LifeStyle.Is( LifestyleType.Singleton ); } else { r.LifeStyle.Is( LifestyleType.Transient ); } } ) ); container.Register ( AllTypes.FromAssemblyInDirectory( new AssemblyFilter( currentDirectory ).FilterByAssembly( conventions.IncludeAssemblyInContainerScan ) ) .IncludeNonPublicTypes() .Where( t => conventions.IsView( t ) && !conventions.IsExcluded( t ) ) .WithService.Select( ( type, baseTypes ) => conventions.SelectViewContracts( type ) ) .Configure( r => { r.PropertiesIgnore( conventions.IgnoreViewPropertyInjection ); var services = this.GetServices( r ); if ( conventions.IsShellView( services, r.Implementation ) ) { r.LifeStyle.Is( LifestyleType.Singleton ); } else { r.LifeStyle.Is( LifestyleType.Transient ); } } ) ); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register( Component.For(typeof(ICacheProvider<>)) .ImplementedBy(typeof(CacheProvider<>)) .LifeStyle.Transient); container.AddFacility<TypedFactoryFacility>(); container.Register( Component.For<ICacheDependencyFactory>() .AsFactory()); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register( AllTypes.FromAssemblyInDirectory(new KeyHubApplicationAssemblyFilter()) .BasedOn<IBusinessRule>() .WithService.AllInterfaces() .LifestyleTransient()); container.Register( Component.For<IBusinessRuleExecutor>().ImplementedBy<BusinessRuleExecutor>().LifestyleTransient()); container.Register(Component.For<IBusinessRuleExecutorFactory>().AsFactory()); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register(Component.For<Dache.Core.Performance.CustomPerformanceCounterManager>().UsingFactoryMethod((c,p) => { return new Dache.Core.Performance.CustomPerformanceCounterManager(_performanceCounterInstanceName, _readOnly); }).LifestyleSingleton()); container.Register(Component.For<PerformanceCounterInterceptor>()); container.Register( Component.For<IMemCache>() .ImplementedBy<MemCache>() .Interceptors<PerformanceCounterInterceptor>() ); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register( Classes.FromThisAssembly() .BasedOn<IController>() .LifestyleTransient() ); container.Register( Classes.FromThisAssembly() .BasedOn<IHttpController>() .LifestyleTransient() ); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register( Classes.FromThisAssembly() .Where(type => type == typeof(Context)) .WithServiceSelf() .LifestylePerWebRequest()); container.Register( Classes.FromThisAssembly() .Where(type => type.Namespace == typeof(GenericRepository<>).Namespace) .WithService .AllInterfaces() .LifestylePerWebRequest()); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register( Component.For<IPolicyViolationHandler>() .LifeStyle.Transient); container.ResolveAll<IPolicyViolationHandler>(); }
protected override void Install(Castle.Windsor.IWindsorContainer container) { container.Register(Classes.FromThisAssembly() .BasedOn(typeof (Task)) .WithService.Self() .LifestyleTransient()); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register(AllTypes.FromThisAssembly() .Where(Component.IsInSameNamespaceAs<ICurrentSiteAccesor>()) .WithService.DefaultInterface() .Configure(c => c.LifeStyle.Transient)); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register( Component.For<IApplicationIssueUnitOfWork>() .ImplementedBy<ApplicationIssueUnitOfWork>() .LifestyleTransient()); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register( Component.For<ContentFilterManager>(), Component.For<ContentFormatBuilder>() ); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register( Component.For<CommandExecutor>(), Component.For<AppCommands>(), Component.For<TextChangedTrigger>(), Component.For<TasksModule>(), Component.For<ProgramService>(), Component.For<AppValueProvider>(), Component.For<VariablesStorage>(), Component.For<Context>(), Component.For<XmlDataSource<ItemsDb>>(), Component.For<DataStorage<ItemsDb>>(), Component.For<ProgramCommand>(), Component.For<StartProcessCommand>(), Component.For<TasksCommand>(), Component.For<MainViewModel>()); }
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store) { container.Register(Classes.FromAssembly(typeof(eCommerce.ApplicationLayer.Customers.ICustomerService).Assembly) .Where(x => !x.IsInterface && !x.IsAbstract && !x.Name.EndsWith("Dto") && x.Namespace.Contains("ApplicationLayer")) .WithService.DefaultInterfaces() .Configure(c => c.LifestyleTransient())); }