{"action":"created","comment":{"url":"https://api.github.com/repos/4Com/compose-remoting/pulls/comments/28420528","id":28420528,"diff_hunk":"@@ -0,0 +1,68 @@\n+﻿using System;\n+using System.Collections.Generic;\n+using System.IO;\n+using System.Xml.Serialization;\n+using Compose.Remoting.Sdk.Infrastructure.Providers;\n+\n+namespace Compose.Remoting.Infrastructure.Providers\n+{\n+    /// <summary>\n+    ///     Serializes and Deserializes an entity to/from an XML stream.\n+    /// </summary>\n+    public class DefaultSerializationProvider : ISerializationProvider\n+    {\n+        private static readonly Dictionary<Type, XmlSerializer> _knownSerialisers =\n+            new Dictionary<Type, XmlSerializer>();\n+\n+        public string Name\n+        {\n+            get { return \"Default\"; }\n+        }\n+\n+        public Stream Serialise<TEntity>(TEntity entity)\n+        {\n+            if (entity == null)\n+            {\n+                throw new ArgumentNullException(\"entity\");\n+            }\n+\n+            var serialiser = GetSerialiserFor(typeof (TEntity));\n+            var result = new MemoryStream();\n+            serialiser.Serialize(result, entity);\n+\n+            return result;\n+        }\n+\n+        public object Deserialise(Stream serialisedEntity, Type entityType)\n+        {\n+            if (serialisedEntity == null)\n+            {\n+                throw new ArgumentNullException(\"serialisedEntity\");\n+            }\n+\n+            if (entityType == null)\n+            {\n+                throw new ArgumentNullException(\"entityType\");\n+            }\n+\n+            return GetSerialiserFor(entityType).Deserialize(serialisedEntity);\n+        }\n+\n+        private static XmlSerializer GetSerialiserFor(Type entityType)\n+        {\n+            XmlSerializer result;\n+\n+            if (!_knownSerialisers.TryGetValue(entityType, out result))","path":"src/Compose.Remoting/Infrastructure/Providers/DefaultSerializationProvider.cs","position":55,"original_position":55,"commit_id":"3ad761d58c50d2990d5145607a93a86f4008f3b5","original_commit_id":"1d1d1907a77dae9225451953711be5eb94a921d8","user":{"login":"sblackler","id":775191,"avatar_url":"https://avatars.githubusercontent.com/u/775191?v=3","gravatar_id":"","url":"https://api.github.com/users/sblackler","html_url":"https://github.com/sblackler","followers_url":"https://api.github.com/users/sblackler/followers","following_url":"https://api.github.com/users/sblackler/following{/other_user}","gists_url":"https://api.github.com/users/sblackler/gists{/gist_id}","starred_url":"https://api.github.com/users/sblackler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sblackler/subscriptions","organizations_url":"https://api.github.com/users/sblackler/orgs","repos_url":"https://api.github.com/users/sblackler/repos","events_url":"https://api.github.com/users/sblackler/events{/privacy}","received_events_url":"https://api.github.com/users/sblackler/received_events","type":"User","site_admin":false},"body":"As discussed, the dictionary is declared as static anyway, so it doesn't really matter whether its marked as a singleton or not. I will wrap the section in a lock anyway just to be uber safe","created_at":"2015-04-15T13:52:05Z","updated_at":"2015-04-15T13:52:05Z","html_url":"https://github.com/4Com/compose-remoting/pull/2#discussion_r28420528","pull_request_url":"https://api.github.com/repos/4Com/compose-remoting/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/4Com/compose-remoting/pulls/comments/28420528"},"html":{"href":"https://github.com/4Com/compose-remoting/pull/2#discussion_r28420528"},"pull_request":{"href":"https://api.github.com/repos/4Com/compose-remoting/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/4Com/compose-remoting/pulls/2","id":33289927,"html_url":"https://github.com/4Com/compose-remoting/pull/2","diff_url":"https://github.com/4Com/compose-remoting/pull/2.diff","patch_url":"https://github.com/4Com/compose-remoting/pull/2.patch","issue_url":"https://api.github.com/repos/4Com/compose-remoting/issues/2","number":2,"state":"open","locked":false,"title":"Memo code migration","user":{"login":"sblackler","id":775191,"avatar_url":"https://avatars.githubusercontent.com/u/775191?v=3","gravatar_id":"","url":"https://api.github.com/users/sblackler","html_url":"https://github.com/sblackler","followers_url":"https://api.github.com/users/sblackler/followers","following_url":"https://api.github.com/users/sblackler/following{/other_user}","gists_url":"https://api.github.com/users/sblackler/gists{/gist_id}","starred_url":"https://api.github.com/users/sblackler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sblackler/subscriptions","organizations_url":"https://api.github.com/users/sblackler/orgs","repos_url":"https://api.github.com/users/sblackler/repos","events_url":"https://api.github.com/users/sblackler/events{/privacy}","received_events_url":"https://api.github.com/users/sblackler/received_events","type":"User","site_admin":false},"body":"This is the initial migration of Memo as per #1\r\n\r\nI've removed the test extension as I planned to scrap that anyway. Cleaned up the naming of a few pieces, downgraded to 4.5 etc.","created_at":"2015-04-14T19:13:16Z","updated_at":"2015-04-15T13:52:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec9ebf7c40d4f93364636d54e38150b38863de4e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/4Com/compose-remoting/pulls/2/commits","review_comments_url":"https://api.github.com/repos/4Com/compose-remoting/pulls/2/comments","review_comment_url":"https://api.github.com/repos/4Com/compose-remoting/pulls/comments{/number}","comments_url":"https://api.github.com/repos/4Com/compose-remoting/issues/2/comments","statuses_url":"https://api.github.com/repos/4Com/compose-remoting/statuses/3ad761d58c50d2990d5145607a93a86f4008f3b5","head":{"label":"sblackler:MemoIntegration","ref":"MemoIntegration","sha":"3ad761d58c50d2990d5145607a93a86f4008f3b5","user":{"login":"sblackler","id":775191,"avatar_url":"https://avatars.githubusercontent.com/u/775191?v=3","gravatar_id":"","url":"https://api.github.com/users/sblackler","html_url":"https://github.com/sblackler","followers_url":"https://api.github.com/users/sblackler/followers","following_url":"https://api.github.com/users/sblackler/following{/other_user}","gists_url":"https://api.github.com/users/sblackler/gists{/gist_id}","starred_url":"https://api.github.com/users/sblackler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sblackler/subscriptions","organizations_url":"https://api.github.com/users/sblackler/orgs","repos_url":"https://api.github.com/users/sblackler/repos","events_url":"https://api.github.com/users/sblackler/events{/privacy}","received_events_url":"https://api.github.com/users/sblackler/received_events","type":"User","site_admin":false},"repo":{"id":33943195,"name":"compose-remoting","full_name":"sblackler/compose-remoting","owner":{"login":"sblackler","id":775191,"avatar_url":"https://avatars.githubusercontent.com/u/775191?v=3","gravatar_id":"","url":"https://api.github.com/users/sblackler","html_url":"https://github.com/sblackler","followers_url":"https://api.github.com/users/sblackler/followers","following_url":"https://api.github.com/users/sblackler/following{/other_user}","gists_url":"https://api.github.com/users/sblackler/gists{/gist_id}","starred_url":"https://api.github.com/users/sblackler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sblackler/subscriptions","organizations_url":"https://api.github.com/users/sblackler/orgs","repos_url":"https://api.github.com/users/sblackler/repos","events_url":"https://api.github.com/users/sblackler/events{/privacy}","received_events_url":"https://api.github.com/users/sblackler/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sblackler/compose-remoting","description":"","fork":true,"url":"https://api.github.com/repos/sblackler/compose-remoting","forks_url":"https://api.github.com/repos/sblackler/compose-remoting/forks","keys_url":"https://api.github.com/repos/sblackler/compose-remoting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sblackler/compose-remoting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sblackler/compose-remoting/teams","hooks_url":"https://api.github.com/repos/sblackler/compose-remoting/hooks","issue_events_url":"https://api.github.com/repos/sblackler/compose-remoting/issues/events{/number}","events_url":"https://api.github.com/repos/sblackler/compose-remoting/events","assignees_url":"https://api.github.com/repos/sblackler/compose-remoting/assignees{/user}","branches_url":"https://api.github.com/repos/sblackler/compose-remoting/branches{/branch}","tags_url":"https://api.github.com/repos/sblackler/compose-remoting/tags","blobs_url":"https://api.github.com/repos/sblackler/compose-remoting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sblackler/compose-remoting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sblackler/compose-remoting/git/refs{/sha}","trees_url":"https://api.github.com/repos/sblackler/compose-remoting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sblackler/compose-remoting/statuses/{sha}","languages_url":"https://api.github.com/repos/sblackler/compose-remoting/languages","stargazers_url":"https://api.github.com/repos/sblackler/compose-remoting/stargazers","contributors_url":"https://api.github.com/repos/sblackler/compose-remoting/contributors","subscribers_url":"https://api.github.com/repos/sblackler/compose-remoting/subscribers","subscription_url":"https://api.github.com/repos/sblackler/compose-remoting/subscription","commits_url":"https://api.github.com/repos/sblackler/compose-remoting/commits{/sha}","git_commits_url":"https://api.github.com/repos/sblackler/compose-remoting/git/commits{/sha}","comments_url":"https://api.github.com/repos/sblackler/compose-remoting/comments{/number}","issue_comment_url":"https://api.github.com/repos/sblackler/compose-remoting/issues/comments{/number}","contents_url":"https://api.github.com/repos/sblackler/compose-remoting/contents/{+path}","compare_url":"https://api.github.com/repos/sblackler/compose-remoting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sblackler/compose-remoting/merges","archive_url":"https://api.github.com/repos/sblackler/compose-remoting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sblackler/compose-remoting/downloads","issues_url":"https://api.github.com/repos/sblackler/compose-remoting/issues{/number}","pulls_url":"https://api.github.com/repos/sblackler/compose-remoting/pulls{/number}","milestones_url":"https://api.github.com/repos/sblackler/compose-remoting/milestones{/number}","notifications_url":"https://api.github.com/repos/sblackler/compose-remoting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sblackler/compose-remoting/labels{/name}","releases_url":"https://api.github.com/repos/sblackler/compose-remoting/releases{/id}","created_at":"2015-04-14T16:23:56Z","updated_at":"2015-04-14T12:26:45Z","pushed_at":"2015-04-15T11:56:12Z","git_url":"git://github.com/sblackler/compose-remoting.git","ssh_url":"git@github.com:sblackler/compose-remoting.git","clone_url":"https://github.com/sblackler/compose-remoting.git","svn_url":"https://github.com/sblackler/compose-remoting","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"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":"4Com:dev","ref":"dev","sha":"505068bf914c4dc7d5b994a62d678b10d071eacd","user":{"login":"4Com","id":8976378,"avatar_url":"https://avatars.githubusercontent.com/u/8976378?v=3","gravatar_id":"","url":"https://api.github.com/users/4Com","html_url":"https://github.com/4Com","followers_url":"https://api.github.com/users/4Com/followers","following_url":"https://api.github.com/users/4Com/following{/other_user}","gists_url":"https://api.github.com/users/4Com/gists{/gist_id}","starred_url":"https://api.github.com/users/4Com/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4Com/subscriptions","organizations_url":"https://api.github.com/users/4Com/orgs","repos_url":"https://api.github.com/users/4Com/repos","events_url":"https://api.github.com/users/4Com/events{/privacy}","received_events_url":"https://api.github.com/users/4Com/received_events","type":"Organization","site_admin":false},"repo":{"id":33930115,"name":"compose-remoting","full_name":"4Com/compose-remoting","owner":{"login":"4Com","id":8976378,"avatar_url":"https://avatars.githubusercontent.com/u/8976378?v=3","gravatar_id":"","url":"https://api.github.com/users/4Com","html_url":"https://github.com/4Com","followers_url":"https://api.github.com/users/4Com/followers","following_url":"https://api.github.com/users/4Com/following{/other_user}","gists_url":"https://api.github.com/users/4Com/gists{/gist_id}","starred_url":"https://api.github.com/users/4Com/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4Com/subscriptions","organizations_url":"https://api.github.com/users/4Com/orgs","repos_url":"https://api.github.com/users/4Com/repos","events_url":"https://api.github.com/users/4Com/events{/privacy}","received_events_url":"https://api.github.com/users/4Com/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/4Com/compose-remoting","description":"","fork":false,"url":"https://api.github.com/repos/4Com/compose-remoting","forks_url":"https://api.github.com/repos/4Com/compose-remoting/forks","keys_url":"https://api.github.com/repos/4Com/compose-remoting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/4Com/compose-remoting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/4Com/compose-remoting/teams","hooks_url":"https://api.github.com/repos/4Com/compose-remoting/hooks","issue_events_url":"https://api.github.com/repos/4Com/compose-remoting/issues/events{/number}","events_url":"https://api.github.com/repos/4Com/compose-remoting/events","assignees_url":"https://api.github.com/repos/4Com/compose-remoting/assignees{/user}","branches_url":"https://api.github.com/repos/4Com/compose-remoting/branches{/branch}","tags_url":"https://api.github.com/repos/4Com/compose-remoting/tags","blobs_url":"https://api.github.com/repos/4Com/compose-remoting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/4Com/compose-remoting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/4Com/compose-remoting/git/refs{/sha}","trees_url":"https://api.github.com/repos/4Com/compose-remoting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/4Com/compose-remoting/statuses/{sha}","languages_url":"https://api.github.com/repos/4Com/compose-remoting/languages","stargazers_url":"https://api.github.com/repos/4Com/compose-remoting/stargazers","contributors_url":"https://api.github.com/repos/4Com/compose-remoting/contributors","subscribers_url":"https://api.github.com/repos/4Com/compose-remoting/subscribers","subscription_url":"https://api.github.com/repos/4Com/compose-remoting/subscription","commits_url":"https://api.github.com/repos/4Com/compose-remoting/commits{/sha}","git_commits_url":"https://api.github.com/repos/4Com/compose-remoting/git/commits{/sha}","comments_url":"https://api.github.com/repos/4Com/compose-remoting/comments{/number}","issue_comment_url":"https://api.github.com/repos/4Com/compose-remoting/issues/comments{/number}","contents_url":"https://api.github.com/repos/4Com/compose-remoting/contents/{+path}","compare_url":"https://api.github.com/repos/4Com/compose-remoting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/4Com/compose-remoting/merges","archive_url":"https://api.github.com/repos/4Com/compose-remoting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/4Com/compose-remoting/downloads","issues_url":"https://api.github.com/repos/4Com/compose-remoting/issues{/number}","pulls_url":"https://api.github.com/repos/4Com/compose-remoting/pulls{/number}","milestones_url":"https://api.github.com/repos/4Com/compose-remoting/milestones{/number}","notifications_url":"https://api.github.com/repos/4Com/compose-remoting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/4Com/compose-remoting/labels{/name}","releases_url":"https://api.github.com/repos/4Com/compose-remoting/releases{/id}","created_at":"2015-04-14T12:24:31Z","updated_at":"2015-04-14T12:26:45Z","pushed_at":"2015-04-15T11:56:13Z","git_url":"git://github.com/4Com/compose-remoting.git","ssh_url":"git@github.com:4Com/compose-remoting.git","clone_url":"https://github.com/4Com/compose-remoting.git","svn_url":"https://github.com/4Com/compose-remoting","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/4Com/compose-remoting/pulls/2"},"html":{"href":"https://github.com/4Com/compose-remoting/pull/2"},"issue":{"href":"https://api.github.com/repos/4Com/compose-remoting/issues/2"},"comments":{"href":"https://api.github.com/repos/4Com/compose-remoting/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/4Com/compose-remoting/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/4Com/compose-remoting/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/4Com/compose-remoting/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/4Com/compose-remoting/statuses/3ad761d58c50d2990d5145607a93a86f4008f3b5"}}}}