While experimenting with this question on collections in Spring.NET, I discovered that Spring can inject a dependency using a private setter. I have two questions:
- Is this documented anywhere?
- Is using private setters recommended?
The documentation says:
Setter-based DI is realized by calling setter methods on your objects...
Granted, it doesn't explicitly say public setter methods, but that's what I had always assumed. I'm using version 1.0.2 on .NET 3.5.