Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ContainerBuilder.Update(IContainer) doesn't activate components registered with .AutoActivate() #454

Closed
alexmg opened this issue Jan 22, 2014 · 7 comments
Labels

Comments

@alexmg
Copy link
Member

alexmg commented Jan 22, 2014

From [email protected] on August 26, 2013 17:47:43

What steps will reproduce the problem? 1. Create new ContainerBuilder.
2. Build the container.
3. Create another ContainerBuilder.
4. Register some autoactivated components.
5. Update the container with the second builder. What is the expected output? What do you see instead? Autoactivated components should be activated after update, but nothing happens. What version of Autofac are you using? On what version of .NET/Silverlight? Autofac v3.1.1 on .NET 4.5 Please provide any additional information below. See the attached unit test.

Attachment: RegistrationExtensionTests.cs

Original issue: http://code.google.com/p/autofac/issues/detail?id=454

@alexmg
Copy link
Member Author

alexmg commented Jan 22, 2014

From travis.illig on August 26, 2013 07:55:58

Labels: Module-Core

@alexmg
Copy link
Member Author

alexmg commented Jan 22, 2014

From travis.illig on September 03, 2013 07:54:57

This is sort of an interesting scenario that I'll have to think about how it should work. We want to make sure that Update doesn't re-activate things that are already in the container as AutoActivate/IStartable - it should just activate the newly added stuff. Let me look into it.

Owner: travis.illig

@alexmg
Copy link
Member Author

alexmg commented Jan 22, 2014

From travis.illig on September 03, 2013 07:55:06

Status: Accepted

@alexmg
Copy link
Member Author

alexmg commented Jan 22, 2014

From travis.illig on September 05, 2013 08:14:28

Status: Started

@alexmg
Copy link
Member Author

alexmg commented Jan 22, 2014

From travis.illig on September 05, 2013 09:03:40

This issue was closed by revision f40b031554b6 .

Status: Fixed

@alexmg
Copy link
Member Author

alexmg commented Jan 22, 2014

From travis.illig on September 05, 2013 09:05:38

Update should now work on both AutoActivate and IStartable if you're updating a container. If you're directly updating a component registry (just a set of registrations decoupled from any context/lifetime) there's no way to do component resolution, so it will ONLY work when updating a container.

Incremented the Autofac core version to 3.1.2 for backwards-compatible bug fixes. This feature should be available on next release.

@alexmg
Copy link
Member Author

alexmg commented Jan 22, 2014

From [email protected] on September 06, 2013 10:18:51

Excellent! Thanks.

@alexmg alexmg closed this as completed Jan 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant