I was having a heated debate with one of my colleagues on dependency injection, and realized I didn't quite know all the facts on the subject.
So, take this code (just so you know,we're using Castle Windsor)
IPlayerService service = Container.Resolve<IPlayerService>();
The above code is obviously an example of DI using an IoC.
However, see the code below (UPDATE: Assume I'm passing ALL external dependencies through the constructor):
var playerClient = new PlayerClient();
var playerSkinClient = new PlayerSkinClient();
IPlayerService service = new PlayerService(playerClient, playerSkinClient);
My contention was that the above code was an example of DI pattern, and that DI can exist without an IoC.
Now, my colleague didn't completely disagree with my point, but he said that the above code is not example of any pattern involving DI.
So, can DI be used as just a pattern without any extra frameworking?
If so, is the above code an example of it?
Lastly, what defines a DI pattern, if it exists, without the notion of a Container.
UPDATE
I'll be going through the answers and comments more thoroughly later tonight, but just wanted to thank everyone for the well thought out answers and comments so far!