{"action":"opened","issue":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/2253","repository_url":"https://api.github.com/repos/AutoMapper/AutoMapper","labels_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/2253/labels{/name}","comments_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/2253/comments","events_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/2253/events","html_url":"https://github.com/AutoMapper/AutoMapper/issues/2253","id":248244807,"number":2253,"title":"Mapping src to dest child under parent type based on src data value","user":{"login":"yshahin","id":207449,"avatar_url":"https://avatars3.githubusercontent.com/u/207449?v=4","gravatar_id":"","url":"https://api.github.com/users/yshahin","html_url":"https://github.com/yshahin","followers_url":"https://api.github.com/users/yshahin/followers","following_url":"https://api.github.com/users/yshahin/following{/other_user}","gists_url":"https://api.github.com/users/yshahin/gists{/gist_id}","starred_url":"https://api.github.com/users/yshahin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yshahin/subscriptions","organizations_url":"https://api.github.com/users/yshahin/orgs","repos_url":"https://api.github.com/users/yshahin/repos","events_url":"https://api.github.com/users/yshahin/events{/privacy}","received_events_url":"https://api.github.com/users/yshahin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-06T12:39:16Z","updated_at":"2017-08-06T12:39:16Z","closed_at":null,"body":"Hi,\r\n\r\nI have a object that contains all the information need to to disambiguate different types.\r\nI have a DTO BaseObject with multiple ChildObjects inheriting from BaseObject.\r\nI want BaseObject to be abstract and always convert to one of the children.\r\n\r\nI am looking for a way to do Map<Data, BaseObject> and get one of the children based on an IsMatch() method that is contained in the conversion code.\r\n\r\nI know I can group the isMatch Methods and call them before selecting which Map<Data, Child> but I need to encapsulate this logic with the Child mapping and some way to tell Map<Data, BaseObject> that you are their Map<Data, ChildObject1>, Map<Data, ChildObject2>, Map<Data, ChildObject3> and you can check which one you are using the IsMatch function.\r\n\r\nIs there a way to achieve this using the current implementation? if not, is there a way to extend this library to support such functionality?\r\n\r\nThanks"}}
{"actor":{"display_login":"yshahin"}}