1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle
.DynamicProxy
17 using System
.Reflection
;
20 /// Proceed with, manipulate or find more information about the call that
21 /// is being intercepted
23 public interface IInvocation
26 /// Get the dynamic proxy that intercepted this call.
31 /// Get or set target that will be invoked when Process() is called.
34 /// Changing InvocationTarget only effects this call. Any call made after
35 /// this will invoke the original target of the proxy.
37 object InvocationTarget { get;set; }
40 /// Get the method that is being invoked.
42 MethodInfo Method { get; }
45 /// Proceed with the call that was intercepted.
47 /// <param name="args">The arguments that will be passed onto the method.</param>
48 /// <returns>The argument returned from the method.</returns>
49 object Proceed( params object[] args
);
52 /// Get the method on the target object that is being invoked.
54 MethodInfo MethodInvocationTarget { get; }