{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Extensions/pulls/comments/234703728","pull_request_review_id":176400269,"id":234703728,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDcwMzcyOA==","diff_hunk":"@@ -0,0 +1,142 @@\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.Text;\n+using Microsoft.Extensions.DependencyInjection.ServiceLookup;\n+\n+namespace Microsoft.Extensions.DependencyInjection\n+{\n+    internal class CallSiteFormatter: CallSiteVisitor<CallSiteFormatter.CallSiteFormatterContext, object>\n+    {\n+        internal static CallSiteFormatter Instance = new CallSiteFormatter();\n+\n+        private CallSiteFormatter()\n+        {\n+        }\n+\n+        public string Format(ServiceCallSite callSite)\n+        {\n+            var stringBuilder = new StringBuilder();\n+\n+            VisitCallSite(callSite, new CallSiteFormatterContext(stringBuilder, 0));\n+\n+            return stringBuilder.ToString();\n+        }\n+\n+        protected override object VisitConstructor(ConstructorCallSite constructorCallSite, CallSiteFormatterContext argument)\n+        {\n+            argument.ContinueLine(\"new {0}\", constructorCallSite.ImplementationType);\n+\n+            var newContext = argument.IncrementOffset();\n+            foreach (var parameter in constructorCallSite.ParameterCallSites)\n+            {\n+                VisitCallSite(parameter, newContext);\n+            }\n+\n+            return null;\n+        }\n+\n+        protected override object VisitConstant(ConstantCallSite constantCallSite, CallSiteFormatterContext argument)\n+        {\n+            argument.ContinueLine(\"{0}\", constantCallSite.DefaultValue ?? \"<null>\");\n+\n+            return null;\n+        }\n+\n+        protected override object VisitServiceProvider(ServiceProviderCallSite serviceProviderCallSite, CallSiteFormatterContext argument)\n+        {\n+            argument.ContinueLine(\"<ServiceProvider>\");\n+\n+            return null;\n+        }\n+\n+        protected override object VisitServiceScopeFactory(ServiceScopeFactoryCallSite serviceScopeFactoryCallSite, CallSiteFormatterContext argument)\n+        {\n+            argument.ContinueLine(\"<ScopeFactory>\");\n+\n+            return null;\n+        }\n+\n+        protected override object VisitIEnumerable(IEnumerableCallSite enumerableCallSite, CallSiteFormatterContext argument)\n+        {\n+            argument.ContinueLine(\"IEnumerable<{0}> (size {1})\", enumerableCallSite.ItemType, enumerableCallSite.ServiceCallSites.Length);\n+\n+            var newContext = argument.IncrementOffset();\n+            foreach (var item in enumerableCallSite.ServiceCallSites)\n+            {\n+                VisitCallSite(item, newContext);\n+            }\n+\n+            return null;\n+        }\n+\n+        protected override object VisitFactory(FactoryCallSite factoryCallSite, CallSiteFormatterContext argument)\n+        {\n+            argument.ContinueLine(\"Factory ({0})\", factoryCallSite.Factory.Method);\n+\n+            return null;\n+        }\n+\n+        protected override object VisitDisposeCache(ServiceCallSite callSite, CallSiteFormatterContext argument)\n+        {\n+            argument.StartLine(\"DisposeCache \");","path":"src/DependencyInjection/DI/src/CallSiteFormatter.cs","position":82,"original_position":82,"commit_id":"e34fff75eb665c3bf1bf1adf7a7426512aee7808","original_commit_id":"e34fff75eb665c3bf1bf1adf7a7426512aee7808","user":{"login":"anurse","id":7574,"node_id":"MDQ6VXNlcjc1NzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/7574?v=4","gravatar_id":"","url":"https://api.github.com/users/anurse","html_url":"https://github.com/anurse","followers_url":"https://api.github.com/users/anurse/followers","following_url":"https://api.github.com/users/anurse/following{/other_user}","gists_url":"https://api.github.com/users/anurse/gists{/gist_id}","starred_url":"https://api.github.com/users/anurse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anurse/subscriptions","organizations_url":"https://api.github.com/users/anurse/orgs","repos_url":"https://api.github.com/users/anurse/repos","events_url":"https://api.github.com/users/anurse/events{/privacy}","received_events_url":"https://api.github.com/users/anurse/received_events","type":"User","site_admin":false},"body":"Might be clearer if these were something like `[DisposeCache] `","created_at":"2018-11-19T17:06:25Z","updated_at":"2018-11-19T17:13:20Z","html_url":"https://github.com/aspnet/Extensions/pull/534#discussion_r234703728","pull_request_url":"https://api.github.com/repos/aspnet/Extensions/pulls/534","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Extensions/pulls/comments/234703728"},"html":{"href":"https://github.com/aspnet/Extensions/pull/534#discussion_r234703728"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Extensions/pulls/534"}},"in_reply_to_id":234703267},"pull_request":{"url":"https://api.github.com/repos/aspnet/Extensions/pulls/534","id":231654138,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxNjU0MTM4","html_url":"https://github.com/aspnet/Extensions/pull/534","diff_url":"https://github.com/aspnet/Extensions/pull/534.diff","patch_url":"https://github.com/aspnet/Extensions/pull/534.patch","issue_url":"https://api.github.com/repos/aspnet/Extensions/issues/534","number":534,"state":"open","locked":false,"title":"Add DependencyInjection event source","user":{"login":"pakrym","id":1697911,"node_id":"MDQ6VXNlcjE2OTc5MTE=","avatar_url":"https://avatars0.githubusercontent.com/u/1697911?v=4","gravatar_id":"","url":"https://api.github.com/users/pakrym","html_url":"https://github.com/pakrym","followers_url":"https://api.github.com/users/pakrym/followers","following_url":"https://api.github.com/users/pakrym/following{/other_user}","gists_url":"https://api.github.com/users/pakrym/gists{/gist_id}","starred_url":"https://api.github.com/users/pakrym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pakrym/subscriptions","organizations_url":"https://api.github.com/users/pakrym/orgs","repos_url":"https://api.github.com/users/pakrym/repos","events_url":"https://api.github.com/users/pakrym/events{/privacy}","received_events_url":"https://api.github.com/users/pakrym/received_events","type":"User","site_admin":false},"body":"With one event that dumps call site trees that are being created","created_at":"2018-11-16T21:00:50Z","updated_at":"2018-11-19T17:13:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5919ce6bb1cbfc5f82d279995b3b4336924e4b53","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Extensions/pulls/534/commits","review_comments_url":"https://api.github.com/repos/aspnet/Extensions/pulls/534/comments","review_comment_url":"https://api.github.com/repos/aspnet/Extensions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/Extensions/issues/534/comments","statuses_url":"https://api.github.com/repos/aspnet/Extensions/statuses/e34fff75eb665c3bf1bf1adf7a7426512aee7808","head":{"label":"aspnet:pakrym/add-event-source","ref":"pakrym/add-event-source","sha":"e34fff75eb665c3bf1bf1adf7a7426512aee7808","user":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","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":30932325,"node_id":"MDEwOlJlcG9zaXRvcnkzMDkzMjMyNQ==","name":"Extensions","full_name":"aspnet/Extensions","private":false,"owner":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","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},"html_url":"https://github.com/aspnet/Extensions","description":".NET APIs for commonly used programming patterns and utilities, such as dependency injection, logging, and configuration. ","fork":false,"url":"https://api.github.com/repos/aspnet/Extensions","forks_url":"https://api.github.com/repos/aspnet/Extensions/forks","keys_url":"https://api.github.com/repos/aspnet/Extensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Extensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Extensions/teams","hooks_url":"https://api.github.com/repos/aspnet/Extensions/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Extensions/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Extensions/events","assignees_url":"https://api.github.com/repos/aspnet/Extensions/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Extensions/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Extensions/tags","blobs_url":"https://api.github.com/repos/aspnet/Extensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Extensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Extensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Extensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Extensions/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Extensions/languages","stargazers_url":"https://api.github.com/repos/aspnet/Extensions/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Extensions/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Extensions/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Extensions/subscription","commits_url":"https://api.github.com/repos/aspnet/Extensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Extensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Extensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Extensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Extensions/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Extensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Extensions/merges","archive_url":"https://api.github.com/repos/aspnet/Extensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Extensions/downloads","issues_url":"https://api.github.com/repos/aspnet/Extensions/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Extensions/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Extensions/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Extensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Extensions/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Extensions/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/Extensions/deployments","created_at":"2015-02-17T19:02:08Z","updated_at":"2018-11-19T13:37:34Z","pushed_at":"2018-11-18T15:06:44Z","git_url":"git://github.com/aspnet/Extensions.git","ssh_url":"git@github.com:aspnet/Extensions.git","clone_url":"https://github.com/aspnet/Extensions.git","svn_url":"https://github.com/aspnet/Extensions","homepage":"","size":12834,"stargazers_count":209,"watchers_count":209,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":76,"mirror_url":null,"archived":false,"open_issues_count":50,"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":76,"open_issues":50,"watchers":209,"default_branch":"master"}},"base":{"label":"aspnet:master","ref":"master","sha":"4f0e2eb7f49d57b9e814b8235809daaf5309b0d6","user":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","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":30932325,"node_id":"MDEwOlJlcG9zaXRvcnkzMDkzMjMyNQ==","name":"Extensions","full_name":"aspnet/Extensions","private":false,"owner":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","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},"html_url":"https://github.com/aspnet/Extensions","description":".NET APIs for commonly used programming patterns and utilities, such as dependency injection, logging, and configuration. ","fork":false,"url":"https://api.github.com/repos/aspnet/Extensions","forks_url":"https://api.github.com/repos/aspnet/Extensions/forks","keys_url":"https://api.github.com/repos/aspnet/Extensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Extensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Extensions/teams","hooks_url":"https://api.github.com/repos/aspnet/Extensions/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Extensions/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Extensions/events","assignees_url":"https://api.github.com/repos/aspnet/Extensions/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Extensions/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Extensions/tags","blobs_url":"https://api.github.com/repos/aspnet/Extensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Extensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Extensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Extensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Extensions/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Extensions/languages","stargazers_url":"https://api.github.com/repos/aspnet/Extensions/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Extensions/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Extensions/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Extensions/subscription","commits_url":"https://api.github.com/repos/aspnet/Extensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Extensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Extensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Extensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Extensions/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Extensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Extensions/merges","archive_url":"https://api.github.com/repos/aspnet/Extensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Extensions/downloads","issues_url":"https://api.github.com/repos/aspnet/Extensions/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Extensions/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Extensions/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Extensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Extensions/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Extensions/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/Extensions/deployments","created_at":"2015-02-17T19:02:08Z","updated_at":"2018-11-19T13:37:34Z","pushed_at":"2018-11-18T15:06:44Z","git_url":"git://github.com/aspnet/Extensions.git","ssh_url":"git@github.com:aspnet/Extensions.git","clone_url":"https://github.com/aspnet/Extensions.git","svn_url":"https://github.com/aspnet/Extensions","homepage":"","size":12834,"stargazers_count":209,"watchers_count":209,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":76,"mirror_url":null,"archived":false,"open_issues_count":50,"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":76,"open_issues":50,"watchers":209,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Extensions/pulls/534"},"html":{"href":"https://github.com/aspnet/Extensions/pull/534"},"issue":{"href":"https://api.github.com/repos/aspnet/Extensions/issues/534"},"comments":{"href":"https://api.github.com/repos/aspnet/Extensions/issues/534/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Extensions/pulls/534/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Extensions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Extensions/pulls/534/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Extensions/statuses/e34fff75eb665c3bf1bf1adf7a7426512aee7808"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"anurse"}}