public IBindingNamedWithOrOnSyntax <T> InRequestScope <T>(IBindingInSyntax <T> syntax) { return(syntax .InScope(context => RevoStartup.RequestScope(context) ?? (object)TaskContext.Current ?? StandardScopeCallbacks.Thread(context))); }
public IBindingNamedWithOrOnSyntax <T> InTaskScope <T>(IBindingInSyntax <T> syntax) { return(syntax .InScope(context => (object)TaskContext.Current ?? context.Kernel.Components.GetAll <INinjectHttpApplicationPlugin>() .Select(c => c.GetRequestScope(context)).FirstOrDefault(s => s != null) ?? StandardScopeCallbacks.Thread(context))); }
public IBindingNamedWithOrOnSyntax <T> InTaskScope <T>(IBindingInSyntax <T> syntax) { return(syntax .InScope(context => TaskContext.Current ?? StandardScopeCallbacks.Thread(context))); }