title: Automapper and inheritance from Collection or List
body: <p>I'm trying to use AutoMapper (v5.1.1) to map an object which inherits from a List or Collection. The map call does not give me an error but the output is an empty list (of correct type though).</p>
  
  <p>I can get a <code>List&lt;DestinationObject&gt;</code> or <code>Collection&lt;DestinationObject&gt;</code>, but it does not seem to work when having a custom class which enherits from <code>List&lt;T&gt;</code> or <code>Collection&lt;T&gt;</code>.</p>
  
  <p>I've tried extending the first map definition to include the base class (<code>List&lt;T&gt;</code>) but that gives me a StackOverflowException.</p>
  
  <pre><code>cfg.CreateMap(typeof(SourceCollection), typeof(DestinationCollection)).Include(typeof(List&lt;SourceObject&gt;), typeof(List&lt;DestinationObject&gt;)); 
  </code></pre>
  
  <p>What am I missing here?</p>
  
  <pre><code>public class SourceCollection : List&lt;SourceObject&gt; {
  
  }
  
  public class DestinationCollection : List&lt;DestinationObject&gt; {
  
  }
  
  public class SourceObject {
  
      public string Message { get; set; }
  }
  
  public class DestinationObject {
  
    public string Message { get; set; }
  }
  
  
  static void Main(string[] args)
  {
  
      AutoMapper.Mapper.Initialize(cfg =&gt;
      {
          cfg.CreateMap(typeof(SourceCollection), typeof(DestinationCollection)); 
          cfg.CreateMap&lt;List&lt;SourceObject&gt;, List&lt;DestinationObject&gt;&gt;().Include&lt;SourceCollection, DestinationCollection&gt;();
          cfg.CreateMap(typeof(SourceObject), typeof(DestinationObject));
      });
  
      AutoMapper.Mapper.AssertConfigurationIsValid();
  
      SourceCollection srcCol = new SourceCollection() { new SourceObject() { Message = "1" }, new SourceObject() { Message = "2" } };
      DestinationCollection dstCol = AutoMapper.Mapper.Map&lt;SourceCollection, DestinationCollection&gt;(srcCol);
  }
  </code></pre>