Added RedirectUsingNamedRoute
[castle.git] / Core / Castle.Core / Interceptor / IInvocation.cs
blob5b318f6bbfa82ec0f9be2bac2fe55796c012f19b
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.Core.Interceptor
17 using System;
18 using System.Reflection;
20 /// <summary>
21 /// New interface that is going to be used by DynamicProxy 2
22 /// </summary>
23 public interface IInvocation
25 object Proxy { get; }
27 object InvocationTarget { get; }
29 Type TargetType { get; }
31 object[] Arguments { get; }
33 void SetArgumentValue(int index, object value);
35 object GetArgumentValue(int index);
37 /// <summary>
38 /// The generic arguments of the method, or null if not a generic method.
39 /// </summary>
40 Type[] GenericArguments { get; }
42 /// <summary>
43 ///
44 /// </summary>
45 MethodInfo Method { get; }
47 /// <summary>
48 /// Returns the concrete instantiation of <see cref="Method"/>, with any generic parameters bound to real types.
49 /// </summary>
50 /// <returns>The concrete instantiation of <see cref="Method"/>, or <see cref="Method"/> if not a generic method.</returns>
51 /// <remarks>Can be slower than calling <see cref="Method"/>.</remarks>
52 MethodInfo GetConcreteMethod();
54 /// <summary>
55 /// For interface proxies, this will point to the
56 /// <see cref="MethodInfo"/> on the target class
57 /// </summary>
58 MethodInfo MethodInvocationTarget { get; }
60 /// <summary>
61 /// Returns the concrete instantiation of <see cref="MethodInvocationTarget"/>, with any generic parameters bound to real types.
62 /// </summary>
63 /// <returns>The concrete instantiation of <see cref="MethodInvocationTarget"/>, or <see cref="MethodInvocationTarget"/> if not a generic method.</returns>
64 /// <remarks>Can be slower than calling <see cref="MethodInvocationTarget"/>.</remarks>
65 MethodInfo GetConcreteMethodInvocationTarget();
67 object ReturnValue { get; set; }
69 /// <summary>
70 ///
71 /// </summary>
72 /// <returns></returns>
73 void Proceed();