YieldScope() static private method

Returns current request's scope and detaches it from the request context. Does not throw if scope or context not present. To be used for disposing of the context.
static private YieldScope ( ) : ILifetimeScope
return ILifetimeScope
示例#1
0
        public void Dispose()
        {
            var scope = PerWebRequestLifestyleModule.YieldScope();

            if (scope != null)
            {
                scope.Dispose();
            }
        }