Here's my presenter class:
public class ListPresenter<TViewInterface, TContext> : Presenter<TViewInterface, TContext>
where TViewInterface : IContextView<TContext>, IListView
where TContext : IObservableObject
{
protected override void OnInitializePresentationComplete(dynamic data)
{
View.ViewPresenter = (ListPresenter<TViewInterface, TContext>)this;
}
}
Here's how I am defining the property in the view:
public ListPresenter<IListView, IObservableObject> ViewPresenter { get; set; }
The compile time exception thrown on the ViewPresenter property is "The type IListView cannot be used as type parameter TViewInterface in the generic type or method ListPresenter<TViewInterface, TContect>
. There is no implicit reference conversion from IListView to IContextview<IObservableObject>
.
Am I defining the ViewPresenter incorrectly? Or am I not casting it correctly? Or both?