I have 2 base interfaces, IViewBase (which all views will implement) and IPresenterBase (which all presenters will implement):
public interface IViewBase { }
public interface IPresenterBase
{
IViewBase View { get; set; }
}
Then i've created a new interface ILogPresenter that derives from IPresenterBase and ILogView deriving from IViewBase:
public interface ILogPresenter : IPresenterBase { }
public interface ILogView : IViewBase{ }
When i create a class that implements ILogPresenter,
public class LogPresenter: ILogPresenter
{
public ILogView View { get; set; }
}
I get an error:
'LogPresenter' does not implement interface member 'IPresenterBase.View'. 'LogPresenter.View' cannot implement 'IPresenterBase.View' because it does not have the matching return type of 'Views.IViewBase'.
I cannot set the return type of LogPresenter.View to ILogView which derives from IViewBase? I would like implement ILogPresenter with a different IView which derives from IViewBase.