Beispiel #1
0
        private static void InitializeContainer()
        {
            var provider = new SimpleInjectorDIProvider();

            DIContainer.Current = provider;

            IocRegistrations.Register();

            provider.Container.Verify();
        }
Beispiel #2
0
        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            var provider = new SimpleInjectorDIProvider();

            DIContainer.Current = provider;

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseAuthentication();

            app.UseSimplifyWeb();

            provider.Container.Verify();
        }
Beispiel #3
0
        public void Configuration(IAppBuilder app)
        {
            // Exclude AcspNet from exclude assemblies to be able to load example controllers
            AcspTypesFinder.ExcludedAssembliesPrefixes.Remove("AcspNet");

            var provider = new SimpleInjectorDIProvider();
            DIContainer.Current = provider;

            app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
                LoginPath = new PathString("/login")
            });

            app.UseAesDataProtectorProvider();

            app.UseAcspNet();

            provider.Container.Verify();

            AcspNetOwinMiddleware.OnException += Ex;
        }
Beispiel #4
0
        public void Configuration(IAppBuilder app)
        {
            // Exclude AcspNet from exclude assemblies to be able to load example controllers
            AcspTypesFinder.ExcludedAssembliesPrefixes.Remove("AcspNet");

            var provider = new SimpleInjectorDIProvider();

            DIContainer.Current = provider;

            app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
                LoginPath          = new PathString("/login")
            });

            app.UseAesDataProtectorProvider();

            app.UseAcspNet();

            provider.Container.Verify();

            AcspNetOwinMiddleware.OnException += Ex;
        }
		/// <summary>
		/// Initializes a new instance of the <see cref="SimpleInjectorLifetimeScope"/> class.
		/// </summary>
		/// <param name="provider">The provider.</param>
		public SimpleInjectorLifetimeScope(SimpleInjectorDIProvider provider)
		{
			Container = provider;

			_scope = provider.Container.BeginLifetimeScope();
		}