Exemple #1
0
        protected override void Init()
        {
            Kernel.Register(
                Classes.FromAssemblyNamed("KB.Application").Pick().If(t => t.Name.EndsWith("AppService"))
                .Configure(configurer => configurer.Named(configurer.Implementation.Name))
                .WithService.DefaultInterfaces().LifestylePerWebRequest()
                );

            DomainIocInitializer.Init(Kernel);
        }
        protected override void Init()
        {
            Kernel.AppServiceRegister(this.GetType().Assembly);

            DomainIocInitializer.Init(Kernel);

            Kernel.Register(
                Component.For(typeof(ILogger)).ImplementedBy(typeof(Logger))
                .LifestyleScoped(),
                Component.For(typeof(ISession)).ImplementedBy(typeof(Session))
                .LifestyleScoped(),
                Component.For(typeof(IPermissionChecker)).ImplementedBy(typeof(PermissionChecker))
                .LifestyleScoped()
                );
        }
        protected override void Init()
        {
            DomainIocInitializer.Init(Kernel);

            Kernel.Register(
                Component.For(typeof(IDbToS3Service)).ImplementedBy(typeof(DbToS3Service))
                .LifestyleSingleton(),
                Component.For(typeof(IDeleteExpriedFilesService)).ImplementedBy(typeof(DeleteExpiredFilesService))
                .LifestyleSingleton(),
                Component.For(typeof(IFileAppService)).ImplementedBy(typeof(FileAppService))
                .LifestyleScoped(),
                Component.For(typeof(IFileAuthService)).ImplementedBy(typeof(FileAuthService))
                .LifestyleScoped(),
                Component.For(typeof(IStandbyToMainService)).ImplementedBy(typeof(StandbyToMainService))
                .LifestyleSingleton()
                );
        }
Exemple #4
0
        protected override void Init()
        {
            Kernel.AppServiceRegister(this.GetType().Assembly);

            DomainIocInitializer.Init(Kernel);
        }