Esempio n. 1
0
 protected void Application_Start(object sender, EventArgs e)
 {
     /*IContainer container = AutofacContainerBuilder.BuildContainer();
      * Autofac*/
     //builder.RegisterModule(ApplicationModule);
     AutofacConfigure.Configure();
 }
Esempio n. 2
0
 protected void Application_Start()
 {
     GlobalConfiguration.Configuration.Filters.Add(new ConnectionFilter());
     log4net.Config.XmlConfigurator.Configure();
     AutofacConfigure.Configure();
     GlobalConfiguration.Configure(WebApiConfig.Register);
 }
Esempio n. 3
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public IServiceProvider ConfigureServices(IServiceCollection services)
        {
            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);

            var container = AutofacConfigure.Configure(services);

            return(new AutofacServiceProvider(container));
        }
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var container = AutofacConfigure.Configure();

            Application.Run(container.Resolve <CustomerForm>());
        }
 protected void Application_Start()
 {
     AreaRegistration.RegisterAllAreas();
     GlobalConfiguration.Configure(WebApiConfig.Register);
     FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
     log4net.Config.XmlConfigurator.Configure();
     AutofacConfigure.Configure();
 }
Esempio n. 6
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            var container = AutofacConfigure.Configure();

            var window = container.Resolve <IMainWindow>();

            window.Show();
        }
Esempio n. 7
0
        private static IServiceProvider AutofacService(IServiceCollection services)
        {
            var container = AutofacConfigure.Configure(services);

            return(new AutofacServiceProvider(container));
        }