All posts filed under “NuGet

comment 0

Typed Factories a la Castle Windsor for Unity

I recently finished an implementation of the equivalent of Castle Windsor’s Typed Factories facility, for Unity 2. I decided on the creative name of Unity.TypedFactories :-). As far as I know, there isn’t anything like it out there for Unity, and since I didn’t feel like creating and testing dozens of small factories, I decided to create a simple implementation of Typed Factories. All you need is to declare the factory’s interface: And register it with Unity, through my library’s…

comment 0

An Automatic Factory for the Unity Container (with respective NuGet package :-) )

UPDATE: I recently created an improved version of this idea, in which you are allowed to specify a factory interface, and my framework will automatically tell Unity how to generate an implementation of that factory interface. In the middle of the last sprint of the software project we’re just starting, we had the need for some object factories. Out of the sense of urgency/lack of immediate solutions, we started writing them by hand. I knew we wouldn’t go far down…