Пример #1
0
        public void ShouldHookUpWithRootObjwectFromAnotherEntryPoint()
        {
            DependencyInjector pdi = new DependencyInjector();
            object             obj;
            InjectionState     injectionState;

            (obj, injectionState) = pdi.CreateAndInjectDependencies(new DeepHierarchy());
            SomeUser someUser = pdi.CreateAndInjectDependencies <SomeUser>(injectionState
                                                                           , assemblies: new Assembly[] { this.GetType().Assembly }
                                                                           ).rootBean;

            Assert.IsNotNull(someUser.deep);
        }
Пример #2
0
 public MainWindow()
 {
     InitializeComponent();
     DataContext = new SomeUser();
 }