{"action":"created","issue":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1050","labels_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1050/labels{/name}","comments_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1050/comments","events_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1050/events","html_url":"https://github.com/AutoMapper/AutoMapper/pull/1050","id":128965243,"number":1050,"title":"Added sorting of interfaces (2)","user":{"login":"iskiselev","id":5084964,"avatar_url":"https://avatars.githubusercontent.com/u/5084964?v=3","gravatar_id":"","url":"https://api.github.com/users/iskiselev","html_url":"https://github.com/iskiselev","followers_url":"https://api.github.com/users/iskiselev/followers","following_url":"https://api.github.com/users/iskiselev/following{/other_user}","gists_url":"https://api.github.com/users/iskiselev/gists{/gist_id}","starred_url":"https://api.github.com/users/iskiselev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iskiselev/subscriptions","organizations_url":"https://api.github.com/users/iskiselev/orgs","repos_url":"https://api.github.com/users/iskiselev/repos","events_url":"https://api.github.com/users/iskiselev/events{/privacy}","received_events_url":"https://api.github.com/users/iskiselev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-26T22:35:17Z","updated_at":"2016-01-27T09:39:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/pulls/1050","html_url":"https://github.com/AutoMapper/AutoMapper/pull/1050","diff_url":"https://github.com/AutoMapper/AutoMapper/pull/1050.diff","patch_url":"https://github.com/AutoMapper/AutoMapper/pull/1050.patch"},"body":"Here is more complicated version, that tries to fix problem that @lbargaoanu noted for original (#1037) version.\r\n\r\nThis version will iterate interfaces in such order, that more derived interfaces will be before less derived (for IInterfaceBase:IInterfaceDerived, order will be IInterfaceDerived, IInterfaceBase) and iterate interfaces implemented in more derived type before interface implemented in less derived types (so, if we have Base:IInterface1 and Derived:Base,IInterface2 order will be IInterface2, IInterface1).\r\n\r\nI was not able found any real example where it may really matter, so probably #1037 will be enough and this is not necessary."},"comment":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/comments/175512395","html_url":"https://github.com/AutoMapper/AutoMapper/pull/1050#issuecomment-175512395","issue_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1050","id":175512395,"user":{"login":"iskiselev","id":5084964,"avatar_url":"https://avatars.githubusercontent.com/u/5084964?v=3","gravatar_id":"","url":"https://api.github.com/users/iskiselev","html_url":"https://github.com/iskiselev","followers_url":"https://api.github.com/users/iskiselev/followers","following_url":"https://api.github.com/users/iskiselev/following{/other_user}","gists_url":"https://api.github.com/users/iskiselev/gists{/gist_id}","starred_url":"https://api.github.com/users/iskiselev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iskiselev/subscriptions","organizations_url":"https://api.github.com/users/iskiselev/orgs","repos_url":"https://api.github.com/users/iskiselev/repos","events_url":"https://api.github.com/users/iskiselev/events{/privacy}","received_events_url":"https://api.github.com/users/iskiselev/received_events","type":"User","site_admin":false},"created_at":"2016-01-27T09:39:45Z","updated_at":"2016-01-27T09:39:45Z","body":"I thought about tests, but was not sure how to implement them properly.\r\nIt definitely need unit test, that will check order of interfaces. I can do it. Do it need integration test like issue in #1036? If need how it should be implemented?\r\n\r\nUnfortunately, I don't see how GetRuntimeInterfaceMap may help here.\r\nIt is really complicated now. As I don't see any case, where #1037 is not enough, probably only #1037 should be discussed/merged when it will be good."}}