public static IDisposable RequireScope(this IWindsorContainer container) { var current = Scope.ObtainCurrentScope(); if (current == null) { return(container.BeginScope()); } return(null); }
public static IDisposable RequireScope(this IKernel kernel) { var current = Scope.ObtainCurrentScope(); if (current == null) { return(kernel.BeginScope()); } return(null); }