title: Filter PropertyInfo by attribute enum value
body: <p>I have some custom properties against each of my Models as below</p>
  
  <pre><code>[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
  public class FieldAttribute : System.Attribute
  {
      private FieldFor _fieldFor;
  
      public FieldAttribute(FieldFor fieldFor)
      {
          _fieldFor = fieldFor;
      }
  }
  </code></pre>
  
  <p>The type FieldFor is an enumeration.  So i can declare this against a field like so</p>
  
  <pre><code>[Field(FieldFor.Name)]
  public string Name { get; set; }
  </code></pre>
  
  <p>Now to get a list of the properties on my model that have this custom attribute, i use the following</p>
  
  <pre><code>List&lt;PropertyInfo&gt; props = new MyModel().GetType().GetProperties().Where(prop =&gt; Attribute.IsDefined(prop, typeof(FieldAttribute))).ToList&lt;PropertyInfo&gt;();
  </code></pre>
  
  <p>Now i have the list of all properties that have my custom attribute, how can i get which property has a FieldFor value of Name??</p>
  
  <p>I am doing both queries separately as i have to get the values for many properties on my model</p>