{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/25988502","id":25988502,"diff_hunk":"@@ -0,0 +1,70 @@\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 Microsoft.VisualStudio.Debugger;\n+using Microsoft.VisualStudio.Debugger.Evaluation;\n+using Microsoft.VisualStudio.Debugger.Evaluation.ClrCompilation;\n+using System;\n+\n+namespace Microsoft.CodeAnalysis.ExpressionEvaluator\n+{\n+    internal sealed class NativeViewExpansion : Expansion\n+    {\n+        internal override void GetRows(\n+            ResultProvider resultProvider,\n+            ArrayBuilder<EvalResultDataItem> rows,\n+            DkmInspectionContext inspectionContext,\n+            EvalResultDataItem parent,\n+            DkmClrValue value,\n+            int startIndex,\n+            int count,\n+            bool visitAll,\n+            ref int index)\n+        {\n+            if (InRange(startIndex, count, index))\n+            {\n+                rows.Add(GetRow(resultProvider, inspectionContext, value, parent));\n+            }\n+\n+            index++;\n+        }\n+\n+        private EvalResultDataItem GetRow(\n+            ResultProvider resultProvider,\n+            DkmInspectionContext inspectionContext,\n+            DkmClrValue comObject,\n+            EvalResultDataItem parent)\n+        {\n+            try\n+            {\n+                inspectionContext.RuntimeInstance.Process.GetNativeRuntimeInstance();\n+            }\n+            catch (DkmException)\n+            {\n+                // Native View requires native debugging to be enabled.\n+                return new EvalResultDataItem(Resources.NativeView, Resources.NativeViewNotNativeDebugging);\n+            }\n+\n+            var formatString = IntPtr.Size == 4 ? \"(IUnknown*)0x{0:X8}\" : \"(IUnknown*)0x{0:X16}\";\n+            var name = string.Format(formatString, comObject.NativeComPointer);\n+            var fullName = string.Concat(\"{C++}\", name);","path":"Src/ExpressionEvaluator/Core/Source/ResultProvider/Expansion/NativeViewExpansion.cs","position":49,"original_position":49,"commit_id":"8031f9bc3dfcc54afb5f0d496035da4d23dd99cc","original_commit_id":"8031f9bc3dfcc54afb5f0d496035da4d23dd99cc","user":{"login":"cston","id":10732005,"avatar_url":"https://avatars.githubusercontent.com/u/10732005?v=3","gravatar_id":"","url":"https://api.github.com/users/cston","html_url":"https://github.com/cston","followers_url":"https://api.github.com/users/cston/followers","following_url":"https://api.github.com/users/cston/following{/other_user}","gists_url":"https://api.github.com/users/cston/gists{/gist_id}","starred_url":"https://api.github.com/users/cston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cston/subscriptions","organizations_url":"https://api.github.com/users/cston/orgs","repos_url":"https://api.github.com/users/cston/repos","events_url":"https://api.github.com/users/cston/events{/privacy}","received_events_url":"https://api.github.com/users/cston/received_events","type":"User","site_admin":false},"body":"Perhaps \"{C++}(IUnknown)0x:\" + string.Format((IntPtr.Size == 4 ? \"{0:X8}\" : \"{0:X16}\", comObject.NativeComPointer)","created_at":"2015-03-07T00:01:28Z","updated_at":"2015-03-07T00:01:28Z","html_url":"https://github.com/dotnet/roslyn/pull/1111#discussion_r25988502","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/1111","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/25988502"},"html":{"href":"https://github.com/dotnet/roslyn/pull/1111#discussion_r25988502"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/1111"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/1111","id":30689920,"html_url":"https://github.com/dotnet/roslyn/pull/1111","diff_url":"https://github.com/dotnet/roslyn/pull/1111.diff","patch_url":"https://github.com/dotnet/roslyn/pull/1111.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/1111","number":1111,"state":"open","locked":false,"title":"EE: Add support for COM object Inspection","user":{"login":"pnelsonmsft","id":10980558,"avatar_url":"https://avatars.githubusercontent.com/u/10980558?v=3","gravatar_id":"","url":"https://api.github.com/users/pnelsonmsft","html_url":"https://github.com/pnelsonmsft","followers_url":"https://api.github.com/users/pnelsonmsft/followers","following_url":"https://api.github.com/users/pnelsonmsft/following{/other_user}","gists_url":"https://api.github.com/users/pnelsonmsft/gists{/gist_id}","starred_url":"https://api.github.com/users/pnelsonmsft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnelsonmsft/subscriptions","organizations_url":"https://api.github.com/users/pnelsonmsft/orgs","repos_url":"https://api.github.com/users/pnelsonmsft/repos","events_url":"https://api.github.com/users/pnelsonmsft/events{/privacy}","received_events_url":"https://api.github.com/users/pnelsonmsft/received_events","type":"User","site_admin":false},"body":"Implement support for inspecting native COM objects in the new EE. The native view of the COM object now shows up under a \"Native View\" node.","created_at":"2015-03-06T23:43:25Z","updated_at":"2015-03-07T00:01:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5bfcd854824cc3b1b0ff42e498c9fb58edd2fa5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/1111/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/1111/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/1111/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/8031f9bc3dfcc54afb5f0d496035da4d23dd99cc","head":{"label":"pnelsonmsft:cominspection","ref":"cominspection","sha":"8031f9bc3dfcc54afb5f0d496035da4d23dd99cc","user":{"login":"pnelsonmsft","id":10980558,"avatar_url":"https://avatars.githubusercontent.com/u/10980558?v=3","gravatar_id":"","url":"https://api.github.com/users/pnelsonmsft","html_url":"https://github.com/pnelsonmsft","followers_url":"https://api.github.com/users/pnelsonmsft/followers","following_url":"https://api.github.com/users/pnelsonmsft/following{/other_user}","gists_url":"https://api.github.com/users/pnelsonmsft/gists{/gist_id}","starred_url":"https://api.github.com/users/pnelsonmsft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnelsonmsft/subscriptions","organizations_url":"https://api.github.com/users/pnelsonmsft/orgs","repos_url":"https://api.github.com/users/pnelsonmsft/repos","events_url":"https://api.github.com/users/pnelsonmsft/events{/privacy}","received_events_url":"https://api.github.com/users/pnelsonmsft/received_events","type":"User","site_admin":false},"repo":{"id":31240896,"name":"roslyn","full_name":"pnelsonmsft/roslyn","owner":{"login":"pnelsonmsft","id":10980558,"avatar_url":"https://avatars.githubusercontent.com/u/10980558?v=3","gravatar_id":"","url":"https://api.github.com/users/pnelsonmsft","html_url":"https://github.com/pnelsonmsft","followers_url":"https://api.github.com/users/pnelsonmsft/followers","following_url":"https://api.github.com/users/pnelsonmsft/following{/other_user}","gists_url":"https://api.github.com/users/pnelsonmsft/gists{/gist_id}","starred_url":"https://api.github.com/users/pnelsonmsft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnelsonmsft/subscriptions","organizations_url":"https://api.github.com/users/pnelsonmsft/orgs","repos_url":"https://api.github.com/users/pnelsonmsft/repos","events_url":"https://api.github.com/users/pnelsonmsft/events{/privacy}","received_events_url":"https://api.github.com/users/pnelsonmsft/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pnelsonmsft/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/pnelsonmsft/roslyn","forks_url":"https://api.github.com/repos/pnelsonmsft/roslyn/forks","keys_url":"https://api.github.com/repos/pnelsonmsft/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pnelsonmsft/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pnelsonmsft/roslyn/teams","hooks_url":"https://api.github.com/repos/pnelsonmsft/roslyn/hooks","issue_events_url":"https://api.github.com/repos/pnelsonmsft/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/pnelsonmsft/roslyn/events","assignees_url":"https://api.github.com/repos/pnelsonmsft/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/pnelsonmsft/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/pnelsonmsft/roslyn/tags","blobs_url":"https://api.github.com/repos/pnelsonmsft/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pnelsonmsft/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pnelsonmsft/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/pnelsonmsft/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pnelsonmsft/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/pnelsonmsft/roslyn/languages","stargazers_url":"https://api.github.com/repos/pnelsonmsft/roslyn/stargazers","contributors_url":"https://api.github.com/repos/pnelsonmsft/roslyn/contributors","subscribers_url":"https://api.github.com/repos/pnelsonmsft/roslyn/subscribers","subscription_url":"https://api.github.com/repos/pnelsonmsft/roslyn/subscription","commits_url":"https://api.github.com/repos/pnelsonmsft/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/pnelsonmsft/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/pnelsonmsft/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/pnelsonmsft/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/pnelsonmsft/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/pnelsonmsft/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pnelsonmsft/roslyn/merges","archive_url":"https://api.github.com/repos/pnelsonmsft/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pnelsonmsft/roslyn/downloads","issues_url":"https://api.github.com/repos/pnelsonmsft/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/pnelsonmsft/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/pnelsonmsft/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/pnelsonmsft/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pnelsonmsft/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/pnelsonmsft/roslyn/releases{/id}","created_at":"2015-02-24T02:14:31Z","updated_at":"2015-02-24T02:14:59Z","pushed_at":"2015-03-06T23:39:39Z","git_url":"git://github.com/pnelsonmsft/roslyn.git","ssh_url":"git@github.com:pnelsonmsft/roslyn.git","clone_url":"https://github.com/pnelsonmsft/roslyn.git","svn_url":"https://github.com/pnelsonmsft/roslyn","homepage":"","size":53946,"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":"013ddf9c0ed25e7bb122383ad4b7efa2f3e8545e","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-03-06T23:59:29Z","pushed_at":"2015-03-06T23:59:29Z","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":80390,"stargazers_count":1405,"watchers_count":1405,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":283,"mirror_url":null,"open_issues_count":495,"forks":283,"open_issues":495,"watchers":1405,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/1111"},"html":{"href":"https://github.com/dotnet/roslyn/pull/1111"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/1111"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/1111/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/1111/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/1111/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/8031f9bc3dfcc54afb5f0d496035da4d23dd99cc"}}}}