{"action":"created","comment":{"url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/pulls/comments/44577517","id":44577517,"diff_hunk":"@@ -0,0 +1,90 @@\n+﻿using System;\n+using System.Text.RegularExpressions;\n+using Windows.Networking.PushNotifications;\n+using Windows.Storage.Streams;\n+using Windows.System.Profile;\n+\n+namespace BuddySDK\n+{\n+    internal partial class BuddyClient\n+    {\n+        public void RecordNotificationReceived<T>(T args)\n+        {\n+            var pushArgs = args as PushNotificationReceivedEventArgs;\n+\n+            var id = GetPushContent(pushArgs);\n+\n+            if (!String.IsNullOrEmpty(id))\n+            {\n+                var match = Regex.Match(id, PlatformAccess.BuddyPushKey + \"=(?<id>[^;\\\">]+)\");\n+                if (match.Success)\n+                {\n+                    PlatformAccess.Current.OnNotificationReceived(match.Groups[\"id\"].Value);\n+                }\n+            }\n+        }\n+\n+        private string GetPushContent(PushNotificationReceivedEventArgs pushArgs)\n+        {\n+            switch (pushArgs.NotificationType)\n+            {\n+                case PushNotificationType.Badge:\n+                    return pushArgs.BadgeNotification.Content.GetXml();\n+                case PushNotificationType.Raw:\n+                    return pushArgs.RawNotification.Content;\n+                case PushNotificationType.Tile:\n+                case PushNotificationType.TileFlyout:\n+                    return pushArgs.TileNotification.Content.GetXml();\n+                case PushNotificationType.Toast:\n+                    return pushArgs.ToastNotification.Content.GetXml();\n+                default:\n+                    return \"\";\n+            }\n+        }\n+    }\n+\n+    public abstract partial class PlatformAccess","path":"Src/PlatformAccess/UniversalWindowsPlatformAccess.cs","position":46,"original_position":46,"commit_id":"36b1f2afb8569b6fd3a306aac8cbf5e2c05fe3db","original_commit_id":"36b1f2afb8569b6fd3a306aac8cbf5e2c05fe3db","user":{"login":"bradserbuddy","id":2676957,"avatar_url":"https://avatars.githubusercontent.com/u/2676957?v=3","gravatar_id":"","url":"https://api.github.com/users/bradserbuddy","html_url":"https://github.com/bradserbuddy","followers_url":"https://api.github.com/users/bradserbuddy/followers","following_url":"https://api.github.com/users/bradserbuddy/following{/other_user}","gists_url":"https://api.github.com/users/bradserbuddy/gists{/gist_id}","starred_url":"https://api.github.com/users/bradserbuddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradserbuddy/subscriptions","organizations_url":"https://api.github.com/users/bradserbuddy/orgs","repos_url":"https://api.github.com/users/bradserbuddy/repos","events_url":"https://api.github.com/users/bradserbuddy/events{/privacy}","received_events_url":"https://api.github.com/users/bradserbuddy/received_events","type":"User","site_admin":false},"body":"We've done a combination of having the specific projects include specific platform .cs files, and also project-specific #defines for files that are included in all the projects, which was confusing; this delta moves us in the direction of the former, as a consequence of adding the Win10 project type. I agree that additional refactoring would make things even more clear, but, not sure if it's worth it.","created_at":"2015-11-11T19:50:58Z","updated_at":"2015-11-11T19:50:58Z","html_url":"https://github.com/BuddyPlatform/Buddy-DotNET-SDK/pull/88#discussion_r44577517","pull_request_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/pulls/88","_links":{"self":{"href":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/pulls/comments/44577517"},"html":{"href":"https://github.com/BuddyPlatform/Buddy-DotNET-SDK/pull/88#discussion_r44577517"},"pull_request":{"href":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/pulls/88"}}},"pull_request":{"url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/pulls/88","id":50186746,"html_url":"https://github.com/BuddyPlatform/Buddy-DotNET-SDK/pull/88","diff_url":"https://github.com/BuddyPlatform/Buddy-DotNET-SDK/pull/88.diff","patch_url":"https://github.com/BuddyPlatform/Buddy-DotNET-SDK/pull/88.patch","issue_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/issues/88","number":88,"state":"open","locked":false,"title":"Windows 10 support, multi-client tweaks, remove deprecated models.","user":{"login":"bradserbuddy","id":2676957,"avatar_url":"https://avatars.githubusercontent.com/u/2676957?v=3","gravatar_id":"","url":"https://api.github.com/users/bradserbuddy","html_url":"https://github.com/bradserbuddy","followers_url":"https://api.github.com/users/bradserbuddy/followers","following_url":"https://api.github.com/users/bradserbuddy/following{/other_user}","gists_url":"https://api.github.com/users/bradserbuddy/gists{/gist_id}","starred_url":"https://api.github.com/users/bradserbuddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradserbuddy/subscriptions","organizations_url":"https://api.github.com/users/bradserbuddy/orgs","repos_url":"https://api.github.com/users/bradserbuddy/repos","events_url":"https://api.github.com/users/bradserbuddy/events{/privacy}","received_events_url":"https://api.github.com/users/bradserbuddy/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-09T22:22:15Z","updated_at":"2015-11-11T19:50:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc5e30e566f3d75d7d28e7be53ab0260fd041034","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/pulls/88/commits","review_comments_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/pulls/88/comments","review_comment_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/issues/88/comments","statuses_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/statuses/36b1f2afb8569b6fd3a306aac8cbf5e2c05fe3db","head":{"label":"bradserbuddy:Windows10","ref":"Windows10","sha":"36b1f2afb8569b6fd3a306aac8cbf5e2c05fe3db","user":{"login":"bradserbuddy","id":2676957,"avatar_url":"https://avatars.githubusercontent.com/u/2676957?v=3","gravatar_id":"","url":"https://api.github.com/users/bradserbuddy","html_url":"https://github.com/bradserbuddy","followers_url":"https://api.github.com/users/bradserbuddy/followers","following_url":"https://api.github.com/users/bradserbuddy/following{/other_user}","gists_url":"https://api.github.com/users/bradserbuddy/gists{/gist_id}","starred_url":"https://api.github.com/users/bradserbuddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradserbuddy/subscriptions","organizations_url":"https://api.github.com/users/bradserbuddy/orgs","repos_url":"https://api.github.com/users/bradserbuddy/repos","events_url":"https://api.github.com/users/bradserbuddy/events{/privacy}","received_events_url":"https://api.github.com/users/bradserbuddy/received_events","type":"User","site_admin":false},"repo":{"id":19873234,"name":"Buddy-DotNET-SDK","full_name":"bradserbuddy/Buddy-DotNET-SDK","owner":{"login":"bradserbuddy","id":2676957,"avatar_url":"https://avatars.githubusercontent.com/u/2676957?v=3","gravatar_id":"","url":"https://api.github.com/users/bradserbuddy","html_url":"https://github.com/bradserbuddy","followers_url":"https://api.github.com/users/bradserbuddy/followers","following_url":"https://api.github.com/users/bradserbuddy/following{/other_user}","gists_url":"https://api.github.com/users/bradserbuddy/gists{/gist_id}","starred_url":"https://api.github.com/users/bradserbuddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradserbuddy/subscriptions","organizations_url":"https://api.github.com/users/bradserbuddy/orgs","repos_url":"https://api.github.com/users/bradserbuddy/repos","events_url":"https://api.github.com/users/bradserbuddy/events{/privacy}","received_events_url":"https://api.github.com/users/bradserbuddy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bradserbuddy/Buddy-DotNET-SDK","description":"Buddy .NET SDK","fork":true,"url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK","forks_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/forks","keys_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/teams","hooks_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/hooks","issue_events_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/issues/events{/number}","events_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/events","assignees_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/assignees{/user}","branches_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/branches{/branch}","tags_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/tags","blobs_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/git/refs{/sha}","trees_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/statuses/{sha}","languages_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/languages","stargazers_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/stargazers","contributors_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/contributors","subscribers_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/subscribers","subscription_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/subscription","commits_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/commits{/sha}","git_commits_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/git/commits{/sha}","comments_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/comments{/number}","issue_comment_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/issues/comments{/number}","contents_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/contents/{+path}","compare_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/merges","archive_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/downloads","issues_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/issues{/number}","pulls_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/pulls{/number}","milestones_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/milestones{/number}","notifications_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/labels{/name}","releases_url":"https://api.github.com/repos/bradserbuddy/Buddy-DotNET-SDK/releases{/id}","created_at":"2014-05-16T23:03:44Z","updated_at":"2014-06-12T23:44:28Z","pushed_at":"2015-11-11T18:44:23Z","git_url":"git://github.com/bradserbuddy/Buddy-DotNET-SDK.git","ssh_url":"git@github.com:bradserbuddy/Buddy-DotNET-SDK.git","clone_url":"https://github.com/bradserbuddy/Buddy-DotNET-SDK.git","svn_url":"https://github.com/bradserbuddy/Buddy-DotNET-SDK","homepage":"http://buddyplatform.com","size":8400,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"BuddyPlatform:develop","ref":"develop","sha":"a21db9a23f5fb14240ffdcb4a9a02ea2726404f6","user":{"login":"BuddyPlatform","id":1395117,"avatar_url":"https://avatars.githubusercontent.com/u/1395117?v=3","gravatar_id":"","url":"https://api.github.com/users/BuddyPlatform","html_url":"https://github.com/BuddyPlatform","followers_url":"https://api.github.com/users/BuddyPlatform/followers","following_url":"https://api.github.com/users/BuddyPlatform/following{/other_user}","gists_url":"https://api.github.com/users/BuddyPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/BuddyPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BuddyPlatform/subscriptions","organizations_url":"https://api.github.com/users/BuddyPlatform/orgs","repos_url":"https://api.github.com/users/BuddyPlatform/repos","events_url":"https://api.github.com/users/BuddyPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/BuddyPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":17230144,"name":"Buddy-DotNET-SDK","full_name":"BuddyPlatform/Buddy-DotNET-SDK","owner":{"login":"BuddyPlatform","id":1395117,"avatar_url":"https://avatars.githubusercontent.com/u/1395117?v=3","gravatar_id":"","url":"https://api.github.com/users/BuddyPlatform","html_url":"https://github.com/BuddyPlatform","followers_url":"https://api.github.com/users/BuddyPlatform/followers","following_url":"https://api.github.com/users/BuddyPlatform/following{/other_user}","gists_url":"https://api.github.com/users/BuddyPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/BuddyPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BuddyPlatform/subscriptions","organizations_url":"https://api.github.com/users/BuddyPlatform/orgs","repos_url":"https://api.github.com/users/BuddyPlatform/repos","events_url":"https://api.github.com/users/BuddyPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/BuddyPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BuddyPlatform/Buddy-DotNET-SDK","description":"Buddy .NET SDK","fork":false,"url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK","forks_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/forks","keys_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/teams","hooks_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/hooks","issue_events_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/issues/events{/number}","events_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/events","assignees_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/assignees{/user}","branches_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/branches{/branch}","tags_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/tags","blobs_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/git/refs{/sha}","trees_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/statuses/{sha}","languages_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/languages","stargazers_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/stargazers","contributors_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/contributors","subscribers_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/subscribers","subscription_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/subscription","commits_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/commits{/sha}","git_commits_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/git/commits{/sha}","comments_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/comments{/number}","issue_comment_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/issues/comments{/number}","contents_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/contents/{+path}","compare_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/merges","archive_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/downloads","issues_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/issues{/number}","pulls_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/pulls{/number}","milestones_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/milestones{/number}","notifications_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/labels{/name}","releases_url":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/releases{/id}","created_at":"2014-02-26T23:52:12Z","updated_at":"2015-11-01T22:22:43Z","pushed_at":"2015-11-09T22:22:15Z","git_url":"git://github.com/BuddyPlatform/Buddy-DotNET-SDK.git","ssh_url":"git@github.com:BuddyPlatform/Buddy-DotNET-SDK.git","clone_url":"https://github.com/BuddyPlatform/Buddy-DotNET-SDK.git","svn_url":"https://github.com/BuddyPlatform/Buddy-DotNET-SDK","homepage":"http://buddyplatform.com","size":8851,"stargazers_count":3,"watchers_count":3,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":8,"forks":13,"open_issues":8,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/pulls/88"},"html":{"href":"https://github.com/BuddyPlatform/Buddy-DotNET-SDK/pull/88"},"issue":{"href":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/issues/88"},"comments":{"href":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/issues/88/comments"},"review_comments":{"href":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/pulls/88/comments"},"review_comment":{"href":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/pulls/88/commits"},"statuses":{"href":"https://api.github.com/repos/BuddyPlatform/Buddy-DotNET-SDK/statuses/36b1f2afb8569b6fd3a306aac8cbf5e2c05fe3db"}}}}