Guest User

Untitled

a guest
Feb 20th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. this.For<ISomeClass>()
  2. .Use<SomeClass>()
  3. .Singleton();
  4.  
  5. this.For<ISomeClass>()
  6. .Use(c=>c.GetInstance<SomeClass>())
  7. .Singleton();
  8. this.ForConcreteType<SomeClass>()
  9. .Configure
  10. .Singleton();
  11.  
  12. this.For<ISomeClass>()
  13. .Use(c=> new SomeClass(
  14. c.GetInstance<ISomethingElse>(),
  15. c.GetInstance<ISomeOtherThing>(),
  16. c.GetInstance<ITenMoreOfThese>()
  17. ));
Add Comment
Please, Sign In to add comment