{"action":"created","comment":{"url":"https://api.github.com/repos/reactiveui/ReactiveUI/pulls/comments/48449872","id":48449872,"diff_hunk":"@@ -10,7 +8,16 @@ public class PlatformRegistrations : IWantsToRegisterStuff\n     {\n         public void Register(Action<Func<object>, Type> registerFunction)\n         {\n+            if (IsRunningFromNUnit()) return;","path":"ReactiveUI/PortableLibraryStubs.cs","position":14,"original_position":14,"commit_id":"c8a8292fde7a0617338110c55bfbf8c7d6947e1d","original_commit_id":"c8a8292fde7a0617338110c55bfbf8c7d6947e1d","user":{"login":"OlexaLe","id":4376913,"avatar_url":"https://avatars.githubusercontent.com/u/4376913?v=3","gravatar_id":"","url":"https://api.github.com/users/OlexaLe","html_url":"https://github.com/OlexaLe","followers_url":"https://api.github.com/users/OlexaLe/followers","following_url":"https://api.github.com/users/OlexaLe/following{/other_user}","gists_url":"https://api.github.com/users/OlexaLe/gists{/gist_id}","starred_url":"https://api.github.com/users/OlexaLe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlexaLe/subscriptions","organizations_url":"https://api.github.com/users/OlexaLe/orgs","repos_url":"https://api.github.com/users/OlexaLe/repos","events_url":"https://api.github.com/users/OlexaLe/events{/privacy}","received_events_url":"https://api.github.com/users/OlexaLe/received_events","type":"User","site_admin":false},"body":"Unfortunately it does not work on my test project. According to Splat source code https://github.com/paulcbetts/splat/blob/master/Splat/ModeDetector.cs there is no way on how to detect a unit test, but my solution works.","created_at":"2015-12-26T21:13:04Z","updated_at":"2015-12-26T21:13:04Z","html_url":"https://github.com/reactiveui/ReactiveUI/pull/1008#discussion_r48449872","pull_request_url":"https://api.github.com/repos/reactiveui/ReactiveUI/pulls/1008","_links":{"self":{"href":"https://api.github.com/repos/reactiveui/ReactiveUI/pulls/comments/48449872"},"html":{"href":"https://github.com/reactiveui/ReactiveUI/pull/1008#discussion_r48449872"},"pull_request":{"href":"https://api.github.com/repos/reactiveui/ReactiveUI/pulls/1008"}}},"pull_request":{"url":"https://api.github.com/repos/reactiveui/ReactiveUI/pulls/1008","id":54607084,"html_url":"https://github.com/reactiveui/ReactiveUI/pull/1008","diff_url":"https://github.com/reactiveui/ReactiveUI/pull/1008.diff","patch_url":"https://github.com/reactiveui/ReactiveUI/pull/1008.patch","issue_url":"https://api.github.com/repos/reactiveui/ReactiveUI/issues/1008","number":1008,"state":"open","locked":false,"title":"Portable PlatformRegistrations should work from unit tests","user":{"login":"OlexaLe","id":4376913,"avatar_url":"https://avatars.githubusercontent.com/u/4376913?v=3","gravatar_id":"","url":"https://api.github.com/users/OlexaLe","html_url":"https://github.com/OlexaLe","followers_url":"https://api.github.com/users/OlexaLe/followers","following_url":"https://api.github.com/users/OlexaLe/following{/other_user}","gists_url":"https://api.github.com/users/OlexaLe/gists{/gist_id}","starred_url":"https://api.github.com/users/OlexaLe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlexaLe/subscriptions","organizations_url":"https://api.github.com/users/OlexaLe/orgs","repos_url":"https://api.github.com/users/OlexaLe/repos","events_url":"https://api.github.com/users/OlexaLe/events{/privacy}","received_events_url":"https://api.github.com/users/OlexaLe/received_events","type":"User","site_admin":false},"body":"When use Xamarin Studio on OS X it is not possible to use ReactiveUI in Unit Testing Library projects. I am able to add \"reactiveui-testing\" nuget package, but during ReactiveUI initialisation it uses PlatformRegistrations from PortableLibraryStubs and crashes. As we do not need any additional registrations during unit tests I propose to allow ReactiveUI work when NUnit in loaded. This assumption smells like a hack, but at least this allows us to use ReactiveUI in our production process. Thanks!","created_at":"2015-12-26T20:34:20Z","updated_at":"2015-12-26T21:13:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d52222ccb4a9c2e5c9a0b5f514ac84d0d7570513","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/reactiveui/ReactiveUI/pulls/1008/commits","review_comments_url":"https://api.github.com/repos/reactiveui/ReactiveUI/pulls/1008/comments","review_comment_url":"https://api.github.com/repos/reactiveui/ReactiveUI/pulls/comments{/number}","comments_url":"https://api.github.com/repos/reactiveui/ReactiveUI/issues/1008/comments","statuses_url":"https://api.github.com/repos/reactiveui/ReactiveUI/statuses/c8a8292fde7a0617338110c55bfbf8c7d6947e1d","head":{"label":"OlexaLe:master","ref":"master","sha":"c8a8292fde7a0617338110c55bfbf8c7d6947e1d","user":{"login":"OlexaLe","id":4376913,"avatar_url":"https://avatars.githubusercontent.com/u/4376913?v=3","gravatar_id":"","url":"https://api.github.com/users/OlexaLe","html_url":"https://github.com/OlexaLe","followers_url":"https://api.github.com/users/OlexaLe/followers","following_url":"https://api.github.com/users/OlexaLe/following{/other_user}","gists_url":"https://api.github.com/users/OlexaLe/gists{/gist_id}","starred_url":"https://api.github.com/users/OlexaLe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlexaLe/subscriptions","organizations_url":"https://api.github.com/users/OlexaLe/orgs","repos_url":"https://api.github.com/users/OlexaLe/repos","events_url":"https://api.github.com/users/OlexaLe/events{/privacy}","received_events_url":"https://api.github.com/users/OlexaLe/received_events","type":"User","site_admin":false},"repo":{"id":48622275,"name":"ReactiveUI","full_name":"OlexaLe/ReactiveUI","owner":{"login":"OlexaLe","id":4376913,"avatar_url":"https://avatars.githubusercontent.com/u/4376913?v=3","gravatar_id":"","url":"https://api.github.com/users/OlexaLe","html_url":"https://github.com/OlexaLe","followers_url":"https://api.github.com/users/OlexaLe/followers","following_url":"https://api.github.com/users/OlexaLe/following{/other_user}","gists_url":"https://api.github.com/users/OlexaLe/gists{/gist_id}","starred_url":"https://api.github.com/users/OlexaLe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlexaLe/subscriptions","organizations_url":"https://api.github.com/users/OlexaLe/orgs","repos_url":"https://api.github.com/users/OlexaLe/repos","events_url":"https://api.github.com/users/OlexaLe/events{/privacy}","received_events_url":"https://api.github.com/users/OlexaLe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/OlexaLe/ReactiveUI","description":"A MVVM framework that integrates with the Reactive Extensions for .NET to create elegant, testable User Interfaces that run on any mobile or desktop platform. Supports Xamarin.iOS, Xamarin.Android, Xamarin.Mac, Xamarin Forms, WPF, Windows Forms, Windows Phone 8, Windows Store and Universal Windows Platform (UWP).","fork":true,"url":"https://api.github.com/repos/OlexaLe/ReactiveUI","forks_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/forks","keys_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/teams","hooks_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/hooks","issue_events_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/issues/events{/number}","events_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/events","assignees_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/assignees{/user}","branches_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/branches{/branch}","tags_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/tags","blobs_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/git/refs{/sha}","trees_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/statuses/{sha}","languages_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/languages","stargazers_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/stargazers","contributors_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/contributors","subscribers_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/subscribers","subscription_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/subscription","commits_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/commits{/sha}","git_commits_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/git/commits{/sha}","comments_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/comments{/number}","issue_comment_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/issues/comments{/number}","contents_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/contents/{+path}","compare_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/merges","archive_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/downloads","issues_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/issues{/number}","pulls_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/pulls{/number}","milestones_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/milestones{/number}","notifications_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/labels{/name}","releases_url":"https://api.github.com/repos/OlexaLe/ReactiveUI/releases{/id}","created_at":"2015-12-26T20:08:23Z","updated_at":"2015-12-26T20:08:26Z","pushed_at":"2015-12-26T20:16:09Z","git_url":"git://github.com/OlexaLe/ReactiveUI.git","ssh_url":"git@github.com:OlexaLe/ReactiveUI.git","clone_url":"https://github.com/OlexaLe/ReactiveUI.git","svn_url":"https://github.com/OlexaLe/ReactiveUI","homepage":"http://www.reactiveui.net","size":71184,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"reactiveui:master","ref":"master","sha":"09cde9e2b59029fb93cbe8dee1c0fcfc64db8973","user":{"login":"reactiveui","id":2327577,"avatar_url":"https://avatars.githubusercontent.com/u/2327577?v=3","gravatar_id":"","url":"https://api.github.com/users/reactiveui","html_url":"https://github.com/reactiveui","followers_url":"https://api.github.com/users/reactiveui/followers","following_url":"https://api.github.com/users/reactiveui/following{/other_user}","gists_url":"https://api.github.com/users/reactiveui/gists{/gist_id}","starred_url":"https://api.github.com/users/reactiveui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactiveui/subscriptions","organizations_url":"https://api.github.com/users/reactiveui/orgs","repos_url":"https://api.github.com/users/reactiveui/repos","events_url":"https://api.github.com/users/reactiveui/events{/privacy}","received_events_url":"https://api.github.com/users/reactiveui/received_events","type":"Organization","site_admin":false},"repo":{"id":715082,"name":"ReactiveUI","full_name":"reactiveui/ReactiveUI","owner":{"login":"reactiveui","id":2327577,"avatar_url":"https://avatars.githubusercontent.com/u/2327577?v=3","gravatar_id":"","url":"https://api.github.com/users/reactiveui","html_url":"https://github.com/reactiveui","followers_url":"https://api.github.com/users/reactiveui/followers","following_url":"https://api.github.com/users/reactiveui/following{/other_user}","gists_url":"https://api.github.com/users/reactiveui/gists{/gist_id}","starred_url":"https://api.github.com/users/reactiveui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactiveui/subscriptions","organizations_url":"https://api.github.com/users/reactiveui/orgs","repos_url":"https://api.github.com/users/reactiveui/repos","events_url":"https://api.github.com/users/reactiveui/events{/privacy}","received_events_url":"https://api.github.com/users/reactiveui/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reactiveui/ReactiveUI","description":"A MVVM framework that integrates with the Reactive Extensions for .NET to create elegant, testable User Interfaces that run on any mobile or desktop platform. Supports Xamarin.iOS, Xamarin.Android, Xamarin.Mac, Xamarin Forms, WPF, Windows Forms, Windows Phone 8, Windows Store and Universal Windows Platform (UWP).","fork":false,"url":"https://api.github.com/repos/reactiveui/ReactiveUI","forks_url":"https://api.github.com/repos/reactiveui/ReactiveUI/forks","keys_url":"https://api.github.com/repos/reactiveui/ReactiveUI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reactiveui/ReactiveUI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reactiveui/ReactiveUI/teams","hooks_url":"https://api.github.com/repos/reactiveui/ReactiveUI/hooks","issue_events_url":"https://api.github.com/repos/reactiveui/ReactiveUI/issues/events{/number}","events_url":"https://api.github.com/repos/reactiveui/ReactiveUI/events","assignees_url":"https://api.github.com/repos/reactiveui/ReactiveUI/assignees{/user}","branches_url":"https://api.github.com/repos/reactiveui/ReactiveUI/branches{/branch}","tags_url":"https://api.github.com/repos/reactiveui/ReactiveUI/tags","blobs_url":"https://api.github.com/repos/reactiveui/ReactiveUI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reactiveui/ReactiveUI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reactiveui/ReactiveUI/git/refs{/sha}","trees_url":"https://api.github.com/repos/reactiveui/ReactiveUI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reactiveui/ReactiveUI/statuses/{sha}","languages_url":"https://api.github.com/repos/reactiveui/ReactiveUI/languages","stargazers_url":"https://api.github.com/repos/reactiveui/ReactiveUI/stargazers","contributors_url":"https://api.github.com/repos/reactiveui/ReactiveUI/contributors","subscribers_url":"https://api.github.com/repos/reactiveui/ReactiveUI/subscribers","subscription_url":"https://api.github.com/repos/reactiveui/ReactiveUI/subscription","commits_url":"https://api.github.com/repos/reactiveui/ReactiveUI/commits{/sha}","git_commits_url":"https://api.github.com/repos/reactiveui/ReactiveUI/git/commits{/sha}","comments_url":"https://api.github.com/repos/reactiveui/ReactiveUI/comments{/number}","issue_comment_url":"https://api.github.com/repos/reactiveui/ReactiveUI/issues/comments{/number}","contents_url":"https://api.github.com/repos/reactiveui/ReactiveUI/contents/{+path}","compare_url":"https://api.github.com/repos/reactiveui/ReactiveUI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reactiveui/ReactiveUI/merges","archive_url":"https://api.github.com/repos/reactiveui/ReactiveUI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reactiveui/ReactiveUI/downloads","issues_url":"https://api.github.com/repos/reactiveui/ReactiveUI/issues{/number}","pulls_url":"https://api.github.com/repos/reactiveui/ReactiveUI/pulls{/number}","milestones_url":"https://api.github.com/repos/reactiveui/ReactiveUI/milestones{/number}","notifications_url":"https://api.github.com/repos/reactiveui/ReactiveUI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reactiveui/ReactiveUI/labels{/name}","releases_url":"https://api.github.com/repos/reactiveui/ReactiveUI/releases{/id}","created_at":"2010-06-11T05:24:29Z","updated_at":"2015-12-26T20:08:20Z","pushed_at":"2015-12-26T20:34:20Z","git_url":"git://github.com/reactiveui/ReactiveUI.git","ssh_url":"git@github.com:reactiveui/ReactiveUI.git","clone_url":"https://github.com/reactiveui/ReactiveUI.git","svn_url":"https://github.com/reactiveui/ReactiveUI","homepage":"http://www.reactiveui.net","size":79007,"stargazers_count":1915,"watchers_count":1915,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":435,"mirror_url":null,"open_issues_count":134,"forks":435,"open_issues":134,"watchers":1915,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/reactiveui/ReactiveUI/pulls/1008"},"html":{"href":"https://github.com/reactiveui/ReactiveUI/pull/1008"},"issue":{"href":"https://api.github.com/repos/reactiveui/ReactiveUI/issues/1008"},"comments":{"href":"https://api.github.com/repos/reactiveui/ReactiveUI/issues/1008/comments"},"review_comments":{"href":"https://api.github.com/repos/reactiveui/ReactiveUI/pulls/1008/comments"},"review_comment":{"href":"https://api.github.com/repos/reactiveui/ReactiveUI/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/reactiveui/ReactiveUI/pulls/1008/commits"},"statuses":{"href":"https://api.github.com/repos/reactiveui/ReactiveUI/statuses/c8a8292fde7a0617338110c55bfbf8c7d6947e1d"}}}}