blob: 0759c11f1d57250e07af132554ce83a94e7bae6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
//using System.Collections.Generic;
//using System.Reflection;
//using System.Runtime.Remoting.Messaging;
//using jive.utility;
//namespace jive.infrastructure.proxies
//{
//public class MethodCallInvocation<T> : Invocation
//{
//readonly IMethodCallMessage call;
//readonly T target;
//readonly Stack<Interceptor> interceptors;
//public MethodCallInvocation(IEnumerable<Interceptor> interceptors, IMethodCallMessage call, T target)
//{
//this.call = call;
//this.target = target;
//this.interceptors = new Stack<Interceptor>(interceptors);
//arguments = call.Properties["__Args"].downcast_to<object[]>();
//method = call.MethodBase.downcast_to<MethodInfo>();
//}
//public object[] arguments { get; set; }
//public MethodInfo method { get; set; }
//public object return_value { get; set; }
//public void proceed()
//{
//if (interceptors.Count > 0)
//{
//interceptors.Pop().intercept(this);
//return;
//}
//try
//{
//return_value = call.MethodBase.Invoke(target, arguments);
//}
//catch (TargetInvocationException e)
//{
//throw e.InnerException.preserve_stack_trace();
//}
//}
//}
//}
|