Reputation: 3478
I'm looking to get the interfaces required for a bunch of views we have scattered across a number of projects. Is there a good way to retrieve the model/interface required for a given razor template/view? They all begin with something like:
@inherits Our.Custom.TypeOfView<IModel>
Where TypeOfView
is a class that inherits from System.Web.Mvc.WebViewPage
.
I could potentially do some string searching through all the files, but it feels like there is probably a better way to directly get the information I'm interested in. Maybe there isn't? I don't know, that's why I'm asking this question.
Upvotes: 0
Views: 35
Reputation: 721
How about the Model Metadata?
https://msdn.microsoft.com/en-us/library/system.web.mvc.modelmetadata(v=vs.118).aspx
Upvotes: 1