LifetimeManager can you design it with DSL

Nov 7, 2011 at 7:26 AM

like this ,and use Enum. so we not create intance

container.Register<IMyInterface2, MyImplementation2>() .WithLifetimeManager(LifeTime.Single);

Coordinator
Mar 1, 2012 at 2:54 PM

With the latest release you can

container.Register<IMyInterface2, MyImiplementation2() .AsContainerSingleton();

also

  • AsAlwaysNew
  •  AsCached
  • AsContainerSingleton
  • AsRequestSingleton
  • AsSessionSingleton
  • AsThreadSingleton

Matthew