質問

何らかの理由で、EmitMapperサンプルからCharmingConfigを使用すると、Custom ConverterのCOMPER機能は呼び出されません。DefaultMapConfigが使用されている場合は呼び出されます。

構成:

    var userMapper = ObjectMapperManager.DefaultInstance.GetMapper<User, UserModel>(
                   new FlatteringConfig().ConvertGeneric(typeof(IList<>), typeof(IList<>),
                new DefaultCustomConverterProvider(typeof(EntityListToModelListConverter<,>))));
.

潜在的な理由についてのアイデア?

溶液

下の私の答えを見て

役に立ちましたか?

解決

Because FlatteringConfig overrides GetMappingOperations function it is not calling FilterOpertations functions, which assigns custom converters. So adding FilterOperations function call to the GetMappingOperations solved the problem.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top