예제 #1
0
        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>()
                );
        }
예제 #2
0
        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>()
                );
        }
예제 #3
0
        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);
        }
예제 #4
0
        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()
                );
        }
예제 #5
0
 protected override void Install(IWindsorContainer container, IConfigurationStore store, FromTypesDescriptor allLoadedTypes)
 {
     container.Register(
         allLoadedTypes
         .BasedOn <IAutoPersistenceModelProvider>()
         .WithService
         .FromInterface()
         );
 }
예제 #6
0
        protected override void Install(IWindsorContainer container, IConfigurationStore store, FromTypesDescriptor allLoadedTypes)
        {
            container.Register(
                allLoadedTypes
                .BasedOn <IPersistenceConfigurerProvider>()
                .WithService
                .FromInterface(),

                Component
                .For <IPersistenceConfigurerProvider>()
                .ImplementedBy <ChainedPersistenceConfigurerProvider>().IsDefault()
                );
        }
예제 #7
0
        protected override void Install(IWindsorContainer container, IConfigurationStore store, FromTypesDescriptor allLoadedTypes)
        {
            container.Register(
                Component
                .For <IResultTransformer>()
                .ImplementedBy <ChainedResultTransformer>()
                .IsDefault(),

                allLoadedTypes
                .BasedOn <IExecutionItemList>()
                .WithService
                .FromInterface()
                );
        }