Guest User

Untitled

a guest
Dec 17th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. public class Baz
  2. {
  3. private readonly IBar bar;
  4. public Baz(IBar bar)
  5. {
  6. this.bar = bar;
  7. }
  8. }
  9.  
  10. var foo = new Foo();
  11. var bar = new Bar(foo);
  12.  
  13. SomeFrameworkClass.SetControllerFactory(() => { // точка входа
  14. var baz = new Baz(bar);
  15. return new Controller(foo, baz);
  16. });
  17.  
  18. public class Baz
  19. {
  20. private readonly IBar bar = App.container.Resolve<IBar>();
  21. }
Add Comment
Please, Sign In to add comment