I just uploaded the binary release for StructureMap 2.5.3 (download it here). It’s mostly just a small bug fix release, but there are some new little features that might be helpful. The new stuff is:
- GetInstance<T>(name) with explicit args
- Cleanup convenience methods on HttpContext and ThreadLocal. HttpContextBuildPolicy.DisposeAndClearAll(), ThreadLocalStoragePolicy.DisposeAndClearAll(). Calling either method will eject all cached instances and call IDispose if the object is IDisposable.
- Added a partial trust attribute to StructureMap: [assembly: AllowPartiallyTrustedCallers]
- Daniel Guenter contributed a patch that forces StructureMap to create a new object instance every time to disable the BuildSession caching on a PluginType basis. The syntax is: ForRequestedType<IType>().AlwaysUnique().*************
- James Willock contributed a patch on the HttpSession lifecycle. I took another step to make HttpSession default to ThreadLocal if the HttpContext.Current does not exist.
- You can now add a Registry via Xml configuration
- Slight improvements to diagnostic messages
- Made some attribute changes for Azure support
The Future:
My very next priority with StructureMap is frankly to get out of StructureMap development for awhile. To that end, I’m hoping to turn StructureMap into more of a community project instead of Jeremy’s project. In the last couple weeks I’ve gotten 3-4 volunteers to be committers to StructureMap, and frankly, I think it’s going to be much better for that. This release was largely the result of patches sent to me from users, and I definitely appreciate that. I need to get some sort of process / tracking in place for patches. The next priorities are:
- NHibernate Bootstrapper/Registry – basically, I want something that you either pick up out of the box or customize to get NHibernate bootstrapped very quickly with StructureMap. It will most certainly support Fluent NHibernate and Linq for NHibernate
- WCF Integration with StructureMap
- A Silverlight version. Scott MacLellan has already sent me a patch for this, but I just didn’t have time to apply it today.
- Maybe, an idiomatic StructureMap Prism bootstrapper. I started it, but had to put it on the backburner. In the meantime, Ward Bell has a generic Prism bootstrapper that makes the IoC container pluggable, or David Mohundro wrote a StructureMap Prism bootstrapper based on the Unity Bootstrapper. I don’t have the links handy, but I’ll find them if anyone asks.
For my part, I’m hoping to get some documentation together on StructureMap’s internal design and extension points as a guide for other developers to work with the StructureMap codebase.