Hello to all,
I'll try to explain the problem as best as I can since it is a bit strange for me.
I have a C# class library that defines a bunch of classes that will used as Data Transfer Objects or DTOs.
There's a Windows Forms application that has a reference to this DTOs class library and also a reference to another class library which defines the Presenters for the Model - View - Presenter pattern.
This presenter class library has a reference to another class library which contains WCF proxy classes.
The WCF proxys class library has a reference to another class library with all the interfaces that define the contracts for the WCF services.
Finally this library with the WCF contracts has a reference to the first DTOs class library since they are received as parameters for the methods.
Now after explaining this infrastructure the problem is that the Windows form project is not compiling the error I'm getting is:
'Proheart.EmployeeView' does not implement interface member 'Proheart.IEmployeeView.JobDescriptions'. 'Proheart.EmployeeView.JobDescriptions' cannot implement 'Proheart.IEmployeeView.JobDescriptions' because it does not have the matching return type of 'System.Collections.Generic.List'.
Basically the code looks like this:
//This interface is defined on the Presenters class library. public interface IEmployeeView { List<JobDescriptionDto> JobDescriptions { set; } } //This is the form in the Windows Forms project public partial class EmployeeView : Form, IEmployeeView { public List<JobDescriptionDto> JobDescriptions { set { ... do something } } }
Please, I need help. I know all the class libraries separation may sound weird but it's because of the deployment strategy.
Thanks.
PS I didn't mention before that the Presenter class library does NOT have a reference to the DTO one and neither does the WCF services proxy. It seems it is being pulled from the Service Interfaces class library since if I manually add it to the Presenter one I get a circular reference error.