Пример #1
0
 protected void Application_Start()
 {
     AutoMapperConfig.ConfigureAutoMapper();
     GlobalConfiguration.Configure(WebApiConfig.Register);
     AreaRegistration.RegisterAllAreas();
     FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
 }
Пример #2
0
 protected void Application_Start()
 {
     NInjectConfig.SetupDependencyInjection();
     AreaRegistration.RegisterAllAreas();
     FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
     AutoMapperConfig.ConfigureAutoMapper();
 }
Пример #3
0
        /// <summary>
        /// RegisterRoutes is used to register the module's routes
        /// </summary>
        /// <param name="mapRouteManager"></param>
        public void RegisterRoutes(IMapRoute mapRouteManager)
        {
            //mapRouteManager.MapHttpRoute(
            //    moduleFolderName: "dnn_OpenNewsSPA",
            //    routeName: "default",
            //    url: "{controller}/{itemId}",
            //    defaults: new { itemId = RouteParameter.Optional },
            //    namespaces: new[] { "YeditUK.Modules.dnn_OpenNews.Services" });
            var route = mapRouteManager.MapHttpRoute("dnn_OpenNewsSPA", "default", "{controller}/{action}", new string[] { "YeditUK.Modules.dnn_OpenNews.Services" });

            AutoMapperConfig.ConfigureAutoMapper();
        }
Пример #4
0
        protected void Application_Start()
        {
            GlobalConfiguration.Configure(WebApiConfig.Register);
            AutoMapperConfig.ConfigureAutoMapper();

            string threadConf = ConfigurationManager.AppSettings["MinThreads"];

            if (threadConf != null)
            {
                int minThreads = Int32.Parse(threadConf);

                // we strongly recommend that customers set the minimum configuration value for
                // IOCP and WORKER threads to something larger than the default value. We can't
                // give one-size-fits-all guidance on what this value should be because the right
                // value for one application will likely be too high or low for another application.
                // This setting can also impact the performance of other parts of complicated
                // applications, so each customer needs to fine-tune this setting to their specific
                // needs. A good starting place is 200 or 300, then test and tweak as needed.
                // https://docs.microsoft.com/en-us/azure/azure-cache-for-redis/cache-faq#important-details-about-threadpool-growth
                ThreadPool.SetMinThreads(minThreads, minThreads);
            }
        }
Пример #5
0
 protected void Application_Start()
 {
     GlobalConfiguration.Configure(WebApiConfig.Register);
     AutoMapperConfig.ConfigureAutoMapper();
 }
 public void Setup()
 {
     AutoMapperConfig.ConfigureAutoMapper();
     _calculateDatesService = MockRepository.GenerateStub <ICalculateDatesService>();
     _controller            = new DisplayDatesController(_calculateDatesService);
 }
Пример #7
0
 public void Configuration(IAppBuilder app)
 {
     ConfigureAuth(app);
     AutoMapperConfig.ConfigureAutoMapper();
 }