There seem to be a number of posts out there on how to use an SignalR with an IoC container e.g. MS Unity. Nearly all of them of them seem to be taking a sledgehammer approach to solve what most people generally want to do, which is create their Hubs with an IoC container. They … Continue reading SignalR with an IoC container
Unity Automapper in 10 minutes
http://www.youtube.com/watch?v=Bkc9kEq4CD0 If you have ten minutes (well, 12), and use the Microsoft Unity DI framework, take a look at the Unity Automapper. It removes the need to manually map interfaces to concretes, as well as offering powerful new features to enable plug-ins and easy-to-use AOP. Make sure you watch in HD to actually see the … Continue reading Unity Automapper in 10 minutes
Unity Call Handlers released on NuGet
Having worked on this for a while, I've now released a set of simple, easy-to-use call handlers for Unity on NuGet. These include Method Logging, Timing, Caching and null argument Validators. I might add to this collection in future - the source code is on GitHub so you have a look through it as you … Continue reading Unity Call Handlers released on NuGet
Unity Automapper 1.3 released
A new version of the Unity Automapper (1.3) is now available on NuGet. It now supports a fluent-style, provider API in addition to the attribute-based model for overriding default settings etc. I’ve also decided to open-source the Unity Automapper at this time and push it onto GitHub. There are several reasons for this. Primarly, I’ve … Continue reading Unity Automapper 1.3 released
Unity Automapper 1.2 released
Unity Automapper is probably nearly finished. There aren’t many features left that I want to implement without over-complicating things – which is one of the main goals I want to avoid. Things I am looking at include adding a mechanism to allow an assembly to provide configuration details rather than attributes placed directly on types, … Continue reading Unity Automapper 1.2 released
Unity Automapper 1.1 released
I’ve released a new version of my Unity Automapper today. It introduces what I’m finding to be a powerful feature of Unity that I call Multimapping which gives plug-in style capabilities in a very flexible manner. Using Unity as an Collection Factory Let’s say you had implemented a command pattern, and being a good developer … Continue reading Unity Automapper 1.1 released
Using Unity Call Handlers to compose logic
The most common use of Unity Call Handlers (or Interceptors) is for cross-cutting concerns. I’ve demonstrated the use of such handlers in the past for things such as logging or caching. However, there’s another use for these handlers that allows us to build reusable blocks of business-related code that can be composed together to act … Continue reading Using Unity Call Handlers to compose logic
Using Unity Automapper, Step-by-step
Although it’s pretty self-explanatory, I thought that some simple instructions how to use the Unity Automapper might be a good idea anyway. Installation If you’re reading this, there’s a good chance you’re coming here from the link in NuGet’s description, in which case you can skip straight to the Usage section below. Otherwise, read on… … Continue reading Using Unity Automapper, Step-by-step
Unity Automapper on NuGet
I wrote many, many moons ago about doing auto-mapping in Unity using e.g. reflection etc. instead of resorting to config files etc.. Well I’ve now released, via NuGet, a package that offers exactly that. It’s not the most configurable API but supports what I believe are the most common use-cases for auto registration, allowing you … Continue reading Unity Automapper on NuGet
Unity’s [OptionalDependency] – don’t do it
Just a quick tip – when using Unity for DI - DON’T use the [OptionalDependency] attribute unless you absolutely have to. Why? Because it can be incredibly unslow. I’ve not had a look at the source code so can’t know exactly, but as I recall, the way that Unity deals with OptionalDependencies when they are … Continue reading Unity’s [OptionalDependency] – don’t do it