unitycontainer / registration-by-convention

Unity.RegistrationByConvention package (Requires Core Implementation. Any contributors?)
Apache License 2.0
4 stars 12 forks source link

Interception behaviors not cleared when re-registering (bug or by design) #1

Open ENikS opened 6 years ago

ENikS commented 6 years ago

@Minx-SigEp wrote:

I have a large project were my team is using convention based registration to handle the majority of the work. We then re-register a handful of types so we can handle changing lifetime manager and other details about the registration. This second registration of the type does not clear the interception behaviors which causes the behavior to be in the pipeline twice. As a workaround we are finding the IInterceptionBehaviorsPolicy for any type that needs to be re-registered and removing it before re-registering.

I have created a sample project that shows the issue as well as a screen shot. The sample project can be found at https://github.com/Minx-SigEp/UnityInterceptionBug unityinterception