public object GetService(Type type) { if (_disposed) { throw new ObjectDisposedException(nameof(IContainerScope)); } // Services are always resolved at runtime, // so we pass the current scope to the runtime method. var services = _runtime.GetServices(new DependencyChain(type), this); return(_backend.CreateService(type, services)); }
public IEnumerable <object> LocateServices(DependencyChain chain) { chain = chain ?? throw new ArgumentNullException(nameof(chain)); return(_runtime.GetServices(chain, _scope)); }