Using Unity for Aspect Oriented Programming and Interception – Part 2

In the previous post, I used unity in order to implement interception in an application. The implementation was very easy but at the same time very limited. For example, there is no way to limit the methods or namespaces we want to intercept. Policy Injection provides various ways of creating matching rules. My favorite rules are Namespace Matching Rule and Member Name Matching Rule. As the names imply, the former is defining the matching namespace(s) and latter is defining the name of the member(s)....

October 25, 2013 · 2 min · Amir Mohtasebi

Using Unity for Aspect Oriented Programming and Interception – Part 1

Aspect Oriented Programming (AOP) aims to increase modularity by separation of cross-cutting concerns. Without knowing about the jargon and software engineering terms, probably the first time a software developer thinks about this is when s/he is thinking about implementing logging and exception handling in an application. If you are an old VB6 developer who used to write the whole application in one module (I used to do that), you are going to implement something like this:...

October 24, 2013 · 5 min · Amir Mohtasebi
Mastodon