I am a bit confused about what I thought InvocationTarget returns, say I
have the following:

public class PersonInterceptor : IInterceptor
    {
        public void Intercept(IInvocation invocation)
        {
            var value =
invocation.MethodInvocationTarget.Invoke(invocation.InvocationTarget,
invocation.Arguments);

            // Do something with value
        }
    }

 var factory = new ProxyGenerator();
 var proxy = factory.CreateClassProxy<Person>(new PersonInterceptor());


The InvocationTarget in the inercept is the proxy itself, not sure if I am
just being silly here, but how would I get the actual value like this.



Cheers

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to