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>()
            );
       }
Пример #2
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>()
            );

        }
Пример #3
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()
            );
        }
Пример #4
0
        protected override void Install(IWindsorContainer container, IConfigurationStore store, FromTypesDescriptor allLoadedTypes)
        {
            container.Register(
                allLoadedTypes
                    .BasedOn<IAutoPersistenceModelProvider>()
                    .WithService
                    .FromInterface()
            );

        }
Пример #5
0
        protected override void Install(IWindsorContainer container, IConfigurationStore store, FromTypesDescriptor allLoadedTypes)
        {
            container.Register(
                allLoadedTypes
                    .BasedOn<IConfigurationProcessor>()
                    .WithService
                    .FromInterface(),

                Component
                    .For<IConfigurationProcessor>()
                    .ImplementedBy<CompositeConfigurationProcessor>().IsDefault()
            );

        }
Пример #6
0
        protected override void Install(IWindsorContainer container, IConfigurationStore store, FromTypesDescriptor allLoadedTypes)
        {
            container.Register(
                Component
                    .For<IResultTransformer>()
                    .ImplementedBy<ChainedResultTransformer>()
                    .IsDefault(),

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