{"action":"created","comment":{"url":"https://api.github.com/repos/realm/realm-dotnet/pulls/comments/89457931","pull_request_review_id":9970277,"id":89457931,"diff_hunk":"@@ -0,0 +1,177 @@\n+﻿////////////////////////////////////////////////////////////////////////////\n+//\n+// Copyright 2014 Realm Inc.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+// http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+//\n+////////////////////////////////////////////////////////////////////////////\n+\n+using System;\n+using System.Diagnostics;\n+using DrawXShared;\n+using Foundation;\n+using SkiaSharp.Views.iOS;\n+using UIKit;\n+\n+namespace DrawX.IOS\n+{\n+    public class ViewControllerShared : UIViewController\n+    {\n+        private RealmDraw _drawer;\n+        private bool _hasShownCredentials = false;  // flag to show on initial layout only\n+\n+        public ViewControllerShared(IntPtr handle) : base(handle)\n+        {\n+        }\n+\n+        public override void ViewDidLoad()\n+        {\n+            base.ViewDidLoad();\n+            Debug.WriteLine($\"Opened view with bounds {View.Bounds.Size}\");\n+\n+            // relies on override to point its canvas at our OnPaintSample\n+            // see ViewDidLayoutSubviews for triggering EditCredentials\n+            DrawXSettingsManager.InitLocalSettings();\n+            if (DrawXSettingsManager.HasCredentials())\n+            {\n+                // assume we can login and be able to draw\n+                // TODO handle initial failure to login despite saved credentials\n+                SetupDrawer();\n+            }\n+        }\n+\n+        private void SetupDrawer()\n+        {\n+            // scale bounds to match the pixel dimensions of the SkiaSurface\n+            _drawer = new RealmDraw(\n+                                    2.0f * (float)View.Bounds.Width,","path":"examples/DrawXNative/DrawXShared/ViewControllerShared.cs","position":57,"original_position":57,"commit_id":"140b93dcb0ebbef3355feb3851c1880a52263795","original_commit_id":"f714fc9fc6dd86f8dbc855d159c0c6181f24da10","user":{"login":"nirinchev","id":2315687,"avatar_url":"https://avatars.githubusercontent.com/u/2315687?v=3","gravatar_id":"","url":"https://api.github.com/users/nirinchev","html_url":"https://github.com/nirinchev","followers_url":"https://api.github.com/users/nirinchev/followers","following_url":"https://api.github.com/users/nirinchev/following{/other_user}","gists_url":"https://api.github.com/users/nirinchev/gists{/gist_id}","starred_url":"https://api.github.com/users/nirinchev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nirinchev/subscriptions","organizations_url":"https://api.github.com/users/nirinchev/orgs","repos_url":"https://api.github.com/users/nirinchev/repos","events_url":"https://api.github.com/users/nirinchev/events{/privacy}","received_events_url":"https://api.github.com/users/nirinchev/received_events","type":"User","site_admin":false},"body":"No need to use `2.0f` - just `2` will work","created_at":"2016-11-24T09:12:56Z","updated_at":"2016-11-24T09:23:02Z","html_url":"https://github.com/realm/realm-dotnet/pull/941#discussion_r89457931","pull_request_url":"https://api.github.com/repos/realm/realm-dotnet/pulls/941","_links":{"self":{"href":"https://api.github.com/repos/realm/realm-dotnet/pulls/comments/89457931"},"html":{"href":"https://github.com/realm/realm-dotnet/pull/941#discussion_r89457931"},"pull_request":{"href":"https://api.github.com/repos/realm/realm-dotnet/pulls/941"}}},"pull_request":{"url":"https://api.github.com/repos/realm/realm-dotnet/pulls/941","id":95014475,"html_url":"https://github.com/realm/realm-dotnet/pull/941","diff_url":"https://github.com/realm/realm-dotnet/pull/941.diff","patch_url":"https://github.com/realm/realm-dotnet/pull/941.patch","issue_url":"https://api.github.com/repos/realm/realm-dotnet/issues/941","number":941,"state":"open","locked":false,"title":"Ad/draw based off introduce sync","user":{"login":"AndyDentFree","id":1586093,"avatar_url":"https://avatars.githubusercontent.com/u/1586093?v=3","gravatar_id":"","url":"https://api.github.com/users/AndyDentFree","html_url":"https://github.com/AndyDentFree","followers_url":"https://api.github.com/users/AndyDentFree/followers","following_url":"https://api.github.com/users/AndyDentFree/following{/other_user}","gists_url":"https://api.github.com/users/AndyDentFree/gists{/gist_id}","starred_url":"https://api.github.com/users/AndyDentFree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndyDentFree/subscriptions","organizations_url":"https://api.github.com/users/AndyDentFree/orgs","repos_url":"https://api.github.com/users/AndyDentFree/repos","events_url":"https://api.github.com/users/AndyDentFree/events{/privacy}","received_events_url":"https://api.github.com/users/AndyDentFree/received_events","type":"User","site_admin":false},"body":"Has had master merged in plus the fix to make it run on iOS devices just discussed on Slack. So, essentially, it's _just_ adding the Draw sample app. It has no warnings from StyleCop.\r\n\r\n@kristiandupont @fealebenpae @nirinchev spend as much time on it as you like. Ideally we get this merged fairly quickly and then further enhancements will be small branches off master.","created_at":"2016-11-23T14:35:34Z","updated_at":"2016-11-24T09:23:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b32eab6cd3de885cef50bbc65a9ff02372207086","assignee":{"login":"AndyDentFree","id":1586093,"avatar_url":"https://avatars.githubusercontent.com/u/1586093?v=3","gravatar_id":"","url":"https://api.github.com/users/AndyDentFree","html_url":"https://github.com/AndyDentFree","followers_url":"https://api.github.com/users/AndyDentFree/followers","following_url":"https://api.github.com/users/AndyDentFree/following{/other_user}","gists_url":"https://api.github.com/users/AndyDentFree/gists{/gist_id}","starred_url":"https://api.github.com/users/AndyDentFree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndyDentFree/subscriptions","organizations_url":"https://api.github.com/users/AndyDentFree/orgs","repos_url":"https://api.github.com/users/AndyDentFree/repos","events_url":"https://api.github.com/users/AndyDentFree/events{/privacy}","received_events_url":"https://api.github.com/users/AndyDentFree/received_events","type":"User","site_admin":false},"assignees":[{"login":"AndyDentFree","id":1586093,"avatar_url":"https://avatars.githubusercontent.com/u/1586093?v=3","gravatar_id":"","url":"https://api.github.com/users/AndyDentFree","html_url":"https://github.com/AndyDentFree","followers_url":"https://api.github.com/users/AndyDentFree/followers","following_url":"https://api.github.com/users/AndyDentFree/following{/other_user}","gists_url":"https://api.github.com/users/AndyDentFree/gists{/gist_id}","starred_url":"https://api.github.com/users/AndyDentFree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndyDentFree/subscriptions","organizations_url":"https://api.github.com/users/AndyDentFree/orgs","repos_url":"https://api.github.com/users/AndyDentFree/repos","events_url":"https://api.github.com/users/AndyDentFree/events{/privacy}","received_events_url":"https://api.github.com/users/AndyDentFree/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/realm/realm-dotnet/pulls/941/commits","review_comments_url":"https://api.github.com/repos/realm/realm-dotnet/pulls/941/comments","review_comment_url":"https://api.github.com/repos/realm/realm-dotnet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/realm/realm-dotnet/issues/941/comments","statuses_url":"https://api.github.com/repos/realm/realm-dotnet/statuses/140b93dcb0ebbef3355feb3851c1880a52263795","head":{"label":"realm:ad/draw-based-off-introduce-sync","ref":"ad/draw-based-off-introduce-sync","sha":"140b93dcb0ebbef3355feb3851c1880a52263795","user":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"repo":{"id":8485842,"name":"realm-dotnet","full_name":"realm/realm-dotnet","owner":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/realm/realm-dotnet","description":"Realm is a mobile database: a replacement for SQLite & ORMs","fork":false,"url":"https://api.github.com/repos/realm/realm-dotnet","forks_url":"https://api.github.com/repos/realm/realm-dotnet/forks","keys_url":"https://api.github.com/repos/realm/realm-dotnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realm/realm-dotnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realm/realm-dotnet/teams","hooks_url":"https://api.github.com/repos/realm/realm-dotnet/hooks","issue_events_url":"https://api.github.com/repos/realm/realm-dotnet/issues/events{/number}","events_url":"https://api.github.com/repos/realm/realm-dotnet/events","assignees_url":"https://api.github.com/repos/realm/realm-dotnet/assignees{/user}","branches_url":"https://api.github.com/repos/realm/realm-dotnet/branches{/branch}","tags_url":"https://api.github.com/repos/realm/realm-dotnet/tags","blobs_url":"https://api.github.com/repos/realm/realm-dotnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realm/realm-dotnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realm/realm-dotnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/realm/realm-dotnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realm/realm-dotnet/statuses/{sha}","languages_url":"https://api.github.com/repos/realm/realm-dotnet/languages","stargazers_url":"https://api.github.com/repos/realm/realm-dotnet/stargazers","contributors_url":"https://api.github.com/repos/realm/realm-dotnet/contributors","subscribers_url":"https://api.github.com/repos/realm/realm-dotnet/subscribers","subscription_url":"https://api.github.com/repos/realm/realm-dotnet/subscription","commits_url":"https://api.github.com/repos/realm/realm-dotnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/realm/realm-dotnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/realm/realm-dotnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/realm/realm-dotnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/realm/realm-dotnet/contents/{+path}","compare_url":"https://api.github.com/repos/realm/realm-dotnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realm/realm-dotnet/merges","archive_url":"https://api.github.com/repos/realm/realm-dotnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realm/realm-dotnet/downloads","issues_url":"https://api.github.com/repos/realm/realm-dotnet/issues{/number}","pulls_url":"https://api.github.com/repos/realm/realm-dotnet/pulls{/number}","milestones_url":"https://api.github.com/repos/realm/realm-dotnet/milestones{/number}","notifications_url":"https://api.github.com/repos/realm/realm-dotnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realm/realm-dotnet/labels{/name}","releases_url":"https://api.github.com/repos/realm/realm-dotnet/releases{/id}","deployments_url":"https://api.github.com/repos/realm/realm-dotnet/deployments","created_at":"2013-02-28T19:03:12Z","updated_at":"2016-11-23T04:23:27Z","pushed_at":"2016-11-24T08:38:32Z","git_url":"git://github.com/realm/realm-dotnet.git","ssh_url":"git@github.com:realm/realm-dotnet.git","clone_url":"https://github.com/realm/realm-dotnet.git","svn_url":"https://github.com/realm/realm-dotnet","homepage":"https://realm.io","size":70603,"stargazers_count":404,"watchers_count":404,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"open_issues_count":167,"forks":36,"open_issues":167,"watchers":404,"default_branch":"master"}},"base":{"label":"realm:master","ref":"master","sha":"f9be43fc737180794d75d4ee0af90f4cd900512d","user":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"repo":{"id":8485842,"name":"realm-dotnet","full_name":"realm/realm-dotnet","owner":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/realm/realm-dotnet","description":"Realm is a mobile database: a replacement for SQLite & ORMs","fork":false,"url":"https://api.github.com/repos/realm/realm-dotnet","forks_url":"https://api.github.com/repos/realm/realm-dotnet/forks","keys_url":"https://api.github.com/repos/realm/realm-dotnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realm/realm-dotnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realm/realm-dotnet/teams","hooks_url":"https://api.github.com/repos/realm/realm-dotnet/hooks","issue_events_url":"https://api.github.com/repos/realm/realm-dotnet/issues/events{/number}","events_url":"https://api.github.com/repos/realm/realm-dotnet/events","assignees_url":"https://api.github.com/repos/realm/realm-dotnet/assignees{/user}","branches_url":"https://api.github.com/repos/realm/realm-dotnet/branches{/branch}","tags_url":"https://api.github.com/repos/realm/realm-dotnet/tags","blobs_url":"https://api.github.com/repos/realm/realm-dotnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realm/realm-dotnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realm/realm-dotnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/realm/realm-dotnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realm/realm-dotnet/statuses/{sha}","languages_url":"https://api.github.com/repos/realm/realm-dotnet/languages","stargazers_url":"https://api.github.com/repos/realm/realm-dotnet/stargazers","contributors_url":"https://api.github.com/repos/realm/realm-dotnet/contributors","subscribers_url":"https://api.github.com/repos/realm/realm-dotnet/subscribers","subscription_url":"https://api.github.com/repos/realm/realm-dotnet/subscription","commits_url":"https://api.github.com/repos/realm/realm-dotnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/realm/realm-dotnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/realm/realm-dotnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/realm/realm-dotnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/realm/realm-dotnet/contents/{+path}","compare_url":"https://api.github.com/repos/realm/realm-dotnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realm/realm-dotnet/merges","archive_url":"https://api.github.com/repos/realm/realm-dotnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realm/realm-dotnet/downloads","issues_url":"https://api.github.com/repos/realm/realm-dotnet/issues{/number}","pulls_url":"https://api.github.com/repos/realm/realm-dotnet/pulls{/number}","milestones_url":"https://api.github.com/repos/realm/realm-dotnet/milestones{/number}","notifications_url":"https://api.github.com/repos/realm/realm-dotnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realm/realm-dotnet/labels{/name}","releases_url":"https://api.github.com/repos/realm/realm-dotnet/releases{/id}","deployments_url":"https://api.github.com/repos/realm/realm-dotnet/deployments","created_at":"2013-02-28T19:03:12Z","updated_at":"2016-11-23T04:23:27Z","pushed_at":"2016-11-24T08:38:32Z","git_url":"git://github.com/realm/realm-dotnet.git","ssh_url":"git@github.com:realm/realm-dotnet.git","clone_url":"https://github.com/realm/realm-dotnet.git","svn_url":"https://github.com/realm/realm-dotnet","homepage":"https://realm.io","size":70603,"stargazers_count":404,"watchers_count":404,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"open_issues_count":167,"forks":36,"open_issues":167,"watchers":404,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/realm/realm-dotnet/pulls/941"},"html":{"href":"https://github.com/realm/realm-dotnet/pull/941"},"issue":{"href":"https://api.github.com/repos/realm/realm-dotnet/issues/941"},"comments":{"href":"https://api.github.com/repos/realm/realm-dotnet/issues/941/comments"},"review_comments":{"href":"https://api.github.com/repos/realm/realm-dotnet/pulls/941/comments"},"review_comment":{"href":"https://api.github.com/repos/realm/realm-dotnet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/realm/realm-dotnet/pulls/941/commits"},"statuses":{"href":"https://api.github.com/repos/realm/realm-dotnet/statuses/140b93dcb0ebbef3355feb3851c1880a52263795"}}}}
{"actor":{"display_login":"nirinchev"}}