示例#1
0
        public IDependencyResolver BeginScope(object name = null, bool attachToParent = false)
        {
            var scope = new ResolutionScope(this.resolverSelector, this.expressionBuilder,
                                            this.containerContext, this.RootScope, this, this.delegateCache, name);

            return(attachToParent ? this.AddDisposableTracking(scope) : scope);
        }
示例#2
0
        public IDependencyResolver BeginScope(object name = null, bool attachToParent = false)
        {
            this.ThrowIfDisposed();

            var scope = new ResolutionScope(this.expressionFactory,
                                            this.containerContext, this, this.delegateCacheProvider, name);

            return(attachToParent ? this.AddDisposableTracking(scope) : scope);
        }