[ad_1]
I’m utilizing automapper to transform a DTO object to a different object in Xamarin iOS. I am receiving reflection errors that are not supported on iOS. The Dto and goal object each have a group of sub-objects, additionally mapped in Automapper. If I ignore the sub-object assortment, I don’t obtain the error, so I do know the difficulty is particularly associated to making an attempt to map an object who has an IEnumerable
little one property
System.TypeInitializationException: The sort initializer for ‘AutoMapper.Execution.ProxyGenerator’ threw an exception. —> System.PlatformNotSupportedException: Operation just isn’t supported on this platform.
//Mapper config for mother or father sort, after which subtype
CreateMap<EditRequestDto, EditRequestGroup>()
.ForMember(x => x.Entries, decide => decide.MapFrom(y => y.DtoEntries))...
CreateMap<EntryDto, IEditEntry>()...
//Class definitions
public class EditRequestGroup: IEditRequestGroup
{
public IEnumerable<IEditEntry> Entries { get; set; }
...
This works superb on Android. I am unsure why iOS has to make use of reflection right here.
[ad_2]