示例#1
0
        public void Dispose()
        {
            var scope = Scope.ObtainCurrentScope();

            if (scope != null)
            {
                scope.Dispose();
            }
        }
示例#2
0
        public ILifetimeScope GetScope(CreationContext context)
        {
            var scope = Scope.ObtainCurrentScope();

            if (scope == null)
            {
                throw new InvalidOperationException("Scope was not available. Did you forget to call container.BeginScope()?");
            }
            return(scope);
        }