Wednesday, January 14, 2015

when StructureMap does not use Singleton() and a getsetter is used to get instances of an interface...

This getsetter would be refactored to be like so:

public ILogger Logger
{
   get
   {
      return ObjectFactory.GetInstance<ILogger>();
   }
}

No comments:

Post a Comment