|
-
Jan 4th, 2013, 10:10 AM
#12
Re: Interfaces, DI/IoC, unit testing
I would avoid the constructor overloads and only have the constructor that takes the dependencies as parameters. The problem with the no-arg overload is that you're then coupling all your classes that implement this pattern to the container. Ideally, the class (and almost all of your application) doesn't know about the container, it just specifies what external dependencies it needs and does its thing.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|