{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/comments/49109605","id":49109605,"diff_hunk":"@@ -0,0 +1,276 @@\n+﻿// Copyright (c) .NET Foundation. All rights reserved.\n+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n+\n+using System;\n+using System.Collections.Generic;\n+using System.Diagnostics;\n+using System.Linq;\n+using System.Reflection;\n+using JetBrains.Annotations;\n+using Microsoft.Data.Entity.ChangeTracking.Internal;\n+using Microsoft.Data.Entity.Internal;\n+using Microsoft.Data.Entity.Metadata;\n+using Microsoft.Data.Entity.Metadata.Internal;\n+using Microsoft.Data.Entity.Utilities;\n+\n+namespace Microsoft.Data.Entity.Design.Internal\n+{\n+    public class RuntimeTypeDiscoverer\n+    {\n+        private readonly IModel _model;\n+        private readonly IStateManager _stateManager;\n+        private readonly IInternalEntityEntryFactory _entityEntryFactory;\n+\n+        private static readonly Type[] _primitiveTypes =\n+        {\n+            typeof(short),\n+            typeof(ushort),\n+            typeof(int),\n+            typeof(uint),\n+            typeof(long),\n+            typeof(ulong),\n+            typeof(decimal),\n+            typeof(float),\n+            typeof(double),\n+            typeof(bool),\n+            typeof(string),\n+            typeof(char),\n+            typeof(byte),\n+            typeof(TimeSpan),\n+            typeof(DateTime),\n+            typeof(DateTimeOffset),\n+            typeof(Guid)\n+        };","path":"src/EntityFramework.Commands/Design/Internal/RuntimeTypeDiscoverer.cs","position":43,"original_position":43,"commit_id":"ca21e6e775014c55a6ab677d3c0c05c16d429262","original_commit_id":"ca21e6e775014c55a6ab677d3c0c05c16d429262","user":{"login":"bricelam","id":1226749,"avatar_url":"https://avatars.githubusercontent.com/u/1226749?v=3","gravatar_id":"","url":"https://api.github.com/users/bricelam","html_url":"https://github.com/bricelam","followers_url":"https://api.github.com/users/bricelam/followers","following_url":"https://api.github.com/users/bricelam/following{/other_user}","gists_url":"https://api.github.com/users/bricelam/gists{/gist_id}","starred_url":"https://api.github.com/users/bricelam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bricelam/subscriptions","organizations_url":"https://api.github.com/users/bricelam/orgs","repos_url":"https://api.github.com/users/bricelam/repos","events_url":"https://api.github.com/users/bricelam/events{/privacy}","received_events_url":"https://api.github.com/users/bricelam/received_events","type":"User","site_admin":false},"body":"Could we get a list from the provider?","created_at":"2016-01-07T18:49:05Z","updated_at":"2016-01-07T18:49:05Z","html_url":"https://github.com/aspnet/EntityFramework/pull/4197#discussion_r49109605","pull_request_url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/4197","_links":{"self":{"href":"https://api.github.com/repos/aspnet/EntityFramework/pulls/comments/49109605"},"html":{"href":"https://github.com/aspnet/EntityFramework/pull/4197#discussion_r49109605"},"pull_request":{"href":"https://api.github.com/repos/aspnet/EntityFramework/pulls/4197"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/4197","id":54827039,"html_url":"https://github.com/aspnet/EntityFramework/pull/4197","diff_url":"https://github.com/aspnet/EntityFramework/pull/4197.diff","patch_url":"https://github.com/aspnet/EntityFramework/pull/4197.patch","issue_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/4197","number":4197,"state":"open","locked":false,"title":"[uwp] Add command to generate directives for runtime types","user":{"login":"natemcmaster","id":2696087,"avatar_url":"https://avatars.githubusercontent.com/u/2696087?v=3","gravatar_id":"","url":"https://api.github.com/users/natemcmaster","html_url":"https://github.com/natemcmaster","followers_url":"https://api.github.com/users/natemcmaster/followers","following_url":"https://api.github.com/users/natemcmaster/following{/other_user}","gists_url":"https://api.github.com/users/natemcmaster/gists{/gist_id}","starred_url":"https://api.github.com/users/natemcmaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natemcmaster/subscriptions","organizations_url":"https://api.github.com/users/natemcmaster/orgs","repos_url":"https://api.github.com/users/natemcmaster/repos","events_url":"https://api.github.com/users/natemcmaster/events{/privacy}","received_events_url":"https://api.github.com/users/natemcmaster/received_events","type":"User","site_admin":false},"body":"Adds powershell command `Scaffold-Directives`. This will automatically create a file in the UWP project called \"EntityFramework.g.rd.xml\" this file contains runtime directives for the types user projects will need at runtime.\r\n\r\nRemoves the chained generic-type inference which was causing the compiler produce heavily bloated binaries or to crash with out-of-memory exceptions.\r\n\r\nFix #3801 \r\n\r\nTODO:\r\n- [ ] Improve coverage of generate runtime directives for queries using TransparentIdentifier and anonymous types\r\n- [x] Add analyzer to improve maintainability of runtime-generation ( see https://github.com/aspnet/EntityFramework/pull/4199)\r\n- [ ] Catch metadata missing exception and throw user-friendly error to educate on existence of the new command","created_at":"2015-12-30T20:25:29Z","updated_at":"2016-01-07T18:49:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f004b7584911167891fcc3b3fbbfe0e3311f09cc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/4197/commits","review_comments_url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/4197/comments","review_comment_url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/4197/comments","statuses_url":"https://api.github.com/repos/aspnet/EntityFramework/statuses/ca21e6e775014c55a6ab677d3c0c05c16d429262","head":{"label":"natemcmaster:rdxml","ref":"rdxml","sha":"ca21e6e775014c55a6ab677d3c0c05c16d429262","user":{"login":"natemcmaster","id":2696087,"avatar_url":"https://avatars.githubusercontent.com/u/2696087?v=3","gravatar_id":"","url":"https://api.github.com/users/natemcmaster","html_url":"https://github.com/natemcmaster","followers_url":"https://api.github.com/users/natemcmaster/followers","following_url":"https://api.github.com/users/natemcmaster/following{/other_user}","gists_url":"https://api.github.com/users/natemcmaster/gists{/gist_id}","starred_url":"https://api.github.com/users/natemcmaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natemcmaster/subscriptions","organizations_url":"https://api.github.com/users/natemcmaster/orgs","repos_url":"https://api.github.com/users/natemcmaster/repos","events_url":"https://api.github.com/users/natemcmaster/events{/privacy}","received_events_url":"https://api.github.com/users/natemcmaster/received_events","type":"User","site_admin":false},"repo":{"id":19757095,"name":"EntityFramework","full_name":"natemcmaster/EntityFramework","owner":{"login":"natemcmaster","id":2696087,"avatar_url":"https://avatars.githubusercontent.com/u/2696087?v=3","gravatar_id":"","url":"https://api.github.com/users/natemcmaster","html_url":"https://github.com/natemcmaster","followers_url":"https://api.github.com/users/natemcmaster/followers","following_url":"https://api.github.com/users/natemcmaster/following{/other_user}","gists_url":"https://api.github.com/users/natemcmaster/gists{/gist_id}","starred_url":"https://api.github.com/users/natemcmaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natemcmaster/subscriptions","organizations_url":"https://api.github.com/users/natemcmaster/orgs","repos_url":"https://api.github.com/users/natemcmaster/repos","events_url":"https://api.github.com/users/natemcmaster/events{/privacy}","received_events_url":"https://api.github.com/users/natemcmaster/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/natemcmaster/EntityFramework","description":"","fork":true,"url":"https://api.github.com/repos/natemcmaster/EntityFramework","forks_url":"https://api.github.com/repos/natemcmaster/EntityFramework/forks","keys_url":"https://api.github.com/repos/natemcmaster/EntityFramework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/natemcmaster/EntityFramework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/natemcmaster/EntityFramework/teams","hooks_url":"https://api.github.com/repos/natemcmaster/EntityFramework/hooks","issue_events_url":"https://api.github.com/repos/natemcmaster/EntityFramework/issues/events{/number}","events_url":"https://api.github.com/repos/natemcmaster/EntityFramework/events","assignees_url":"https://api.github.com/repos/natemcmaster/EntityFramework/assignees{/user}","branches_url":"https://api.github.com/repos/natemcmaster/EntityFramework/branches{/branch}","tags_url":"https://api.github.com/repos/natemcmaster/EntityFramework/tags","blobs_url":"https://api.github.com/repos/natemcmaster/EntityFramework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/natemcmaster/EntityFramework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/natemcmaster/EntityFramework/git/refs{/sha}","trees_url":"https://api.github.com/repos/natemcmaster/EntityFramework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/natemcmaster/EntityFramework/statuses/{sha}","languages_url":"https://api.github.com/repos/natemcmaster/EntityFramework/languages","stargazers_url":"https://api.github.com/repos/natemcmaster/EntityFramework/stargazers","contributors_url":"https://api.github.com/repos/natemcmaster/EntityFramework/contributors","subscribers_url":"https://api.github.com/repos/natemcmaster/EntityFramework/subscribers","subscription_url":"https://api.github.com/repos/natemcmaster/EntityFramework/subscription","commits_url":"https://api.github.com/repos/natemcmaster/EntityFramework/commits{/sha}","git_commits_url":"https://api.github.com/repos/natemcmaster/EntityFramework/git/commits{/sha}","comments_url":"https://api.github.com/repos/natemcmaster/EntityFramework/comments{/number}","issue_comment_url":"https://api.github.com/repos/natemcmaster/EntityFramework/issues/comments{/number}","contents_url":"https://api.github.com/repos/natemcmaster/EntityFramework/contents/{+path}","compare_url":"https://api.github.com/repos/natemcmaster/EntityFramework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/natemcmaster/EntityFramework/merges","archive_url":"https://api.github.com/repos/natemcmaster/EntityFramework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/natemcmaster/EntityFramework/downloads","issues_url":"https://api.github.com/repos/natemcmaster/EntityFramework/issues{/number}","pulls_url":"https://api.github.com/repos/natemcmaster/EntityFramework/pulls{/number}","milestones_url":"https://api.github.com/repos/natemcmaster/EntityFramework/milestones{/number}","notifications_url":"https://api.github.com/repos/natemcmaster/EntityFramework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/natemcmaster/EntityFramework/labels{/name}","releases_url":"https://api.github.com/repos/natemcmaster/EntityFramework/releases{/id}","created_at":"2014-05-13T21:47:53Z","updated_at":"2014-06-25T23:16:04Z","pushed_at":"2016-01-06T18:10:41Z","git_url":"git://github.com/natemcmaster/EntityFramework.git","ssh_url":"git@github.com:natemcmaster/EntityFramework.git","clone_url":"https://github.com/natemcmaster/EntityFramework.git","svn_url":"https://github.com/natemcmaster/EntityFramework","homepage":null,"size":28186,"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":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"ee38c9505e86df9de93743138759e4685f0cc4aa","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":16157746,"name":"EntityFramework","full_name":"aspnet/EntityFramework","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/EntityFramework","description":"Microsoft's recommended data access technology for new applications in .NET.","fork":false,"url":"https://api.github.com/repos/aspnet/EntityFramework","forks_url":"https://api.github.com/repos/aspnet/EntityFramework/forks","keys_url":"https://api.github.com/repos/aspnet/EntityFramework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/EntityFramework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/EntityFramework/teams","hooks_url":"https://api.github.com/repos/aspnet/EntityFramework/hooks","issue_events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/EntityFramework/events","assignees_url":"https://api.github.com/repos/aspnet/EntityFramework/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/EntityFramework/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/EntityFramework/tags","blobs_url":"https://api.github.com/repos/aspnet/EntityFramework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/EntityFramework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/EntityFramework/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/EntityFramework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/EntityFramework/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/EntityFramework/languages","stargazers_url":"https://api.github.com/repos/aspnet/EntityFramework/stargazers","contributors_url":"https://api.github.com/repos/aspnet/EntityFramework/contributors","subscribers_url":"https://api.github.com/repos/aspnet/EntityFramework/subscribers","subscription_url":"https://api.github.com/repos/aspnet/EntityFramework/subscription","commits_url":"https://api.github.com/repos/aspnet/EntityFramework/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/EntityFramework/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/EntityFramework/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/EntityFramework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/EntityFramework/merges","archive_url":"https://api.github.com/repos/aspnet/EntityFramework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/EntityFramework/downloads","issues_url":"https://api.github.com/repos/aspnet/EntityFramework/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/EntityFramework/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/EntityFramework/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/EntityFramework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/EntityFramework/releases{/id}","created_at":"2014-01-23T00:52:01Z","updated_at":"2016-01-07T12:47:42Z","pushed_at":"2016-01-07T18:10:37Z","git_url":"git://github.com/aspnet/EntityFramework.git","ssh_url":"git@github.com:aspnet/EntityFramework.git","clone_url":"https://github.com/aspnet/EntityFramework.git","svn_url":"https://github.com/aspnet/EntityFramework","homepage":"","size":32544,"stargazers_count":2690,"watchers_count":2690,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":809,"mirror_url":null,"open_issues_count":517,"forks":809,"open_issues":517,"watchers":2690,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/EntityFramework/pulls/4197"},"html":{"href":"https://github.com/aspnet/EntityFramework/pull/4197"},"issue":{"href":"https://api.github.com/repos/aspnet/EntityFramework/issues/4197"},"comments":{"href":"https://api.github.com/repos/aspnet/EntityFramework/issues/4197/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/EntityFramework/pulls/4197/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/EntityFramework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/EntityFramework/pulls/4197/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/EntityFramework/statuses/ca21e6e775014c55a6ab677d3c0c05c16d429262"}}}}