Skip to content

Complex missing dependency bug #84

Closed

Description

@ipjohnson

There looks to be a minor bug when resolving complex nested that rely on missing dependency resolver. It only happens when you force the container to register concrete types automatically.

Here is the test case to cause it

        [Fact]
        public void Scoped_Dependent_MissingType()
        {
            var container = new DependencyInjectionContainer();

            var funcService = container.Locate<DependentService<Func<Scoped<DisposableService>>>>();

            var disposed = false;

            using (var scoped = funcService.Value())
            {
                Assert.NotNull(scoped);
                Assert.NotNull(scoped.Instance);

                scoped.Instance.Disposing += (sender, args) => disposed = true;

                Assert.False(disposed);
            }

            Assert.True(disposed);
        }

Activity

  1. added this to the 6.1.0 milestone on May 15, 2017
  2. added a commit that references this issue on May 15, 2017
  3. ipjohnson commented on May 15, 2017

    @ipjohnson
    OwnerAuthor

    Completed in 6.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions