{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/233682688","pull_request_review_id":175154877,"id":233682688,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzY4MjY4OA==","diff_hunk":"@@ -0,0 +1,88 @@\n+﻿// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.  \n+\n+using System.Collections.Generic;\n+using System.Linq;\n+\n+namespace Microsoft.CodeAnalysis.CodeRefactorings.PullMemberUp\n+{\n+    internal class PullMembersUpAnalysisBuilder\n+    {\n+        internal static AnalysisResult BuildAnalysisResult(\n+            INamedTypeSymbol targetSymbol,\n+            IEnumerable<(ISymbol member, bool makeAbstract)> selectedMembersAndOption)\n+        {\n+            var memberResult = selectedMembersAndOption.Select(selection =>\n+            {\n+                if (targetSymbol.TypeKind == TypeKind.Interface)\n+                {\n+                    return new MemberAnalysisResult(\n+                        selection.member,\n+                        changeOriginToPublic: selection.member.DeclaredAccessibility != Accessibility.Public,\n+                        changeOriginToNonStatic: selection.member.IsStatic);\n+                }\n+                else\n+                {\n+                    return new MemberAnalysisResult(selection.member, makeAbstract: selection.makeAbstract);\n+                }\n+            });\n+\n+            if (targetSymbol.TypeKind == TypeKind.Interface)\n+            {\n+                return new AnalysisResult(false, targetSymbol, memberResult);\n+            }\n+            else\n+            {\n+                var changeTargetToAbstract = \n+                    !targetSymbol.IsAbstract &&\n+                    selectedMembersAndOption.Aggregate(false, (acc, selection) => acc || selection.member.IsAbstract || selection.makeAbstract);\n+                return new AnalysisResult(changeTargetToAbstract, targetSymbol, memberResult);\n+            }\n+        }\n+    }\n+\n+    internal class MemberAnalysisResult\n+    {\n+        public ISymbol Member { get; }\n+\n+        public bool ChangeOriginToPublic { get; }\n+\n+        public bool ChangeOriginToNonStatic { get; }\n+\n+        public bool MakeAbstract { get; }","path":"src/Features/Core/Portable/PullMemberUp/PullMemberUpAnalyzer.cs","position":51,"original_position":51,"commit_id":"93ddc955f4704d89c772ac218b7ceb500953a347","original_commit_id":"93ddc955f4704d89c772ac218b7ceb500953a347","user":{"login":"CyrusNajmabadi","id":4564579,"node_id":"MDQ6VXNlcjQ1NjQ1Nzk=","avatar_url":"https://avatars3.githubusercontent.com/u/4564579?v=4","gravatar_id":"","url":"https://api.github.com/users/CyrusNajmabadi","html_url":"https://github.com/CyrusNajmabadi","followers_url":"https://api.github.com/users/CyrusNajmabadi/followers","following_url":"https://api.github.com/users/CyrusNajmabadi/following{/other_user}","gists_url":"https://api.github.com/users/CyrusNajmabadi/gists{/gist_id}","starred_url":"https://api.github.com/users/CyrusNajmabadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CyrusNajmabadi/subscriptions","organizations_url":"https://api.github.com/users/CyrusNajmabadi/orgs","repos_url":"https://api.github.com/users/CyrusNajmabadi/repos","events_url":"https://api.github.com/users/CyrusNajmabadi/events{/privacy}","received_events_url":"https://api.github.com/users/CyrusNajmabadi/received_events","type":"User","site_admin":false},"body":"why is this one not 'ChangeOriginToAbstract'?  Or, why are the others not named 'MakePublic' and 'MakeInstance'?  If there's a good reason, document in the code.  Otherise, make consistent.","created_at":"2018-11-15T01:19:07Z","updated_at":"2018-11-15T01:19:07Z","html_url":"https://github.com/dotnet/roslyn/pull/30254#discussion_r233682688","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/30254","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/233682688"},"html":{"href":"https://github.com/dotnet/roslyn/pull/30254#discussion_r233682688"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/30254"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/30254","id":219550938,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NTUwOTM4","html_url":"https://github.com/dotnet/roslyn/pull/30254","diff_url":"https://github.com/dotnet/roslyn/pull/30254.diff","patch_url":"https://github.com/dotnet/roslyn/pull/30254.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/30254","number":30254,"state":"open","locked":false,"title":"(WIP)Push Members Up","user":{"login":"Cosifne","id":24360909,"node_id":"MDQ6VXNlcjI0MzYwOTA5","avatar_url":"https://avatars2.githubusercontent.com/u/24360909?v=4","gravatar_id":"","url":"https://api.github.com/users/Cosifne","html_url":"https://github.com/Cosifne","followers_url":"https://api.github.com/users/Cosifne/followers","following_url":"https://api.github.com/users/Cosifne/following{/other_user}","gists_url":"https://api.github.com/users/Cosifne/gists{/gist_id}","starred_url":"https://api.github.com/users/Cosifne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cosifne/subscriptions","organizations_url":"https://api.github.com/users/Cosifne/orgs","repos_url":"https://api.github.com/users/Cosifne/repos","events_url":"https://api.github.com/users/Cosifne/events{/privacy}","received_events_url":"https://api.github.com/users/Cosifne/received_events","type":"User","site_admin":false},"body":"Related issue: [PushMemberUp/Down](https://github.com/dotnet/roslyn/issues/25145)\r\n\r\nA quick summary of the design\r\n1. Use Quick Action enable user to do some quick refactoring. \r\n2. Create a dialog to provide more complex refactoring like changing the modifier, select multiple member and etc.\r\n\r\nA quick summary of the UX design\r\nCurrent implemented:\r\n1. Add telemetry to see how often this even comes up and how many / what kind of issues arise, along with whether the user continues anyway or goes back and makes changes. This could inform a future change in UX.\r\n2. Remove the check box those are totally impossible to check. (Make abstract box for field and abstract member)\r\n3. Don't clear user's choice on the checkbox when the checkbox is disable, since the user may just move around the target Treeview.\r\n4. Give information why the check box is disabled.\r\n5. Improve polish, accessibility, strings.\r\n\r\nFuture work On UI:\r\n1. Investigate other IDE to figure out how they create the warning scenario, how they show and give members.\r\n2. Make improvement on the Warning dialog base on telemetry.\r\n\r\nCurrent UI:\r\n![pullmemberupui](https://user-images.githubusercontent.com/24360909/48520217-ad5fbf00-e824-11e8-9484-0d76932d048c.gif)\r\n\r\n\r\n\r\nTo do list:\r\n- [x] Investigate if there is faster way to find dependents\r\n- [x] UX review on the UI.","created_at":"2018-10-02T00:06:54Z","updated_at":"2018-11-15T01:19:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e22a31521b5fe68568a631abdb0afe13ba51457c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":166377917,"node_id":"MDU6TGFiZWwxNjYzNzc5MTc=","url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-IDE","name":"Area-IDE","color":"5319e7","default":false}],"milestone":{"url":"https://api.github.com/repos/dotnet/roslyn/milestones/36","html_url":"https://github.com/dotnet/roslyn/milestone/36","labels_url":"https://api.github.com/repos/dotnet/roslyn/milestones/36/labels","id":3663714,"node_id":"MDk6TWlsZXN0b25lMzY2MzcxNA==","number":36,"title":"16.0.P2","description":"","creator":{"login":"jinujoseph","id":12449387,"node_id":"MDQ6VXNlcjEyNDQ5Mzg3","avatar_url":"https://avatars3.githubusercontent.com/u/12449387?v=4","gravatar_id":"","url":"https://api.github.com/users/jinujoseph","html_url":"https://github.com/jinujoseph","followers_url":"https://api.github.com/users/jinujoseph/followers","following_url":"https://api.github.com/users/jinujoseph/following{/other_user}","gists_url":"https://api.github.com/users/jinujoseph/gists{/gist_id}","starred_url":"https://api.github.com/users/jinujoseph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jinujoseph/subscriptions","organizations_url":"https://api.github.com/users/jinujoseph/orgs","repos_url":"https://api.github.com/users/jinujoseph/repos","events_url":"https://api.github.com/users/jinujoseph/events{/privacy}","received_events_url":"https://api.github.com/users/jinujoseph/received_events","type":"User","site_admin":false},"open_issues":124,"closed_issues":112,"state":"open","created_at":"2018-09-18T00:39:12Z","updated_at":"2018-11-15T00:24:38Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/30254/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/30254/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/30254/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/93ddc955f4704d89c772ac218b7ceb500953a347","head":{"label":"Cosifne:shech/push_member","ref":"shech/push_member","sha":"93ddc955f4704d89c772ac218b7ceb500953a347","user":{"login":"Cosifne","id":24360909,"node_id":"MDQ6VXNlcjI0MzYwOTA5","avatar_url":"https://avatars2.githubusercontent.com/u/24360909?v=4","gravatar_id":"","url":"https://api.github.com/users/Cosifne","html_url":"https://github.com/Cosifne","followers_url":"https://api.github.com/users/Cosifne/followers","following_url":"https://api.github.com/users/Cosifne/following{/other_user}","gists_url":"https://api.github.com/users/Cosifne/gists{/gist_id}","starred_url":"https://api.github.com/users/Cosifne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cosifne/subscriptions","organizations_url":"https://api.github.com/users/Cosifne/orgs","repos_url":"https://api.github.com/users/Cosifne/repos","events_url":"https://api.github.com/users/Cosifne/events{/privacy}","received_events_url":"https://api.github.com/users/Cosifne/received_events","type":"User","site_admin":false},"repo":{"id":151172631,"node_id":"MDEwOlJlcG9zaXRvcnkxNTExNzI2MzE=","name":"roslyn","full_name":"Cosifne/roslyn","private":false,"owner":{"login":"Cosifne","id":24360909,"node_id":"MDQ6VXNlcjI0MzYwOTA5","avatar_url":"https://avatars2.githubusercontent.com/u/24360909?v=4","gravatar_id":"","url":"https://api.github.com/users/Cosifne","html_url":"https://github.com/Cosifne","followers_url":"https://api.github.com/users/Cosifne/followers","following_url":"https://api.github.com/users/Cosifne/following{/other_user}","gists_url":"https://api.github.com/users/Cosifne/gists{/gist_id}","starred_url":"https://api.github.com/users/Cosifne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cosifne/subscriptions","organizations_url":"https://api.github.com/users/Cosifne/orgs","repos_url":"https://api.github.com/users/Cosifne/repos","events_url":"https://api.github.com/users/Cosifne/events{/privacy}","received_events_url":"https://api.github.com/users/Cosifne/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Cosifne/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":true,"url":"https://api.github.com/repos/Cosifne/roslyn","forks_url":"https://api.github.com/repos/Cosifne/roslyn/forks","keys_url":"https://api.github.com/repos/Cosifne/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Cosifne/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Cosifne/roslyn/teams","hooks_url":"https://api.github.com/repos/Cosifne/roslyn/hooks","issue_events_url":"https://api.github.com/repos/Cosifne/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/Cosifne/roslyn/events","assignees_url":"https://api.github.com/repos/Cosifne/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/Cosifne/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/Cosifne/roslyn/tags","blobs_url":"https://api.github.com/repos/Cosifne/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Cosifne/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Cosifne/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/Cosifne/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Cosifne/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/Cosifne/roslyn/languages","stargazers_url":"https://api.github.com/repos/Cosifne/roslyn/stargazers","contributors_url":"https://api.github.com/repos/Cosifne/roslyn/contributors","subscribers_url":"https://api.github.com/repos/Cosifne/roslyn/subscribers","subscription_url":"https://api.github.com/repos/Cosifne/roslyn/subscription","commits_url":"https://api.github.com/repos/Cosifne/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/Cosifne/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/Cosifne/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/Cosifne/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/Cosifne/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/Cosifne/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Cosifne/roslyn/merges","archive_url":"https://api.github.com/repos/Cosifne/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Cosifne/roslyn/downloads","issues_url":"https://api.github.com/repos/Cosifne/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/Cosifne/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/Cosifne/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/Cosifne/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Cosifne/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/Cosifne/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/Cosifne/roslyn/deployments","created_at":"2018-10-01T23:07:49Z","updated_at":"2018-10-01T23:08:34Z","pushed_at":"2018-11-15T00:02:38Z","git_url":"git://github.com/Cosifne/roslyn.git","ssh_url":"git@github.com:Cosifne/roslyn.git","clone_url":"https://github.com/Cosifne/roslyn.git","svn_url":"https://github.com/Cosifne/roslyn","homepage":"","size":460303,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"6a0523be64b13acc2a1a400ee78f0fde1c9c4f77","user":{"login":"dotnet","id":9141961,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkxNDE5NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":29078997,"node_id":"MDEwOlJlcG9zaXRvcnkyOTA3ODk5Nw==","name":"roslyn","full_name":"dotnet/roslyn","private":false,"owner":{"login":"dotnet","id":9141961,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkxNDE5NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dotnet/roslyn","description":"The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.","fork":false,"url":"https://api.github.com/repos/dotnet/roslyn","forks_url":"https://api.github.com/repos/dotnet/roslyn/forks","keys_url":"https://api.github.com/repos/dotnet/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/roslyn/teams","hooks_url":"https://api.github.com/repos/dotnet/roslyn/hooks","issue_events_url":"https://api.github.com/repos/dotnet/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/roslyn/events","assignees_url":"https://api.github.com/repos/dotnet/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/roslyn/tags","blobs_url":"https://api.github.com/repos/dotnet/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/roslyn/languages","stargazers_url":"https://api.github.com/repos/dotnet/roslyn/stargazers","contributors_url":"https://api.github.com/repos/dotnet/roslyn/contributors","subscribers_url":"https://api.github.com/repos/dotnet/roslyn/subscribers","subscription_url":"https://api.github.com/repos/dotnet/roslyn/subscription","commits_url":"https://api.github.com/repos/dotnet/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/roslyn/merges","archive_url":"https://api.github.com/repos/dotnet/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/roslyn/downloads","issues_url":"https://api.github.com/repos/dotnet/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/roslyn/deployments","created_at":"2015-01-11T02:39:03Z","updated_at":"2018-11-15T01:03:36Z","pushed_at":"2018-11-15T00:59:54Z","git_url":"git://github.com/dotnet/roslyn.git","ssh_url":"git@github.com:dotnet/roslyn.git","clone_url":"https://github.com/dotnet/roslyn.git","svn_url":"https://github.com/dotnet/roslyn","homepage":"https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/","size":488007,"stargazers_count":10350,"watchers_count":10350,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2450,"mirror_url":null,"archived":false,"open_issues_count":5381,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":2450,"open_issues":5381,"watchers":10350,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/30254"},"html":{"href":"https://github.com/dotnet/roslyn/pull/30254"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/30254"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/30254/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/30254/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/30254/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/93ddc955f4704d89c772ac218b7ceb500953a347"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"CyrusNajmabadi"}}