{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Blazor/pulls/comments/201867301","pull_request_review_id":136454299,"id":201867301,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTg2NzMwMQ==","diff_hunk":"@@ -0,0 +1,54 @@\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;\n+using System.Threading.Tasks;\n+using Microsoft.AspNetCore.Blazor.Services;\n+using Microsoft.AspNetCore.SignalR;\n+using Microsoft.Extensions.DependencyInjection;\n+\n+namespace Microsoft.AspNetCore.Blazor.Server.Circuits\n+{\n+    internal class BlazorHub : Hub\n+    {\n+        private static readonly object CircuitKey = \"circuit\";\n+\n+        private readonly CircuitFactory _circuitFactory;\n+\n+        public BlazorHub(CircuitFactory circuitFactory)\n+        {\n+            _circuitFactory = circuitFactory ?? throw new ArgumentNullException(nameof(circuitFactory));\n+        }\n+\n+        public CircuitHost CircuitHost\n+        {\n+            get => (CircuitHost)Context.Items[CircuitKey];\n+            set => Context.Items[CircuitKey] = value;\n+        }\n+\n+        public override Task OnDisconnectedAsync(Exception exception)\n+        {\n+            CircuitHost.Dispose();\n+            return base.OnDisconnectedAsync(exception);\n+        }\n+\n+        public async Task StartCircuit(string uriAbsolute, string baseUriAbsolute)\n+        {\n+            var circuitHost = _circuitFactory.CreateCircuit(Context.GetHttpContext(), Clients.Caller);\n+\n+            var uriHelper = circuitHost.Services.GetRequiredService<IUriHelper>() as RemoteUriHelper;\n+            if (uriHelper != null)","path":"src/Microsoft.AspNetCore.Blazor.Server/Circuits/BlazorHub.cs","position":40,"original_position":40,"commit_id":"547802b5aa9970a525754d1897b773374f71337d","original_commit_id":"547802b5aa9970a525754d1897b773374f71337d","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},"body":"this check isn't for optionality, it's in case the UriHelper was replaced. I'm also ok with saying that's not supported and just making it a hard cast.\r\n\r\nOn `enableNavigationInterception` - I totally agree, that would simplify things.","created_at":"2018-07-11T23:10:29Z","updated_at":"2018-07-11T23:10:29Z","html_url":"https://github.com/aspnet/Blazor/pull/1116#discussion_r201867301","pull_request_url":"https://api.github.com/repos/aspnet/Blazor/pulls/1116","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Blazor/pulls/comments/201867301"},"html":{"href":"https://github.com/aspnet/Blazor/pull/1116#discussion_r201867301"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Blazor/pulls/1116"}},"in_reply_to_id":201673187},"pull_request":{"url":"https://api.github.com/repos/aspnet/Blazor/pulls/1116","id":200592684,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwNTkyNjg0","html_url":"https://github.com/aspnet/Blazor/pull/1116","diff_url":"https://github.com/aspnet/Blazor/pull/1116.diff","patch_url":"https://github.com/aspnet/Blazor/pull/1116.patch","issue_url":"https://api.github.com/repos/aspnet/Blazor/issues/1116","number":1116,"state":"open","locked":false,"title":"[WIP] Blazor on the server","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},"body":"Putting this out there for early feedback. \r\n\r\nThings are basically in the right places, and rendering and event handling works. I still have some issues to work out with how our client code deals with HTTP clients.\r\n\r\nI haven't made any serious attempts at error handling yet.","created_at":"2018-07-11T05:47:18Z","updated_at":"2018-07-11T23:10:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8796e60d30839e15c606335c021b67846c047283","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Blazor/pulls/1116/commits","review_comments_url":"https://api.github.com/repos/aspnet/Blazor/pulls/1116/comments","review_comment_url":"https://api.github.com/repos/aspnet/Blazor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/Blazor/issues/1116/comments","statuses_url":"https://api.github.com/repos/aspnet/Blazor/statuses/547802b5aa9970a525754d1897b773374f71337d","head":{"label":"aspnet:rynowak/hello-server","ref":"rynowak/hello-server","sha":"547802b5aa9970a525754d1897b773374f71337d","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":116160755,"node_id":"MDEwOlJlcG9zaXRvcnkxMTYxNjA3NTU=","name":"Blazor","full_name":"aspnet/Blazor","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},"private":false,"html_url":"https://github.com/aspnet/Blazor","description":"Blazor is an experimental .NET web framework using C#/Razor and HTML that runs in the browser with WebAssembly","fork":false,"url":"https://api.github.com/repos/aspnet/Blazor","forks_url":"https://api.github.com/repos/aspnet/Blazor/forks","keys_url":"https://api.github.com/repos/aspnet/Blazor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Blazor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Blazor/teams","hooks_url":"https://api.github.com/repos/aspnet/Blazor/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Blazor/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Blazor/events","assignees_url":"https://api.github.com/repos/aspnet/Blazor/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Blazor/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Blazor/tags","blobs_url":"https://api.github.com/repos/aspnet/Blazor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Blazor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Blazor/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Blazor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Blazor/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Blazor/languages","stargazers_url":"https://api.github.com/repos/aspnet/Blazor/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Blazor/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Blazor/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Blazor/subscription","commits_url":"https://api.github.com/repos/aspnet/Blazor/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Blazor/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Blazor/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Blazor/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Blazor/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Blazor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Blazor/merges","archive_url":"https://api.github.com/repos/aspnet/Blazor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Blazor/downloads","issues_url":"https://api.github.com/repos/aspnet/Blazor/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Blazor/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Blazor/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Blazor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Blazor/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Blazor/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/Blazor/deployments","created_at":"2018-01-03T16:53:27Z","updated_at":"2018-07-11T21:42:49Z","pushed_at":"2018-07-11T05:47:19Z","git_url":"git://github.com/aspnet/Blazor.git","ssh_url":"git@github.com:aspnet/Blazor.git","clone_url":"https://github.com/aspnet/Blazor.git","svn_url":"https://github.com/aspnet/Blazor","homepage":"https://blazor.net/","size":146406,"stargazers_count":5712,"watchers_count":5712,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":485,"mirror_url":null,"archived":false,"open_issues_count":143,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":485,"open_issues":143,"watchers":5712,"default_branch":"master"}},"base":{"label":"aspnet:master","ref":"master","sha":"49f5e104254a5872aed2b7b23150c30123d3c0d1","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":116160755,"node_id":"MDEwOlJlcG9zaXRvcnkxMTYxNjA3NTU=","name":"Blazor","full_name":"aspnet/Blazor","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},"private":false,"html_url":"https://github.com/aspnet/Blazor","description":"Blazor is an experimental .NET web framework using C#/Razor and HTML that runs in the browser with WebAssembly","fork":false,"url":"https://api.github.com/repos/aspnet/Blazor","forks_url":"https://api.github.com/repos/aspnet/Blazor/forks","keys_url":"https://api.github.com/repos/aspnet/Blazor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Blazor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Blazor/teams","hooks_url":"https://api.github.com/repos/aspnet/Blazor/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Blazor/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Blazor/events","assignees_url":"https://api.github.com/repos/aspnet/Blazor/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Blazor/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Blazor/tags","blobs_url":"https://api.github.com/repos/aspnet/Blazor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Blazor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Blazor/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Blazor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Blazor/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Blazor/languages","stargazers_url":"https://api.github.com/repos/aspnet/Blazor/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Blazor/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Blazor/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Blazor/subscription","commits_url":"https://api.github.com/repos/aspnet/Blazor/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Blazor/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Blazor/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Blazor/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Blazor/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Blazor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Blazor/merges","archive_url":"https://api.github.com/repos/aspnet/Blazor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Blazor/downloads","issues_url":"https://api.github.com/repos/aspnet/Blazor/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Blazor/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Blazor/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Blazor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Blazor/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Blazor/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/Blazor/deployments","created_at":"2018-01-03T16:53:27Z","updated_at":"2018-07-11T21:42:49Z","pushed_at":"2018-07-11T05:47:19Z","git_url":"git://github.com/aspnet/Blazor.git","ssh_url":"git@github.com:aspnet/Blazor.git","clone_url":"https://github.com/aspnet/Blazor.git","svn_url":"https://github.com/aspnet/Blazor","homepage":"https://blazor.net/","size":146406,"stargazers_count":5712,"watchers_count":5712,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":485,"mirror_url":null,"archived":false,"open_issues_count":143,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":485,"open_issues":143,"watchers":5712,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Blazor/pulls/1116"},"html":{"href":"https://github.com/aspnet/Blazor/pull/1116"},"issue":{"href":"https://api.github.com/repos/aspnet/Blazor/issues/1116"},"comments":{"href":"https://api.github.com/repos/aspnet/Blazor/issues/1116/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Blazor/pulls/1116/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Blazor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Blazor/pulls/1116/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Blazor/statuses/547802b5aa9970a525754d1897b773374f71337d"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"rynowak"}}