Skip to content

Commit

Permalink
Update GHIssue399_Func_dependency_on_Singleton_resolved_under_scope_b…
Browse files Browse the repository at this point in the history
…reaks_after_disposing_scope_when_WithFuncAndLazyWithoutRegistration.cs

fixed ci as it does not support `using var` yet
  • Loading branch information
dadhi authored May 10, 2021
1 parent 9c4db3a commit 7313e94
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public int Run()
[Test]
public void Test1()
{
using var container = new Container(rules => rules.WithFuncAndLazyWithoutRegistration());
var container = new Container(rules => rules.WithFuncAndLazyWithoutRegistration());

container.Register<DepFactory>(Reuse.Singleton);
container.Register<Dep>(Reuse.Transient);
Expand All @@ -29,6 +29,8 @@ public void Test1()

var dep = factory.Create();
Assert.IsNotNull(dep);

container.Dispose();
}

class DepFactory
Expand All @@ -47,4 +49,4 @@ public Dep Create()

class Dep { }
}
}
}

0 comments on commit 7313e94

Please sign in to comment.