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