{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/41923535","id":41923535,"diff_hunk":"@@ -0,0 +1,46 @@\n+﻿Imports System.Composition\n+Imports System.Threading\n+Imports System.Threading.Tasks\n+Imports Microsoft.CodeAnalysis.FindSymbols.Finders\n+Imports Microsoft.CodeAnalysis.Host.Mef\n+\n+Namespace Microsoft.CodeAnalysis.FindSymbols\n+    <ExportLanguageService(GetType(ILanguageServiceReferenceFinder), LanguageNames.VisualBasic), [Shared]>\n+    Friend Class VisualBasicReferenceFinder\n+        Implements ILanguageServiceReferenceFinder\n+\n+        Public Async Function DetermineCascadedSymbolsAsync(namedType As INamedTypeSymbol, project As Project, cancellationToken As CancellationToken) As Task(Of IEnumerable(Of ISymbol)) Implements ILanguageServiceReferenceFinder.DetermineCascadedSymbolsAsync\n+            If namedType.Language = LanguageNames.VisualBasic AndAlso project.Language = LanguageNames.VisualBasic Then\n+                Dim compilation = Await project.GetCompilationAsync(cancellationToken).ConfigureAwait(False)\n+\n+                ' If this is a WinForms project, then the VB 'my' feature may have synthesized \n+                ' a property that would return an instance of the main Form type for the project.\n+                ' Search for such properties and cascade to them as well.\n+                Dim myPropertySymbols = GetMatchingMyPropertySymbols(namedType, DirectCast(compilation, VisualBasicCompilation), cancellationToken).Distinct().ToList()\n+                If myPropertySymbols.Count > 0 Then\n+                    Return myPropertySymbols\n+                End If\n+            End If\n+\n+            Return Nothing\n+        End Function\n+\n+        Private Function GetMatchingMyPropertySymbols(symbol As INamedTypeSymbol, compilation As VisualBasicCompilation, cancellationToken As CancellationToken) As IEnumerable(Of IPropertySymbol)\n+            Return GetMatchingMyPropertySymbols(symbol, compilation, compilation.GlobalNamespace, cancellationToken).Concat(","path":"src/Workspaces/VisualBasic/Portable/FindSymbols/VisualBasicReferenceFinder.vb","position":29,"original_position":29,"commit_id":"67632d2a4dbf594787328d05d5a716db1d8cbb32","original_commit_id":"cd5481da2dcb607902bc16027f43dc2b59181bd8","user":{"login":"CyrusNajmabadi","id":4564579,"avatar_url":"https://avatars.githubusercontent.com/u/4564579?v=3","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":"So, I was using this code as my guide:\r\n\r\n```vb\r\n        Protected Overrides Function FindRelatedExplicitlyDeclaredSymbol(symbol As ISymbol, compilation As Compilation) As ISymbol\r\n            ' For example: My.Forms.[|LoginForm|]\r\n            ' LoginForm is a SynthesizedMyGroupCollectionPropertySymbol with no Location. Use the\r\n            ' type of this property, the actual LoginForm type itself, for navigation purposes.\r\n\r\n            If symbol.IsKind(SymbolKind.Property) AndAlso symbol.IsImplicitlyDeclared Then\r\n                Dim propertySymbol = DirectCast(symbol, IPropertySymbol)\r\n                If propertySymbol.ContainingType IsNot Nothing AndAlso\r\n                   propertySymbol.ContainingType.Name = \"MyForms\" AndAlso\r\n                   propertySymbol.ContainingType.ContainingNamespace IsNot Nothing AndAlso\r\n                   propertySymbol.ContainingType.ContainingNamespace.IsMyNamespace(compilation) Then\r\n\r\n                    Return propertySymbol.Type\r\n                End If\r\n            End If\r\n```\r\n\r\nIsMyNamespace then is written like so:\r\n\r\n```vb\r\n        Public Function IsMyNamespace(symbol As ISymbol, compilation As Compilation) As Boolean\r\n            If symbol.Kind <> SymbolKind.Namespace OrElse symbol.Name <> \"My\" Then\r\n                Return False\r\n            End If\r\n\r\n            Dim containingNamespace = symbol.ContainingNamespace\r\n\r\n            Return containingNamespace IsNot Nothing AndAlso\r\n                  (containingNamespace.IsGlobalNamespace OrElse Object.Equals(containingNamespace, compilation.RootNamespace))\r\n        End Function\r\n```\r\n\r\nBut if you think it could only be in the root namespace i'll def change!","created_at":"2015-10-13T20:53:53Z","updated_at":"2015-10-13T20:53:53Z","html_url":"https://github.com/dotnet/roslyn/pull/5922#discussion_r41923535","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/5922","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/41923535"},"html":{"href":"https://github.com/dotnet/roslyn/pull/5922#discussion_r41923535"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/5922"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/5922","id":47585214,"html_url":"https://github.com/dotnet/roslyn/pull/5922","diff_url":"https://github.com/dotnet/roslyn/pull/5922.diff","patch_url":"https://github.com/dotnet/roslyn/pull/5922.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/5922","number":5922,"state":"open","locked":false,"title":"When renaming a VB form, cascade to the synthesized compiler \"My\" property for the instance of the form.","user":{"login":"CyrusNajmabadi","id":4564579,"avatar_url":"https://avatars.githubusercontent.com/u/4564579?v=3","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":"Fixes https://github.com/dotnet/roslyn/issues/4517","created_at":"2015-10-13T20:38:53Z","updated_at":"2015-10-13T20:53:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1d646289371d26b3748d97cbcfd17c82ca6a2f4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/5922/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/5922/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/5922/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/67632d2a4dbf594787328d05d5a716db1d8cbb32","head":{"label":"CyrusNajmabadi:renameVBForm","ref":"renameVBForm","sha":"67632d2a4dbf594787328d05d5a716db1d8cbb32","user":{"login":"CyrusNajmabadi","id":4564579,"avatar_url":"https://avatars.githubusercontent.com/u/4564579?v=3","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},"repo":{"id":30565155,"name":"roslyn","full_name":"CyrusNajmabadi/roslyn","owner":{"login":"CyrusNajmabadi","id":4564579,"avatar_url":"https://avatars.githubusercontent.com/u/4564579?v=3","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},"private":false,"html_url":"https://github.com/CyrusNajmabadi/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/CyrusNajmabadi/roslyn","forks_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/forks","keys_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/teams","hooks_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/hooks","issue_events_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/events","assignees_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/tags","blobs_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/languages","stargazers_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/stargazers","contributors_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/contributors","subscribers_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/subscribers","subscription_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/subscription","commits_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/merges","archive_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/downloads","issues_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/CyrusNajmabadi/roslyn/releases{/id}","created_at":"2015-02-09T23:45:22Z","updated_at":"2015-02-12T20:34:05Z","pushed_at":"2015-10-13T20:49:11Z","git_url":"git://github.com/CyrusNajmabadi/roslyn.git","ssh_url":"git@github.com:CyrusNajmabadi/roslyn.git","clone_url":"https://github.com/CyrusNajmabadi/roslyn.git","svn_url":"https://github.com/CyrusNajmabadi/roslyn","homepage":"","size":103618,"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":"dotnet:master","ref":"master","sha":"571ea5202dca4408c6c26075a02d2b6f79ba5f3e","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","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,"name":"roslyn","full_name":"dotnet/roslyn","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","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},"private":false,"html_url":"https://github.com/dotnet/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers 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}","created_at":"2015-01-11T02:39:03Z","updated_at":"2015-10-13T07:02:49Z","pushed_at":"2015-10-13T20:49:33Z","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":"","size":208285,"stargazers_count":3487,"watchers_count":3487,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":816,"mirror_url":null,"open_issues_count":1503,"forks":816,"open_issues":1503,"watchers":3487,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/5922"},"html":{"href":"https://github.com/dotnet/roslyn/pull/5922"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/5922"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/5922/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/5922/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/5922/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/67632d2a4dbf594787328d05d5a716db1d8cbb32"}}}}