BoC.Web.Mvc.IoC.BoCDependencyResolver.DisposeOfChildContainer C# (CSharp) Méthode

DisposeOfChildContainer() public static méthode

public static DisposeOfChildContainer ( WebRequestEventArgs args ) : void
args WebRequestEventArgs
Résultat void
        public static void DisposeOfChildContainer(WebRequestEventArgs args)
        {
            var childContainer = args.HttpContext.Items[HttpContextKey] as IDependencyScope;

            var resolver = childContainer as BoCDependencyResolver;
            if (resolver != null)
            {
                resolver.Dispose(true);
            }
            if (childContainer != null) childContainer.Dispose();
        }