{"action":"created","issue":{"url":"https://api.github.com/repos/unitycontainer/unity/issues/47","repository_url":"https://api.github.com/repos/unitycontainer/unity","labels_url":"https://api.github.com/repos/unitycontainer/unity/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/unitycontainer/unity/issues/47/comments","events_url":"https://api.github.com/repos/unitycontainer/unity/issues/47/events","html_url":"https://github.com/unitycontainer/unity/issues/47","id":129984008,"number":47,"title":"Registration Cache Invalidation?","user":{"login":"Michael-DST","id":2931376,"avatar_url":"https://avatars.githubusercontent.com/u/2931376?v=3","gravatar_id":"","url":"https://api.github.com/users/Michael-DST","html_url":"https://github.com/Michael-DST","followers_url":"https://api.github.com/users/Michael-DST/followers","following_url":"https://api.github.com/users/Michael-DST/following{/other_user}","gists_url":"https://api.github.com/users/Michael-DST/gists{/gist_id}","starred_url":"https://api.github.com/users/Michael-DST/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Michael-DST/subscriptions","organizations_url":"https://api.github.com/users/Michael-DST/orgs","repos_url":"https://api.github.com/users/Michael-DST/repos","events_url":"https://api.github.com/users/Michael-DST/events{/privacy}","received_events_url":"https://api.github.com/users/Michael-DST/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-30T13:05:45Z","updated_at":"2016-02-14T16:25:54Z","closed_at":null,"body":"Hello,\r\n\r\nConsider the following component:\r\n\r\n```\r\npublic class Component\r\n{\r\n    public Component( IDependency dependency ) { ... }\r\n\r\n    public Dependency Dependency { get; }\r\n}\r\n\r\npublic class Dependency : IDependency { ... }\r\npublic class AnotherDependency : IDependency { ... }\r\n```\r\n\r\nNow let's say that at application initialization, `Dependency` is registered as the `IDependency` and the `Component` is created:\r\n\r\n```\r\nvar container = new UnityContainer();\r\ncontainer.RegisterType<IDependency, Dependency>();\r\ncontainer.Register<Component>( new ContainerControlledLifetimeManager() );\r\nvar instance = container.Resolve<Component>();\r\n```\r\n\r\nNow let's I do this:\r\n\r\n```\r\ncontainer.RegisterType<IDependency, AnotherDependency>();\r\n```\r\n\r\nWhat I would like to happen is to essentially invalidate the lifetime managers for all registrations that have direct (or indirect) dependencies to `IDependency`.  So, if I do this:\r\n\r\n```\r\nvar instance = container.Resolve<Component>();\r\nAssert.IsType<AnotherDependency>( instance.Dependency ); // Equals true\r\n```\r\n\r\nI'm using psedo-code here, but hopefully you can get what I am driving at.  Is this possible?  Is there an extension out there that already does this?  Any insight/guidance would be appreciated."},"comment":{"url":"https://api.github.com/repos/unitycontainer/unity/issues/comments/183913418","html_url":"https://github.com/unitycontainer/unity/issues/47#issuecomment-183913418","issue_url":"https://api.github.com/repos/unitycontainer/unity/issues/47","id":183913418,"user":{"login":"Michael-DST","id":2931376,"avatar_url":"https://avatars.githubusercontent.com/u/2931376?v=3","gravatar_id":"","url":"https://api.github.com/users/Michael-DST","html_url":"https://github.com/Michael-DST","followers_url":"https://api.github.com/users/Michael-DST/followers","following_url":"https://api.github.com/users/Michael-DST/following{/other_user}","gists_url":"https://api.github.com/users/Michael-DST/gists{/gist_id}","starred_url":"https://api.github.com/users/Michael-DST/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Michael-DST/subscriptions","organizations_url":"https://api.github.com/users/Michael-DST/orgs","repos_url":"https://api.github.com/users/Michael-DST/repos","events_url":"https://api.github.com/users/Michael-DST/events{/privacy}","received_events_url":"https://api.github.com/users/Michael-DST/received_events","type":"User","site_admin":false},"created_at":"2016-02-14T16:25:54Z","updated_at":"2016-02-14T16:25:54Z","body":"Sounds like a \"no.\"  :P  Is this repo alive/dead or what?"}}