{"action":"created","issue":{"url":"https://api.github.com/repos/Fody/PropertyChanged/issues/336","repository_url":"https://api.github.com/repos/Fody/PropertyChanged","labels_url":"https://api.github.com/repos/Fody/PropertyChanged/issues/336/labels{/name}","comments_url":"https://api.github.com/repos/Fody/PropertyChanged/issues/336/comments","events_url":"https://api.github.com/repos/Fody/PropertyChanged/issues/336/events","html_url":"https://github.com/Fody/PropertyChanged/pull/336","id":318675709,"number":336,"title":"Support for explicit interface implementations","user":{"login":"worldbeater","id":6759207,"avatar_url":"https://avatars0.githubusercontent.com/u/6759207?v=4","gravatar_id":"","url":"https://api.github.com/users/worldbeater","html_url":"https://github.com/worldbeater","followers_url":"https://api.github.com/users/worldbeater/followers","following_url":"https://api.github.com/users/worldbeater/following{/other_user}","gists_url":"https://api.github.com/users/worldbeater/gists{/gist_id}","starred_url":"https://api.github.com/users/worldbeater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/worldbeater/subscriptions","organizations_url":"https://api.github.com/users/worldbeater/orgs","repos_url":"https://api.github.com/users/worldbeater/repos","events_url":"https://api.github.com/users/worldbeater/events{/privacy}","received_events_url":"https://api.github.com/users/worldbeater/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/Fody/PropertyChanged/milestones/42","html_url":"https://github.com/Fody/PropertyChanged/milestone/42","labels_url":"https://api.github.com/repos/Fody/PropertyChanged/milestones/42/labels","id":3322699,"number":42,"title":"2.5.5","description":"","creator":{"login":"SimonCropp","id":122666,"avatar_url":"https://avatars1.githubusercontent.com/u/122666?v=4","gravatar_id":"","url":"https://api.github.com/users/SimonCropp","html_url":"https://github.com/SimonCropp","followers_url":"https://api.github.com/users/SimonCropp/followers","following_url":"https://api.github.com/users/SimonCropp/following{/other_user}","gists_url":"https://api.github.com/users/SimonCropp/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonCropp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonCropp/subscriptions","organizations_url":"https://api.github.com/users/SimonCropp/orgs","repos_url":"https://api.github.com/users/SimonCropp/repos","events_url":"https://api.github.com/users/SimonCropp/events{/privacy}","received_events_url":"https://api.github.com/users/SimonCropp/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":1,"state":"closed","created_at":"2018-05-05T10:54:36Z","updated_at":"2018-05-05T10:55:18Z","due_on":null,"closed_at":"2018-05-05T10:55:18Z"},"comments":3,"created_at":"2018-04-28T23:17:06Z","updated_at":"2018-05-05T10:58:18Z","closed_at":"2018-05-05T10:54:13Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/Fody/PropertyChanged/pulls/336","html_url":"https://github.com/Fody/PropertyChanged/pull/336","diff_url":"https://github.com/Fody/PropertyChanged/pull/336.diff","patch_url":"https://github.com/Fody/PropertyChanged/pull/336.patch"},"body":"This PR adds support for explicit interface implementations to PropertyChanged.Fody. The current behavior is, that if Fody finds a method that is hidden from derived classes, it begins to panic and says: `Cannot use '{MethodReference.FullName}' in '{TypeDefinition.FullName}' since that method is not visible from the child class.`\r\n\r\nDue to this, one could hardly use this awesome library with [ReactiveUI MVVM framework](https://github.com/reactiveui/ReactiveUI/blob/74b25861184ce59f2e1e890efa0faf2324991d45/src/ReactiveUI/ReactiveObject.cs#L67) - ReactiveUI's [ReactiveObject](https://github.com/reactiveui/ReactiveUI/blob/74b25861184ce59f2e1e890efa0faf2324991d45/src/ReactiveUI/ReactiveObject.cs#L62) uses explicit interface implementation, RaisePropertyChanged method is hidden:\r\n```csharp\r\npublic class ReactiveObject {\r\n  void IReactiveObject.RaisePropertyChanged(PropertyChangedEventArgs args) {\r\n    PropertyChangedEventManager.DeliverEvent(this, args);\r\n  }\r\n}\r\n```\r\nAlso ReactiveObjects have a custom PropertyChanged event implementation:\r\n```csharp\r\npublic class ReactiveObject {\r\n  public event PropertyChangedEventHandler PropertyChanged {\r\n    add { PropertyChangedEventManager.AddHandler(this, value); }\r\n    remove { PropertyChangedEventManager.RemoveHandler(this, value); }\r\n  }\r\n}\r\n```\r\nThe first commit in this PR fixes the issue, so now PropertyChanged.Fody plays well with ReactiveUI framework – see the unit tests with an updated base class for ReactiveUI. But current code doesn't support multiple levels of inheritance – it scans only interfaces that a base class implements. Need to mention, that I am not an expert in Mono.Cecil at all, and any help from respectful contributors and maintainers would be highly appreciated. Thanks in advance.\r\n\r\nThese are the plans:\r\n- [x] Add support for ReactiveUI and ReactiveObjects\r\n- [x] Update tests to use the latest ReactiveUI version base class\r\n- [x] Support multiple levels of inheritance\r\n- [x] Write tests to ensure Fody always plays well with explicit implementations"},"comment":{"url":"https://api.github.com/repos/Fody/PropertyChanged/issues/comments/386797264","html_url":"https://github.com/Fody/PropertyChanged/pull/336#issuecomment-386797264","issue_url":"https://api.github.com/repos/Fody/PropertyChanged/issues/336","id":386797264,"user":{"login":"SimonCropp","id":122666,"avatar_url":"https://avatars1.githubusercontent.com/u/122666?v=4","gravatar_id":"","url":"https://api.github.com/users/SimonCropp","html_url":"https://github.com/SimonCropp","followers_url":"https://api.github.com/users/SimonCropp/followers","following_url":"https://api.github.com/users/SimonCropp/following{/other_user}","gists_url":"https://api.github.com/users/SimonCropp/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonCropp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonCropp/subscriptions","organizations_url":"https://api.github.com/users/SimonCropp/orgs","repos_url":"https://api.github.com/users/SimonCropp/repos","events_url":"https://api.github.com/users/SimonCropp/events{/privacy}","received_events_url":"https://api.github.com/users/SimonCropp/received_events","type":"User","site_admin":false},"created_at":"2018-05-05T10:58:18Z","updated_at":"2018-05-05T10:58:18Z","author_association":"OWNER","body":"thanks peeps. this is now deployed"}}
{"actor":{"display_login":"SimonCropp"}}