protected void Application_Start() { AreaRegistration.RegisterAllAreas(); StructureMapConfig.Register(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters, ObjectFactory.Container); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); AuthConfig.RegisterAuth(); AutoMapperConfig.Register(); EmailServiceFactory.InitializeEmailServiceFactory(ObjectFactory.GetInstance <IMailService>()); ApplicationSettingsFactory.InitializeApplicationSettingsFactory(ObjectFactory.GetInstance <IApplicationSettings>()); LoggingFactory.InitializeLogFactory(ObjectFactory.GetInstance <ILogger>()); StripeFactory.InitializeStripeFactory(ObjectFactory.GetInstance <IStripeService>()); XmlConfigurator.Configure(new FileInfo(Server.MapPath("~/log4net.config"))); BundleTable.EnableOptimizations = ApplicationSettingsFactory.GetApplicationSettings().EnableOptimizations; #if DEBUG // HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize(); #endif }
public static void ClassInitialize() { _dataBaseConfiguration = new TestsDataBaseConfiguration(); Container = new Container(c => { c.For <EFDbContext>().Use(_dataBaseConfiguration.DbContext).LifecycleIs <SingletonLifecycle>(); c.AddRegistry <TestsRegister>(); c.For <ICustomerResolver>().Use(new DatabaseCustomerResolver(_dataBaseConfiguration.ConnectionString)); }); TestsAutoMapperConfig.Register(); EmailServiceFactory.InitializeEmailServiceFactory(Container.GetInstance <IMailService>()); ApplicationSettingsFactory.InitializeApplicationSettingsFactory(Container.GetInstance <IApplicationSettings>()); StripeFactory.InitializeStripeFactory(Container.GetInstance <IStripeService>()); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); StructureMapConfig.Register(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters, ObjectFactory.Container); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); AutoMapperConfig.Register(); AntiForgeryConfig.UniqueClaimTypeIdentifier = ClaimTypes.PrimarySid; MvcHandler.DisableMvcResponseHeader = true; EmailServiceFactory.InitializeEmailServiceFactory(ObjectFactory.GetInstance <IMailService>()); ApplicationSettingsFactory.InitializeApplicationSettingsFactory(ObjectFactory.GetInstance <IApplicationSettings>()); LoggingFactory.InitializeLogFactory(ObjectFactory.GetInstance <ILogger>()); StripeFactory.InitializeStripeFactory(ObjectFactory.GetInstance <IStripeService>()); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); StructureMapConfig.Register(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters, ObjectFactory.Container); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); XmlConfigurator.Configure(new FileInfo(Server.MapPath("~/log4net.config"))); AutoMapperConfig.Register(); EmailServiceFactory.InitializeEmailServiceFactory(ObjectFactory.GetInstance <IMailService>()); ApplicationSettingsFactory.InitializeApplicationSettingsFactory(ObjectFactory.GetInstance <IApplicationSettings>()); LoggingFactory.InitializeLogFactory(ObjectFactory.GetInstance <ILogger>()); StripeFactory.InitializeStripeFactory(ObjectFactory.GetInstance <IStripeService>()); ModelBinders.Binders.Add(typeof(decimal), new DecimalModelBinder()); }