title: How to get all viewmodel fields which is used in ASP.NET Razor view template?
body: <p>I want to get all viewmodel fields which is used in razor view template.
  Template:</p>
  
  <pre><code>@model App.Models.Person
  Name: @Model.Name
  Age: @Model.Age
  </code></pre>
  
  <p>ViewModel:</p>
  
  <pre><code>public class Person
  {
    public string Name { get; set; }
    public string Age { get; set; }
    public string Role { get; set; }
    public string Departament { get; set; }
  }
  </code></pre>
  
  <p>And result of my needs is array of two strings:</p>
  
  <pre><code>['Name','Age']
  </code></pre>
  
  <p>Purpose of our needs is check this fields in csv file, which we import to database, before client import them. View templates are designed by client and we dont know which fields they will use.</p>
  
  <p>Is any way to get this by ViewContext, or I must read all lines of template, and find @Model pattern and extract field which I want?</p>