Wednesday, January 14, 2015

Don't make IDisposable types singletons.

ObjectFactory.Initialize(maps =>
{
   maps.For<IFoo>().Use<Foo>();
});

 
 

...is going to be superior to...

ObjectFactory.Initialize(maps =>
{
   maps.For<IFoo>().Singleton().Use<Foo>();
});

 
 

Duh! This goes with this which will make it make some more sense.

No comments:

Post a Comment