public override void Activate(FeaturesBootstrapContext ctx) { if (Bootstrapper.Kernel == null) { Bootstrapper.Initialize(CreateKernel); } if (ctx != null) { var kernel = Bootstrapper.Kernel; ctx.Set<IKernel>(kernel); ctx.Set<IServiceCollection>(new NInjectServiceCollection(kernel)); } }
public void Start(params object[] services) { var ctx = new FeaturesBootstrapContext(); ctx.Set(services); OnStart(ctx); Activate(ctx); FeaturesBootstrapContext = ctx; }
private static void OnRegisteredServices(IServiceCollection services, FeaturesBootstrapContext ctx) { var serviceProvider = services.BuildServiceProvider(); ctx.Set(serviceProvider); }
private void Activate(FeaturesBootstrapContext ctx, HttpConfiguration config) { ctx.Set(config); base.Activate(ctx); }