title: How to tell if a property in a class is mapped by AutoMapper?
body: <p>I'm working on a project (fully open source) that makes a strong integration with AutoMapper. What I would do is: I want to know, at runtime, which are the mappings registered by AM, not only between classes, but I need to know if a specific property in a particular class is mapped at the time, if not I need to map it, if so I ignore, but in one way or another I need to save the name or full path of that property as a string.</p>
  
  <p>For example:</p>
  
  <pre><code>Foo foo = new Foo();
  </code></pre>
  
  <p>1 - foo.bar (must keep the property "bar" for class "Foo")
  2 - foo.Bar.Foo.Bar.Name (need to store the full path "Bar.Foo.Bar.Name" for class "Foo")</p>
  
  <p>In fact I can do that, but there are peculiarities that can escape from my implementation.</p>
  
  <p>The class containing the method I've done so far is in a repository in BitBucket here:
  <a href="https://bitbucket.org/Lunadie/telerikmvcgridcustombindinghelper/src/5e3b8301719d/TelerikMvcGridCustomBindingHelper/Mapper/GridModelMapperBase.cs" rel="nofollow">https://bitbucket.org/Lunadie/telerikmvcgridcustombindinghelper/src/5e3b8301719d/TelerikMvcGridCustomBindingHelper/Mapper/GridModelMapperBase.cs</a></p>
  
  <p>Particularly the methods "CanPassToAutoMapper" and "GetPropertyMap" seems a little fragile and prone to errors, what do you think?</p>