{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Routing/issues/633","repository_url":"https://api.github.com/repos/aspnet/Routing","labels_url":"https://api.github.com/repos/aspnet/Routing/issues/633/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Routing/issues/633/comments","events_url":"https://api.github.com/repos/aspnet/Routing/issues/633/events","html_url":"https://github.com/aspnet/Routing/issues/633","id":342523588,"node_id":"MDU6SXNzdWUzNDI1MjM1ODg=","number":633,"title":"Show list of registered endpoints as debugger display string","user":{"login":"kichalla","id":6559784,"node_id":"MDQ6VXNlcjY1NTk3ODQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6559784?v=4","gravatar_id":"","url":"https://api.github.com/users/kichalla","html_url":"https://github.com/kichalla","followers_url":"https://api.github.com/users/kichalla/followers","following_url":"https://api.github.com/users/kichalla/following{/other_user}","gists_url":"https://api.github.com/users/kichalla/gists{/gist_id}","starred_url":"https://api.github.com/users/kichalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kichalla/subscriptions","organizations_url":"https://api.github.com/users/kichalla/orgs","repos_url":"https://api.github.com/users/kichalla/repos","events_url":"https://api.github.com/users/kichalla/events{/privacy}","received_events_url":"https://api.github.com/users/kichalla/received_events","type":"User","site_admin":false},"labels":[{"id":93052338,"node_id":"MDU6TGFiZWw5MzA1MjMzOA==","url":"https://api.github.com/repos/aspnet/Routing/labels/1%20-%20Ready","name":"1 - Ready","color":"CCCCCC","default":false},{"id":905220122,"node_id":"MDU6TGFiZWw5MDUyMjAxMjI=","url":"https://api.github.com/repos/aspnet/Routing/labels/PRI:%203%20-%20Optional","name":"PRI: 3 - Optional","color":"c5c4fd","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/aspnet/Routing/milestones/31","html_url":"https://github.com/aspnet/Routing/milestone/31","labels_url":"https://api.github.com/repos/aspnet/Routing/milestones/31/labels","id":3500455,"node_id":"MDk6TWlsZXN0b25lMzUwMDQ1NQ==","number":31,"title":"2.2.0-preview2","description":null,"creator":{"login":"mkArtakMSFT","id":34246760,"node_id":"MDQ6VXNlcjM0MjQ2NzYw","avatar_url":"https://avatars3.githubusercontent.com/u/34246760?v=4","gravatar_id":"","url":"https://api.github.com/users/mkArtakMSFT","html_url":"https://github.com/mkArtakMSFT","followers_url":"https://api.github.com/users/mkArtakMSFT/followers","following_url":"https://api.github.com/users/mkArtakMSFT/following{/other_user}","gists_url":"https://api.github.com/users/mkArtakMSFT/gists{/gist_id}","starred_url":"https://api.github.com/users/mkArtakMSFT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkArtakMSFT/subscriptions","organizations_url":"https://api.github.com/users/mkArtakMSFT/orgs","repos_url":"https://api.github.com/users/mkArtakMSFT/repos","events_url":"https://api.github.com/users/mkArtakMSFT/events{/privacy}","received_events_url":"https://api.github.com/users/mkArtakMSFT/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2018-07-16T17:12:41Z","updated_at":"2018-07-18T23:13:52Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2018-07-18T23:13:52Z","updated_at":"2018-07-19T03:31:31Z","closed_at":null,"author_association":"MEMBER","body":"While debugging through MVC's functional test failures, it helped me to look at how MVC's data source registered endpoints. I used following blob of code to look at them. Would be helpful if we can show this via `DebuggerDisplayString` mechanism\r\n\r\n```c#\r\nvar sb = new StringBuilder();\r\n            foreach (var endpoint in _endpointDataSource.Endpoints)\r\n            {\r\n                if (endpoint is MatcherEndpoint matcherEndpoint)\r\n                {\r\n                    var template = string.IsNullOrEmpty(matcherEndpoint.Template) ? \"\\\"\\\"\" : matcherEndpoint.Template;\r\n                    var s = template + \", \"\r\n                        + \"Required Values: new { \" + string.Join(\", \", matcherEndpoint.RequiredValues.Select(kvp => $\"{kvp.Key} = \\\"{kvp.Value ?? \"null\"}\\\"\")) + \" }, \"\r\n                        + \"Order:\" + matcherEndpoint.Order;\r\n\r\n                    sb.Append(s);\r\n\r\n                    var endpointConstraintMetadata = matcherEndpoint.Metadata.GetOrderedMetadata<IEndpointConstraintMetadata>();\r\n                    foreach (var constraint in endpointConstraintMetadata)\r\n                    {\r\n                        if (constraint is HttpMethodEndpointConstraint httpMethodEndpointConstraint)\r\n                        {\r\n                            sb.Append(\", constriants: \" + string.Join(',', httpMethodEndpointConstraint.HttpMethods)\r\n                                + \", constraint order:\" + httpMethodEndpointConstraint.Order);\r\n                        }\r\n                    }\r\n\r\n                    sb.AppendLine();\r\n                    sb.AppendLine();\r\n                }\r\n                else\r\n                {\r\n                    sb.AppendLine(\"Non-matcherendpoint. DisplayName:\" + endpoint.DisplayName);\r\n                }\r\n            }\r\n            return Content(sb.ToString());\r\n```"},"comment":{"url":"https://api.github.com/repos/aspnet/Routing/issues/comments/406143660","html_url":"https://github.com/aspnet/Routing/issues/633#issuecomment-406143660","issue_url":"https://api.github.com/repos/aspnet/Routing/issues/633","id":406143660,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjE0MzY2MA==","user":{"login":"rynowak","id":1430011,"node_id":"MDQ6VXNlcjE0MzAwMTE=","avatar_url":"https://avatars1.githubusercontent.com/u/1430011?v=4","gravatar_id":"","url":"https://api.github.com/users/rynowak","html_url":"https://github.com/rynowak","followers_url":"https://api.github.com/users/rynowak/followers","following_url":"https://api.github.com/users/rynowak/following{/other_user}","gists_url":"https://api.github.com/users/rynowak/gists{/gist_id}","starred_url":"https://api.github.com/users/rynowak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rynowak/subscriptions","organizations_url":"https://api.github.com/users/rynowak/orgs","repos_url":"https://api.github.com/users/rynowak/repos","events_url":"https://api.github.com/users/rynowak/events{/privacy}","received_events_url":"https://api.github.com/users/rynowak/received_events","type":"User","site_admin":false},"created_at":"2018-07-19T03:31:31Z","updated_at":"2018-07-19T03:31:31Z","author_association":"MEMBER","body":"Sure, feel free. This will take like 5 mins and make us much more productive.\r\n"}}
{"actor":{"display_login":"rynowak"}}