Created
January 13, 2022 21:00
-
-
Save david-driscoll/a260cb9d670aeecc3327074cd9f1241d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
var config = new MapperConfiguration(expression => | |
{ | |
expression.CreateMap<C, C>().ReverseMap(); // works | |
expression.CreateMap<D, D>(); // stackoverflows | |
}); | |
var mapper = config.CreateMapper(); | |
} | |
private class C | |
{ | |
public string A { get; set; } | |
} | |
private class D | |
{ | |
public E? Bar { get; set; } | |
} | |
private class E : IEnumerable<E> | |
{ | |
public IEnumerator<E> GetEnumerator() | |
{ | |
throw new NotImplementedException(); | |
} | |
IEnumerator IEnumerable.GetEnumerator() | |
{ | |
throw new NotImplementedException(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment