Hacker News new | ask | show | jobs
by UK-AL 4430 days ago
I think that's the interception way of AOP? Unity IoC in c# also does this.

The IoC container will return transparent proxy(Not the original object), which then calls the underlying method(after doing the AOP behaviour).

1 comments

Be careful of using these though.

I had an obscure bug using dynamic proxy (castle dynamic proxy2) a while ago in a WPF application. I was proxying to an interface so it created a proxy object in between that in the actual class so it was eating my C# event. Changing the proxying from an interface to a subclass fixed it.

Boy that was a fun one to figure out.