zcz527 / autofac

Automatically exported from code.google.com/p/autofac
Other
0 stars 0 forks source link

Registration order of ContravariantRegistrationSource affects results #341

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The order in wich the ContravariantRegistrationSource is registered in the 
container changes the behavior of the container, which could lead to hard to 
find problems.

The attached .cs file contains two unit tests, which only differ in the moment 
of registering the ContravariantRegistrationSource.

While the container in the first test returns an 
MultipleDispatchEventHandler<CustomerMovedEvent> when a 
IEventHandler<CustomerMovedEvent> is requested, the second test returns a 
MultipleDispatchEventHandler<object> in that case.

Note: running under .NET 4.0.

Original issue reported on code.google.com by steven.v...@gmail.com on 26 Aug 2011 at 5:09

Attachments:

GoogleCodeExporter commented 8 years ago
Perfect - thanks Steven!

Original comment by nicholas...@gmail.com on 27 Aug 2011 at 3:21

GoogleCodeExporter commented 8 years ago

Original comment by nicholas...@gmail.com on 27 Aug 2011 at 3:21

GoogleCodeExporter commented 8 years ago

Original comment by nicholas...@gmail.com on 25 Sep 2011 at 3:15

GoogleCodeExporter commented 8 years ago

Original comment by travis.illig on 21 Sep 2012 at 4:33

GoogleCodeExporter commented 8 years ago
Moved issue to GitHub: https://github.com/autofac/Autofac/issues/341

Subsequent issue management will be held there; closing the issue on Google 
Code as "WontFix" because we will handle issue resolution on GitHub.

Original comment by travis.illig on 11 Feb 2014 at 12:05