Added generalized installation capabilities to Windsor (analogous to Kernel registration)
[castle.git] / Tools / DynamicProxy / Castle.DynamicProxy / IInvocation.cs
blobe22f73d433e7ec2658756bad19cc33a3269d8e61
1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
2 //
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
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
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;
19 /// <summary>
20 /// Proceed with, manipulate or find more information about the call that
21 /// is being intercepted
22 /// </summary>
23 public interface IInvocation
25 /// <summary>
26 /// Get the dynamic proxy that intercepted this call.
27 /// </summary>
28 object Proxy { get; }
30 /// <summary>
31 /// Get or set target that will be invoked when Process() is called.
32 /// </summary>
33 /// <remarks>
34 /// Changing InvocationTarget only effects this call. Any call made after
35 /// this will invoke the original target of the proxy.
36 /// </remarks>
37 object InvocationTarget { get;set; }
39 /// <summary>
40 /// Get the method that is being invoked.
41 /// </summary>
42 MethodInfo Method { get; }
44 /// <summary>
45 /// Proceed with the call that was intercepted.
46 /// </summary>
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 );
51 /// <summary>
52 /// Get the method on the target object that is being invoked.
53 /// </summary>
54 MethodInfo MethodInvocationTarget { get; }