{"action":"created","comment":{"url":"https://api.github.com/repos/castleproject/Windsor/pulls/comments/194503601","pull_request_review_id":127688546,"id":194503601,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDUwMzYwMQ==","diff_hunk":"@@ -0,0 +1,47 @@\n+﻿// Copyright 2004-2018 Castle Project - http://www.castleproject.org/\n+// \n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+// \n+//     http://www.apache.org/licenses/LICENSE-2.0\n+// \n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+namespace Castle.Facilities.AspNetCore.Activators\n+{\n+\tusing System.Collections.Generic;\n+\tusing System.Linq;\n+\n+\tusing Castle.Core;\n+\tusing Castle.MicroKernel;\n+\tusing Castle.MicroKernel.ComponentActivator;\n+\tusing Castle.MicroKernel.LifecycleConcerns;\n+\n+\tpublic class CrossWiredComponentActivator : DefaultComponentActivator\n+\t{\n+\t\tpublic CrossWiredComponentActivator(ComponentModel model, IKernelInternal kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction) : base(model, kernel, onCreation, onDestruction)\n+\t\t{\n+\t\t}\n+\n+\t\t/// <summary>\n+\t\t/// We are overriding disposables to not be tracked, this is because cross-wired components are tracked by implicit scopes that call dispose from ServiceProviders. \n+\t\t/// </summary>\n+\t\t/// <param name=\"steps\">All decomission concerns are fine except DisposalConcern</param>\n+\t\t/// <param name=\"instance\">The cross wired instance</param>\n+\t\tprotected override void ApplyConcerns(IEnumerable<IDecommissionConcern> steps, object instance)\n+\t\t{\n+\t\t\tif (Model.LifestyleType == LifestyleType.Scoped || Model.LifestyleType == LifestyleType.Singleton)\n+\t\t\t{\n+\t\t\t\tforeach (var concern in steps.Where(x => x.GetType() != typeof(DisposalConcern)))\n+\t\t\t\t{\n+\t\t\t\t\tconcern.Apply(Model, instance);","path":"src/Castle.Facilities.AspNetCore/Activators/CrossWiredComponentActivator.cs","position":42,"original_position":42,"commit_id":"2ede67b8752f98ccf3d111a305baee1ef2ce3dc2","original_commit_id":"1e7985d8fb752b6d9c3dbf7e7180c09a44d90a5a","user":{"login":"fir3pho3nixx","id":607402,"node_id":"MDQ6VXNlcjYwNzQwMg==","avatar_url":"https://avatars2.githubusercontent.com/u/607402?v=4","gravatar_id":"","url":"https://api.github.com/users/fir3pho3nixx","html_url":"https://github.com/fir3pho3nixx","followers_url":"https://api.github.com/users/fir3pho3nixx/followers","following_url":"https://api.github.com/users/fir3pho3nixx/following{/other_user}","gists_url":"https://api.github.com/users/fir3pho3nixx/gists{/gist_id}","starred_url":"https://api.github.com/users/fir3pho3nixx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fir3pho3nixx/subscriptions","organizations_url":"https://api.github.com/users/fir3pho3nixx/orgs","repos_url":"https://api.github.com/users/fir3pho3nixx/repos","events_url":"https://api.github.com/users/fir3pho3nixx/events{/privacy}","received_events_url":"https://api.github.com/users/fir3pho3nixx/received_events","type":"User","site_admin":false},"body":"Thanks @jonorossi. I still believe we need to support typed factories but I know from our issue tracker that comes with even longer tail. \r\n\r\nAs long as we know what the problems are before we release I am good. \r\n\r\nAside, we had our first use case for a cross wire today and I dropped this PR in and it just worked! Very happy with the current state of this.","created_at":"2018-06-11T18:33:17Z","updated_at":"2018-06-11T18:33:18Z","html_url":"https://github.com/castleproject/Windsor/pull/394#discussion_r194503601","pull_request_url":"https://api.github.com/repos/castleproject/Windsor/pulls/394","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/castleproject/Windsor/pulls/comments/194503601"},"html":{"href":"https://github.com/castleproject/Windsor/pull/394#discussion_r194503601"},"pull_request":{"href":"https://api.github.com/repos/castleproject/Windsor/pulls/394"}},"in_reply_to_id":193440543},"pull_request":{"url":"https://api.github.com/repos/castleproject/Windsor/pulls/394","id":181711899,"node_id":"MDExOlB1bGxSZXF1ZXN0MTgxNzExODk5","html_url":"https://github.com/castleproject/Windsor/pull/394","diff_url":"https://github.com/castleproject/Windsor/pull/394.diff","patch_url":"https://github.com/castleproject/Windsor/pull/394.patch","issue_url":"https://api.github.com/repos/castleproject/Windsor/issues/394","number":394,"state":"open","locked":false,"title":"ASP.NET Core Facility (now NOT production ready)","user":{"login":"fir3pho3nixx","id":607402,"node_id":"MDQ6VXNlcjYwNzQwMg==","avatar_url":"https://avatars2.githubusercontent.com/u/607402?v=4","gravatar_id":"","url":"https://api.github.com/users/fir3pho3nixx","html_url":"https://github.com/fir3pho3nixx","followers_url":"https://api.github.com/users/fir3pho3nixx/followers","following_url":"https://api.github.com/users/fir3pho3nixx/following{/other_user}","gists_url":"https://api.github.com/users/fir3pho3nixx/gists{/gist_id}","starred_url":"https://api.github.com/users/fir3pho3nixx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fir3pho3nixx/subscriptions","organizations_url":"https://api.github.com/users/fir3pho3nixx/orgs","repos_url":"https://api.github.com/users/fir3pho3nixx/repos","events_url":"https://api.github.com/users/fir3pho3nixx/events{/privacy}","received_events_url":"https://api.github.com/users/fir3pho3nixx/received_events","type":"User","site_admin":false},"body":"This is the final PR for the ASP.NET Core Facility. The previous design did not support the @Inject Razor directive. The problem was a difficult one of timing registrations in the right places and introducing the notion of `Cross Wiring`. \r\n\r\n`Cross wiring` is provided as an extension method to component registration which create's late bound registrations in the IServiceCollection(which are basically factories) that are backed on to a Windsor Container.Resolve. This removes the burden of Castle Windsor users of having to maintain 2 sets of registration logic and moves them toward the Windsor registration API. It also makes things like the @Inject Razor directive work. \r\n\r\n@generik0 and I also checked to make sure that we have fixed all the problems with generics, I think there was a gremlin in the previous implementation. It got magically fixed when I re-wrote the generic implementation with additional unit tests.\r\n\r\nThis code has also endured a significant bashing to make sure it does not have any memory leaks by using the performance tests in this [repo](https://github.com/fir3pho3nixx/Windsor.AspNetCore). I am satisfied that for scoped lifestyles(Controller, ViewComponents, TagHelpers and cross wired @Inject consumers in the view) there are no memory leaks(roughly 300MB foot print) and it serves 250+ requests/second. This is great for anyone using this in docker.\r\n\r\nWe need to start thinking about releasing V5. @jonorossi did you have a timescale in mind?","created_at":"2018-04-15T18:00:11Z","updated_at":"2018-06-11T18:33:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"24365b19f3686c2ec89b457d47b328265919106d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/castleproject/Windsor/pulls/394/commits","review_comments_url":"https://api.github.com/repos/castleproject/Windsor/pulls/394/comments","review_comment_url":"https://api.github.com/repos/castleproject/Windsor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/castleproject/Windsor/issues/394/comments","statuses_url":"https://api.github.com/repos/castleproject/Windsor/statuses/2ede67b8752f98ccf3d111a305baee1ef2ce3dc2","head":{"label":"fir3pho3nixx:aspnet-core-windsor-final","ref":"aspnet-core-windsor-final","sha":"2ede67b8752f98ccf3d111a305baee1ef2ce3dc2","user":{"login":"fir3pho3nixx","id":607402,"node_id":"MDQ6VXNlcjYwNzQwMg==","avatar_url":"https://avatars2.githubusercontent.com/u/607402?v=4","gravatar_id":"","url":"https://api.github.com/users/fir3pho3nixx","html_url":"https://github.com/fir3pho3nixx","followers_url":"https://api.github.com/users/fir3pho3nixx/followers","following_url":"https://api.github.com/users/fir3pho3nixx/following{/other_user}","gists_url":"https://api.github.com/users/fir3pho3nixx/gists{/gist_id}","starred_url":"https://api.github.com/users/fir3pho3nixx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fir3pho3nixx/subscriptions","organizations_url":"https://api.github.com/users/fir3pho3nixx/orgs","repos_url":"https://api.github.com/users/fir3pho3nixx/repos","events_url":"https://api.github.com/users/fir3pho3nixx/events{/privacy}","received_events_url":"https://api.github.com/users/fir3pho3nixx/received_events","type":"User","site_admin":false},"repo":{"id":94809190,"node_id":"MDEwOlJlcG9zaXRvcnk5NDgwOTE5MA==","name":"Windsor","full_name":"fir3pho3nixx/Windsor","owner":{"login":"fir3pho3nixx","id":607402,"node_id":"MDQ6VXNlcjYwNzQwMg==","avatar_url":"https://avatars2.githubusercontent.com/u/607402?v=4","gravatar_id":"","url":"https://api.github.com/users/fir3pho3nixx","html_url":"https://github.com/fir3pho3nixx","followers_url":"https://api.github.com/users/fir3pho3nixx/followers","following_url":"https://api.github.com/users/fir3pho3nixx/following{/other_user}","gists_url":"https://api.github.com/users/fir3pho3nixx/gists{/gist_id}","starred_url":"https://api.github.com/users/fir3pho3nixx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fir3pho3nixx/subscriptions","organizations_url":"https://api.github.com/users/fir3pho3nixx/orgs","repos_url":"https://api.github.com/users/fir3pho3nixx/repos","events_url":"https://api.github.com/users/fir3pho3nixx/events{/privacy}","received_events_url":"https://api.github.com/users/fir3pho3nixx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fir3pho3nixx/Windsor","description":"Castle Windsor is a best of breed, mature Inversion of Control container available for .NET","fork":true,"url":"https://api.github.com/repos/fir3pho3nixx/Windsor","forks_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/forks","keys_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/teams","hooks_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/hooks","issue_events_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/issues/events{/number}","events_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/events","assignees_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/assignees{/user}","branches_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/branches{/branch}","tags_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/tags","blobs_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/git/refs{/sha}","trees_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/statuses/{sha}","languages_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/languages","stargazers_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/stargazers","contributors_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/contributors","subscribers_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/subscribers","subscription_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/subscription","commits_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/commits{/sha}","git_commits_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/git/commits{/sha}","comments_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/comments{/number}","issue_comment_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/issues/comments{/number}","contents_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/contents/{+path}","compare_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/merges","archive_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/downloads","issues_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/issues{/number}","pulls_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/pulls{/number}","milestones_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/milestones{/number}","notifications_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/labels{/name}","releases_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/releases{/id}","deployments_url":"https://api.github.com/repos/fir3pho3nixx/Windsor/deployments","created_at":"2017-06-19T18:39:16Z","updated_at":"2018-06-07T19:44:14Z","pushed_at":"2018-06-10T19:30:23Z","git_url":"git://github.com/fir3pho3nixx/Windsor.git","ssh_url":"git@github.com:fir3pho3nixx/Windsor.git","clone_url":"https://github.com/fir3pho3nixx/Windsor.git","svn_url":"https://github.com/fir3pho3nixx/Windsor","homepage":"http://www.castleproject.org/","size":104139,"stargazers_count":1,"watchers_count":1,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":5,"watchers":1,"default_branch":"master"}},"base":{"label":"castleproject:master","ref":"master","sha":"21f3712fc78aeb420fdd26eb0fbd8d0658947144","user":{"login":"castleproject","id":124839,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDgzOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/124839?v=4","gravatar_id":"","url":"https://api.github.com/users/castleproject","html_url":"https://github.com/castleproject","followers_url":"https://api.github.com/users/castleproject/followers","following_url":"https://api.github.com/users/castleproject/following{/other_user}","gists_url":"https://api.github.com/users/castleproject/gists{/gist_id}","starred_url":"https://api.github.com/users/castleproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/castleproject/subscriptions","organizations_url":"https://api.github.com/users/castleproject/orgs","repos_url":"https://api.github.com/users/castleproject/repos","events_url":"https://api.github.com/users/castleproject/events{/privacy}","received_events_url":"https://api.github.com/users/castleproject/received_events","type":"Organization","site_admin":false},"repo":{"id":2629717,"node_id":"MDEwOlJlcG9zaXRvcnkyNjI5NzE3","name":"Windsor","full_name":"castleproject/Windsor","owner":{"login":"castleproject","id":124839,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDgzOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/124839?v=4","gravatar_id":"","url":"https://api.github.com/users/castleproject","html_url":"https://github.com/castleproject","followers_url":"https://api.github.com/users/castleproject/followers","following_url":"https://api.github.com/users/castleproject/following{/other_user}","gists_url":"https://api.github.com/users/castleproject/gists{/gist_id}","starred_url":"https://api.github.com/users/castleproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/castleproject/subscriptions","organizations_url":"https://api.github.com/users/castleproject/orgs","repos_url":"https://api.github.com/users/castleproject/repos","events_url":"https://api.github.com/users/castleproject/events{/privacy}","received_events_url":"https://api.github.com/users/castleproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/castleproject/Windsor","description":"Castle Windsor is a best of breed, mature Inversion of Control container available for .NET","fork":false,"url":"https://api.github.com/repos/castleproject/Windsor","forks_url":"https://api.github.com/repos/castleproject/Windsor/forks","keys_url":"https://api.github.com/repos/castleproject/Windsor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/castleproject/Windsor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/castleproject/Windsor/teams","hooks_url":"https://api.github.com/repos/castleproject/Windsor/hooks","issue_events_url":"https://api.github.com/repos/castleproject/Windsor/issues/events{/number}","events_url":"https://api.github.com/repos/castleproject/Windsor/events","assignees_url":"https://api.github.com/repos/castleproject/Windsor/assignees{/user}","branches_url":"https://api.github.com/repos/castleproject/Windsor/branches{/branch}","tags_url":"https://api.github.com/repos/castleproject/Windsor/tags","blobs_url":"https://api.github.com/repos/castleproject/Windsor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/castleproject/Windsor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/castleproject/Windsor/git/refs{/sha}","trees_url":"https://api.github.com/repos/castleproject/Windsor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/castleproject/Windsor/statuses/{sha}","languages_url":"https://api.github.com/repos/castleproject/Windsor/languages","stargazers_url":"https://api.github.com/repos/castleproject/Windsor/stargazers","contributors_url":"https://api.github.com/repos/castleproject/Windsor/contributors","subscribers_url":"https://api.github.com/repos/castleproject/Windsor/subscribers","subscription_url":"https://api.github.com/repos/castleproject/Windsor/subscription","commits_url":"https://api.github.com/repos/castleproject/Windsor/commits{/sha}","git_commits_url":"https://api.github.com/repos/castleproject/Windsor/git/commits{/sha}","comments_url":"https://api.github.com/repos/castleproject/Windsor/comments{/number}","issue_comment_url":"https://api.github.com/repos/castleproject/Windsor/issues/comments{/number}","contents_url":"https://api.github.com/repos/castleproject/Windsor/contents/{+path}","compare_url":"https://api.github.com/repos/castleproject/Windsor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/castleproject/Windsor/merges","archive_url":"https://api.github.com/repos/castleproject/Windsor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/castleproject/Windsor/downloads","issues_url":"https://api.github.com/repos/castleproject/Windsor/issues{/number}","pulls_url":"https://api.github.com/repos/castleproject/Windsor/pulls{/number}","milestones_url":"https://api.github.com/repos/castleproject/Windsor/milestones{/number}","notifications_url":"https://api.github.com/repos/castleproject/Windsor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/castleproject/Windsor/labels{/name}","releases_url":"https://api.github.com/repos/castleproject/Windsor/releases{/id}","deployments_url":"https://api.github.com/repos/castleproject/Windsor/deployments","created_at":"2011-10-23T07:01:06Z","updated_at":"2018-06-10T01:38:31Z","pushed_at":"2018-06-10T19:30:25Z","git_url":"git://github.com/castleproject/Windsor.git","ssh_url":"git@github.com:castleproject/Windsor.git","clone_url":"https://github.com/castleproject/Windsor.git","svn_url":"https://github.com/castleproject/Windsor","homepage":"http://www.castleproject.org/","size":103638,"stargazers_count":885,"watchers_count":885,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":370,"mirror_url":null,"archived":false,"open_issues_count":35,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":370,"open_issues":35,"watchers":885,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/castleproject/Windsor/pulls/394"},"html":{"href":"https://github.com/castleproject/Windsor/pull/394"},"issue":{"href":"https://api.github.com/repos/castleproject/Windsor/issues/394"},"comments":{"href":"https://api.github.com/repos/castleproject/Windsor/issues/394/comments"},"review_comments":{"href":"https://api.github.com/repos/castleproject/Windsor/pulls/394/comments"},"review_comment":{"href":"https://api.github.com/repos/castleproject/Windsor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/castleproject/Windsor/pulls/394/commits"},"statuses":{"href":"https://api.github.com/repos/castleproject/Windsor/statuses/2ede67b8752f98ccf3d111a305baee1ef2ce3dc2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"fir3pho3nixx"}}