public void DependenciesShouldGetResolvedInNamedScope() { var rootBuilder = new ContainerBuilder(); rootBuilder.RegisterDependencyResolver().InstancePerMatchingLifetimeScope("shell"); var rootContainer = rootBuilder.Build(); var scope = rootContainer.BeginLifetimeScope("shell"); var connMgr = scope.Resolve<IConnectionManager>(); Assert.That(connMgr, Is.Not.Null); var container = scope.Resolve<IDependencyResolver>(); Assert.That(container, Is.Not.Null); }
protected override void Load(ContainerBuilder moduleBuilder) { moduleBuilder.RegisterDependencyResolver().InstancePerMatchingLifetimeScope("shell"); }