Sergio,
a few things I would change (not so much based on IoC - more interface specification):
interface IDownloader<T> { T DownloadInformation(); }
it seems better to me, then you can implement this in your concrete class:
public class Wrapper : SharpDIC.Api.Interfaces.IDownloader<string> { public Member SearchForMember(int memberID) { XDocument response = GetXmlResponse(memberID);
obviously i used "string" as a type, but you could use any type needed for implementation. I also changed List to IList:
public IList<Visitor> Visitors { get; set; } public IList<Friend> Friends { get; set; } public IList<Comment> Comments { get; set; }
just improves implementation details (after all, we discuss interfaces :-))
that is all - Davidβs answer concerns βmentalβ material (good David) ...
jim tollan
source share