Today I was trying to retrofit the source code from Stephen Bohlen’s great SOLID Dimecasts on Dependency Inversion (episode will be released on 3/26/2009) in order to have it use StructureMap (in order to better show the DIP concept in the episode Stephen did not show the use of an IoC container). ...
In a previous post I talked about how you can setup StructureMap to create and use profiles . In this post I would to show you how you can swap out an instance of an object which is part of the profile with a fake/stub for testing. I ran into this scenario the other day while creating a test and...
In a previous post I talked about how you can setup Contextual Binding and Profiles with StructureMap 2.5. However since this post was published, the way you can configure Profiles has changed. Because of this I thought I would post a follow-up on how to do this. I also wanted to give...
*** There may be a better way to do this with StructureMap, but this is the way I was able to get this to work *** Today I decided I wanted to move all my route mapping for Dimecasts out of the Global.asax file and into each of the various Controllers. I wanted to do this for two reasons. I was starting...
One of the great new features with StructureMap 2.5 is the ability to have the container auto-wire you dependencies. This means that if you want to you do not need to register all your types. Prior to this release if you wanted to map IFoo to Foo you needed to do something like this: StructureMapConfiguration...