/// <summary> /// Begins a dependency scope. /// </summary> public IDependencyScope BeginScope() { // Unity represents dependency scopes as child containers. IUnityContainer unityChildContainer = this.unityContainer.CreateChildContainer(); // Build the dependency scope. IDependencyScope dependencyScope = new DependencyScope(unityChildContainer); return dependencyScope; }
/// <summary> /// Begins a dependency scope. /// </summary> public IDependencyScope BeginScope() { // Unity represents dependency scopes as child containers. IUnityContainer unityChildContainer = this.unityContainer.CreateChildContainer(); // Build the dependency scope. IDependencyScope dependencyScope = new DependencyScope(unityChildContainer); return(dependencyScope); }