Advertisement
daegron

Untitled

Dec 5th, 2022
441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.30 KB | None | 0 0
  1. public class LifecycleSingleton {
  2.     public IContainer Container;
  3.  
  4.     public LifecycleSingleton() {
  5.          Container = new Container(x => x.For<IClassX>().LifecycleIs(new SingletonLifecycle()).Use<ClassX>());
  6.          Container = new Container(x => x.For<IClassX>().Singleton().Use<ClassX>());
  7.     }
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement