コード例 #1
0
 private static void AssertTransitiveDependencyHasCorrectLocatorInjected(BarUsingSomething bar, IServiceLocator registeredIn, IServiceLocator resolvedFrom)
 {
     // Ninject resolves transitive dependencies from
     // the kernel the dependency was registered in
     Assert.AreSame(registeredIn, bar.Something.Locator);
 }
コード例 #2
0
 private static void AssertTransitiveDependencyHasCorrectLocatorInjected(BarUsingSomething bar, IServiceLocator registeredIn, IServiceLocator resolvedFrom)
 {
     // Unity resolves transitive dependencies from
     // the container the original resolve was called on
     Assert.AreSame(resolvedFrom, bar.Something.Locator);
 }