webformsmvp/webformsmvp — pull request #2 by AdamKorczynski (2013-12-04 23:38:05+00:00)
Title: Prevent shared presenter from binding to view of wrong type

Was getting the error below when using a shared presenter because the composite container was trying to bind to views of type not specified in the PresenterBindingAttribute:

"Expected a view of type SomeNamespace.IUserControlView but ASP.some_unrelated_usercontrol_from_same_page_ascx was supplied."

This was because a list filter wasn't checking against elements in the list i.e. candidateViews.Where(true) instead of candidateView.Where(cv => cv is IUserControlView)