I am using Unity Interception to handle logging. I would like to use the IMethodInvocation target property, but it causing a stackoverflow exception. It seems that by referencing this property, it is intercepted again.
How can I prevent this?
I am able to reference other properties, such as MethodBase without this behavior.
Any Ideas?
public IMethodReturn Invoke(IMethodInvocation input, GetNextInterceptionBehaviorDelegate getNext){
if (_log_Debug)
{
// this line is not intercepted
var y = input.MethodBase;
// the line below is intercepted again...
var x = input.Target;
}
...
Bill Behning