internal DependencyProviderCallStack CreateChild(IDependencyDescriptor descriptor)
        {
            if (descriptor == null)
            {
                throw new ArgumentNullException(nameof(descriptor));
            }

            DependencyStack childStack = _dependencyStack.CreateChild(descriptor);

            childStack.EnsureParentNotSingleton();
            childStack.EnsureNoCircularDependencies();

            return(new DependencyProviderCallStack(LifetimeScope, childStack));
        }
 private DependencyProviderCallStack(LifetimeScope lifetimeScope, DependencyStack dependencyStack) : base(lifetimeScope)
 {
     _dependencyStack = dependencyStack ?? throw new ArgumentNullException(nameof(dependencyStack));
 }
 public DependencyProviderCallStack(LifetimeScope lifetimeScope, IDependencyDescriptor descriptor) : base(lifetimeScope)
 {
     _dependencyStack = new DependencyStack(descriptor ?? throw new ArgumentNullException(nameof(descriptor)));
 }