Contents tagged with StructureMap

  • IoC comparison: Autoregistration in StructureMap

    The StructureMap IoC container has guidance on using Autoregistration which I followed. Earlier I put StructureMap through its paces for basic IoC.

    For Autoregistration, StructureMap uses lambdas, even nested lambdas. The interface is not fluent. The basics are quite simple. StructureMap feels a bit like Ninject under the hood, and there are similarities – both do automatic resolution of unregistered types, and both need custom code to do more complicated Autoregistration scenarios. Both are perfectly usable with a bit customisation.

    Continue reading...

  • Comparing .Net IoC containers, part four: StructureMap

    this test was my first use of StructureMap but I know that it was written by Jeremy D. Miller with help from other contributors. The Apache-licenced source is on Github. It's a fairly modern-looking design, using lambdas. In fact, I could criticise it for requiring lambdas and thus more typing where other IoC containers do not require them. But the point of the single method that does all registration is that it is atomic - it prevents the container being used when registration is half-completed. Continue reading...

  • 1