/DependencyInjectionExample

Simple example of a couple of uses of dependency injection illustrating the IoC principle

Primary LanguageC#

DependencyInjectionExample

Simple example of a couple of uses of dependency injection illustrating the IoC principle This code provides an example of dependency injection by method and by constructor.
It includes a thread-safe singleton pattern for the debug log object. Instead of using a DI/IoC framework (creating yet another project dependency), the principle is applied directly and simply.

Unit tests are provided and work, testing the debug log and the SystemInfo example.

The code shown herein was written from scratch in less than a weekend.

If you have questons, please feel free to contact me.

Jeff Jones MSBassSinger@comcast.net