protected override void Install(IWindsorContainer container, IConfigurationStore store, FromTypesDescriptor allLoadedTypes) { container.Register( Component .For(typeof(IDao <>)) .ImplementedBy(typeof(NHibernateStatefulDao <>)), Component .For <IDao <LogModel> >() .ImplementedBy <NHibernateStatelessDao <LogModel> >() ); }
protected override void Install(IWindsorContainer container, IConfigurationStore store, FromTypesDescriptor allLoadedTypes) { container.Register( Component .For <IResultTransformer>() .ImplementedBy <ChainedResultTransformer>() .IsDefault(), allLoadedTypes .BasedOn <IExecutionItemList>() .WithService .FromInterface() ); }
protected override void Install(IWindsorContainer container, IConfigurationStore store, FromTypesDescriptor allLoadedTypes) { container.Register( Compositor .Of <IInstantiator>() .In(allLoadedTypes) .ImplementedBy <CompositeInstantiator>(), Compositor .Of <IMapper>() .In(allLoadedTypes) .ImplementedBy <CompositeMapper>() ); }
protected override void Install(IWindsorContainer container, IConfigurationStore store, FromTypesDescriptor allLoadedTypes) { container.Register( allLoadedTypes .BasedOn <IPersistenceConfigurerProvider>() .WithService .FromInterface(), Component .For <IPersistenceConfigurerProvider>() .ImplementedBy <ChainedPersistenceConfigurerProvider>().IsDefault() ); }
protected override void Install(IWindsorContainer container, IConfigurationStore store, FromTypesDescriptor allLoadedTypes) { container.Register( allLoadedTypes .BasedOn <IAutoPersistenceModelProvider>() .WithService .FromInterface() ); }
protected override void Install(IWindsorContainer container, IConfigurationStore store, FromTypesDescriptor allLoadedTypes) { container.Register( Component .For(typeof(ILuceneDao <>)) .ImplementedBy(typeof(LuceneDao <>)) .NamedAutomatically("LuceneDao"), Component .For(typeof(ISessionProviderFactory <>)) .ImplementedBy(typeof(LuceneSessionProviderFactory <>), new ImplementationMatchingStrategy(), new ServiceStrategy()) .NamedAutomatically("LuceneSessionProviderFactory"), allLoadedTypes .BasedOn(typeof(ILuceneMap <>)) .WithService .AllInterfaces(), //TODO: Cache decoartor of LuceneSessionProviderFactory<> must be... allLoadedTypes .BasedOn <ILuceneDataProviderFactory>() .WithService .FromInterface(), Decorator .Of <ILuceneDataProviderFactory>() .Is <CacheDecorator>() ); }
protected override void Install(IWindsorContainer container, IConfigurationStore store, FromTypesDescriptor allLoadedTypes) { container.Register( Component .For(typeof(INHibernateStatefulDao <>)) .ImplementedBy(typeof(NHibernateStatefulDao <>)) .NamedAutomatically("NHibernateStatefulDao"), Component .For <ISessionProviderFactory <NHibernateStatefulSession> >() .ImplementedBy <NHibernateStatefulSessionProviderFactory>() .NamedAutomatically("NHibernateStatefulSessionProviderFactory"), Decorator .Of <ISessionProviderFactory <NHibernateStatefulSession> >() .Is <Core.Session.Provider.Factory.Decoration.CacheDecorator <NHibernateStatefulSession> >(), Component .For(typeof(INHibernateStatelessDao <>)) .ImplementedBy(typeof(NHibernateStatelessDao <>)) .NamedAutomatically("INHibernateStatelessDao"), Component .For <ISessionProviderFactory <NHibernateStatelessSession> >() .ImplementedBy <NHibernateStatelessSessionProviderFactory>() .NamedAutomatically("NHibernateStatelessSessionProviderFactory"), Decorator .Of <ISessionProviderFactory <NHibernateStatelessSession> >() .Is <Core.Session.Provider.Factory.Decoration.CacheDecorator <NHibernateStatelessSession> >(), Component .For <INHibernateSessionFactoryBuilder>() .ImplementedBy <DefaultNHibernateSessionFactoryBuilder>(), Decorator .Of <INHibernateSessionFactoryBuilder>() .Is <CacheDecorator>() ); }
protected override void Install(IWindsorContainer container, IConfigurationStore store, FromTypesDescriptor allLoadedTypes) { container.AddFacility <TypedFactoryFacility>(); //IsDefault composti'lerde zaten oluyor olmalı //Composite lerde from interface yettmiyor, all interfaces yap bari :( ya da explicit olarak şu interface diye söyle. container.Register( Compositor .Of <IDefaultSessionProvider>() .In(allLoadedTypes) .ImplementedBy <CompositeDefaultSessionProvider>() .IsDefault(), Compositor .Of <IDefaultSessionAliasProvider>() .In(allLoadedTypes) .ImplementedBy <ChainedSessionAliasProvider>() .IsDefault(), allLoadedTypes .BasedOn <ISession>() .WithService .Self() //.LifestyleCustom<SessionLifeStyleManager>() .LifestyleScoped <ScopeAccessor>() .Configure(registration => registration.UsingFactoryMethod(BuildSession)), Component .For <ISessionLifeStyleProvider>() .ImplementedBy <DefaultSessionLifeStyleProvider>() .IsFallback() ); }
protected override void Install(IWindsorContainer container, IConfigurationStore store, FromTypesDescriptor allLoadedTypes) { container.Register( Component .For(typeof(ILogger <ServiceLog>)) .ImplementedBy(typeof(DemoLogger)), Component .For <IService>() .ImplementedBy <DefaultService>(), Component .For <IContextProvider <InvocationContext> >() .Forward <InvocationContextProvider>() .ImplementedBy <InvocationContextProvider>() .LifeStyle .PerThread ); }
protected override void Install(IWindsorContainer container, IConfigurationStore store, FromTypesDescriptor allLoadedTypes) { //TODO: ISerializer için de default bir registration olmalı container.Register( allLoadedTypes .BasedOn(typeof(IBinarySerializer <>)) .WithService .FirstInterface(), allLoadedTypes .BasedOn(typeof(IXmlSerializer <>)) .WithService .FirstInterface(), allLoadedTypes .BasedOn(typeof(IJsonSerializer <>)) .WithService .FirstInterface(), Component .For <Serializer>(), Component .For <XmlSerializer>(), Component .For <BinarySerializer>(), Component .For <JsonSerializer>() ); }
protected override void Install(IWindsorContainer container, IConfigurationStore store, FromTypesDescriptor allLoadedTypes) { container.Register( Component .For(typeof(IDao <>)) .ImplementedBy(typeof(LuceneDao <>)) ); }
protected override void Install(IWindsorContainer container, IConfigurationStore store, FromTypesDescriptor allLoadedTypes) { container.Register( allLoadedTypes .BasedOn(typeof(IServiceAspect <>)) .WithService .FromInterface() .Configure(ConfigureAspect), allLoadedTypes .BasedOn <IServiceAspectApplier>() .WithService .FromInterface(), Component .For <IServiceAspectApplier>() .ImplementedBy <CompositeServiceAspectApplier>() .IsDefault(), Component .For <IModelInterceptorsSelector>() .ImplementedBy <DefaultModelInterceptorsSelector>() ); IModelInterceptorsSelector modelInterceptorsSelector = container.Resolve <IModelInterceptorsSelector>(); container.Kernel.ProxyFactory.AddInterceptorSelector(modelInterceptorsSelector); }