如何停止 AutoMapper 将其自身的属性添加到我的映射对象中?
例如:ShouldMapProperty
,DefaultMemberConfig
,DestinationMemberNamingConvention
,SourceMemberNamingConvention
等。
这些属性使我无法序列化对象。
典型错误如下:
"Cannot serialize member 'AutoMapper.Profile.ShouldMapProperty' of type 'System.Func`2[[System.Reflection.PropertyInfo, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]', see inner exception for more details."