unity-interception

Getting real instance from proxy under Unity Interception with NHibernate

I'm using Unity to resolve types dynamically for a pluggable architecture. I'm also using interception to apply business rule validation via AOP (using ValidationAspects). Finally, I'm using NHibernate as an ORM to persist domain objects. In order for AOP to work, we use the VirtualMethodInterceptor, as interface interception doesn't wo...

AOP interception attribute

So, i have this problem, and no one seems to be able to help. So rather than keep bashing away i'm going to throw it out there for alternative ways to skin this particular cat. I currently have the following: public interface ICustomerService { Customer GetCustomer(int id); } public class CustomerService : ICustomerService { p...

Interception with Unity in Prism v2 for WPF (not working for me)

I cannot get interception to work with Prism v2 (Oct 2009). I am trying to intercept the Setter for any Public Properties and then fire the PropertyChanged event if the property has changed. I can see that the code gets executed (by stepping through with the debugger or adding a debug point). However, the WPF Window controls that are bou...

Using Unity 2.0 Interception with RemoteType LifeTimeManger?

I am using Unity 2.0 as my IOC container and I have created a LifeTimeManger for remote types very similar to what is describe in this thread. I have also implemented a IUnityContainer decorator for my client side container that attaches a policy injection interceptor for any types that have policies. The relevant code in the decorat...

Intercepting child method calls using Unity

Using PIAB / Unity, is it possible to intercept "child" method calls ? e.g. the class has three methods ... DoSomething(), DoFirst(), DoSecond() The DoSomething() method calls DoFirst() which in turn calls DoSecond() I can get interception of DoSomething, but I can't get anything for DoFirst and DoSecond. I've tried various of the...

Microsoft Unity: Interception not working when using BuildUp instead of Resolve

Hi fellow programmers, I am using Microsoft Unity 2.0 and the interception extension is not working as expected. Consider these two lines of code: MyUnityContainer.Configure<Interception>().SetDefaultInterceptorFor<MyType>(new VirtualMethodInterceptor()); var someObject = MyUnityContainer.BuildUp<MyType>(anObject); These two lines d...