示例#1
0
        public override void Initialize()
        {
            //Dependency Injection
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());

            IocManager.IocContainer.Register(
                Component
                .For <IAuthenticationManager>()
                .UsingFactoryMethod(() => HttpContext.Current.GetOwinContext().Authentication)
                .LifestyleTransient()
                );

            //Areas
            AreaRegistration.RegisterAllAreas();

            //Routes
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            //Bundling
            BundleTable.Bundles.IgnoreList.Clear();
            CommonBundleConfig.RegisterBundles(BundleTable.Bundles);
            AppBundleConfig.RegisterBundles(BundleTable.Bundles); //SPA!
            FrontEndBundleConfig.RegisterBundles(BundleTable.Bundles);
            MpaBundleConfig.RegisterBundles(BundleTable.Bundles); //MPA!
        }
示例#2
0
        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());

            AreaRegistration.RegisterAllAreas();
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            AppBundleConfig.RegisterBundles(BundleTable.Bundles);
        }
示例#3
0
        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());

            Configuration.Modules.AbpWebApi().DynamicApiControllerBuilder
            .ForAll <IApplicationService>(Assembly.GetAssembly(typeof(SettingsApplicationModule)), "app")
            .Build();

            AppBundleConfig.RegisterBundles(BundleTable.Bundles);
        }
示例#4
0
        public override void Initialize()
        {
            //Dependency Injection
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());

            IocManager.IocContainer.Register(
                Component
                .For <IAuthenticationManager>()
                .UsingFactoryMethod(() => HttpContext.Current.GetOwinContext().Authentication)
                .LifestyleTransient()
                );

            //Areas
            AreaRegistration.RegisterAllAreas();

            //Routes
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            //Bundling
            BundleTable.Bundles.IgnoreList.Clear();
            CommonBundleConfig.RegisterBundles(BundleTable.Bundles);
            AppBundleConfig.RegisterBundles(BundleTable.Bundles);//SPA!
            FrontEndBundleConfig.RegisterBundles(BundleTable.Bundles);

            AppVar.DefaultConnectString = System.Configuration.ConfigurationManager.ConnectionStrings["Default"].ConnectionString;

            // hangfire
            var manager = new RecurringJobManager();

            manager.AddOrUpdate("HangFileSchedulerLienThongTuCongBo"
                                , Job.FromExpression(() => new HangFileScheduler().HangFileSchedulerLienThongTuCongBo())
                                , Cron.MinuteInterval(5));

            manager.AddOrUpdate("HangFileSchedulerLienThongDangKyCongBo"
                                , Job.FromExpression(() => new HangFileScheduler().HangFileSchedulerLienThongDangKyCongBo())
                                , Cron.MinuteInterval(5));

            manager.AddOrUpdate("HangFileSchedulerLienThongDangKyQuangCao"
                                , Job.FromExpression(() => new HangFileScheduler().HangFileSchedulerLienThongDangKyQuangCao())
                                , Cron.MinuteInterval(5));

            manager.AddOrUpdate("HangFileSchedulerLienThongCoSoDuDieuKien"
                                , Job.FromExpression(() => new HangFileScheduler().HangFileSchedulerLienThongCoSoDuDieuKien())
                                , Cron.MinuteInterval(5));
        }