user310291
user310291

Reputation: 38228

Example of own IOC container with source code with and without using IOC

I have read this Code your own IOC Container and searched the internet on creating an own ioc container. I don't understand any of the "simple" examples because it's flooded with jargons (why use "resolve" instead of just create method ?) and none shows an example without ioc and refactor it to iOC.

So can someone does something like that in less than 50 lines of code if possible ?

Upvotes: 0

Views: 540

Answers (2)

Doobi
Doobi

Reputation: 4842

My suggestion is - don't build your own.

There are literally dozens of lightweight and popular containers out there with lots of support. If you build it yourself, you support it yourself. Personally I find Microsoft Unity more than enough for most of my needs, it's supported in both .NET and Silverlight, and quite importantly it's got "Microsoft" in front of it to make management happy.

Upvotes: 1

Related Questions