Skip to content

Instantly share code, notes, and snippets.

@Adamsimsy
Created October 21, 2013 17:08
Show Gist options
  • Save Adamsimsy/7087318 to your computer and use it in GitHub Desktop.
Save Adamsimsy/7087318 to your computer and use it in GitHub Desktop.
public class MvpGlassUserControl<T,K,M> : GlassUserControl<M>
where T : IView<M>
where K : IPresenter
where M : class
{
protected T View { get; set; }
protected K Presenter { get; private set; }
protected override void OnLoad(EventArgs e)
{
View = this as T;
Presenter = DependencyResolver.Instance.Resolve<K>(new { view = this });
Presenter.Init();
base.OnLoad(e);
}
protected override void GetModel()
{
}
}
@mikeedwards83
Copy link

public class MvpGlassUserControl<T,K,M> : GlassUserControl<M>, T<M>
where T : IView
where K : IPresenter
where M : class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment