private static void InitializeContainer() { var provider = new SimpleInjectorDIProvider(); DIContainer.Current = provider; IocRegistrations.Register(); provider.Container.Verify(); }
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(); }
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(); }