By tag: DI
0
kicks
Automatic Factories With Unity 2.0
Unity 2.0 comes with new features. But the feature i want to talk about is "Automatic Factory". This feature is useful when one class has a dependency in another but may not need to have the instance of dependency in the constructor. Or, just want to create the dependency in another time.
0
kicks
Unit testing WCF services through dependency injection
"When building a WCF service in an enterprise application, this service frequently depends on other services or resources. When creating unit tests for this service, we don’t want to host all these other services over WCF endpoints. Instead we will most likely want to inject mock objects. In so...
0
kicks
TDD Design Starter Kit - Dependency Inversion Principle
In the last episode of the TDD Design Starter Kit, I talked about the need to build cohesive classes, and make the relationships between classes loosely coupled. The specific benefit for TDD is to truly isolate the functionality of a class under the microscope of a unit test. But we've done all we c...
0
kicks
StructureMap 2.5.1 Released
Jeremy D. Miller, the author of Structuremap, has recently released a incremental release of this popular DI framework. He has listed new features and bug fixes as well as future plans for SM.
0
kicks
Common IoC denominator for Autofac, Castle and Unity .NET Containers
What’s the common denominator for the Autofac, Castle, Unity and other popular .NET containers?
Some think, that it is the CommonServiceLocator - an interface that will allow library developers to abstract from the specific Container or Service Locator implementation.
0
kicks
BFG: DSL configuration syntax for Autofac IoC Container
This might be interesting for people that use popular IoC container for .NET - Autofac. Now it is possible to configure this container with the custom DSL syntax that is more flexible and efficient than plain XML configuration.
0
kicks
Building A Fluent Interface for MEF
Lately I've been digging more and more into the first CTP of the Managed Extensibility Framework (MEF) coming out of Krzysztof Cwalina's team here at Microsoft. By default, a developer needs to sprinkle Export and Import attributes in their classes at the point they are needing something to be injec...
0
kicks
Circumventing statics and singletons
A useful dependency injection pattern to make singletons and static members somewhat testable and decouple implementations.
0
kicks
Dependency Injection from the Trenches
Example of how to incorporate dependency injection to make code that depends on external resources testable.