Ninject Scope and System.Threading.Timer
问题 How to invoke a new Ninject context on a Timer task? Having a hard time configuring ninject scope to unitofwork. If I set as InRequestScope() it doesn't work on non request tasks. So I set up like below so that I can get InThreadScope for tasks: kernel.Bind<IUnitOfWork>().To<myEntities>().InScope(ctx => HttpContext.Current ?? StandardScopeCallbacks.Thread(ctx)); But that way, when I set up a timer Timer timer = new Timer(_ => DelayedDisconnect(chatUser.User.AuthorizationId), null, TimeSpan