Label: BKB Dance Department - UNIT 10032 • Format: CD Mixed, Compilation • Country: Germany • Genre: Electronic • Style: Trance, Hard Trance
· I would try to swap out the Unity container for the duration of the request. Detect that it's your "V2" condition then make a new container but with the different set of types registered. Use that in the scope of that request. It wouldn't be a good idea to make a new container on every request in production but it should be a fine idea for s: 2.
Note that Unity 3 (released after this question/answer) added a Registration by Convention feature that can do what this extension does (without having to write any custom code). An example from the Developer's Guide to Dependency Injection Using Unity.
· In step 2, we added an interceptor called InterfaceInterceptor to our Unity DI configuration. This is called an instance interceptor, and can proxy a class with a single interface. You can also use a VirtualMethodInterceptor, which is a type interceptor and where only methods marked virtual will be proxied.
· Recently I started looking into improving some of our Caching code, and we decided to implement it using some Aspect Oriented Programming (AOP) approach.. Looking at different options, like PostSharp, CastleWinsdor, SimpleInjector, and Unity Interceptor, the decision was (I’m not going to go through all the decision points in this post, but it was mainle because we were already using Unity.
· Default: the two sweetest words in the English language – Homer Simpson. Unity interception requires you to specify what kind of interceptor to use for each type you want to intercept. This can be a little painful, so I decided to take a stab at a container extension that will apply a default interceptor with optional matching rules.
El Perico Loco - Mariachi Vargas de Tecalitlán - El Mejor Mariachi Del Mundo (Vinyl, LP, Album) Try To Remember - Jimmy Rhodes (3) - Daddys Little Girl (Vinyl, LP, Album) You And Me (Trocadero Bleu Citron) - Various - Movie Theme (Cassette)