Clover.NET coverage report - Coverage for s2container.net

Coverage timestamp: 2006年5月30日 11:21:29

File Stats: LOC: 104   Methods: 7
NCLOC: 74 Classes: 1
 
Source File Conditionals Statements Methods TOTAL
Seasar.Framework.Aop\Impl\DynamicProxyMethodInvocation.cs 0.0% 0.0% 0.0% 0.0%
coverage
1   #region using directives
2  
3   using System;
4   using System.Text;
5   using System.Reflection;
6   using System.Collections;
7  
8   using Seasar.Framework.Aop;
9   using Seasar.Framework.Aop.Interceptors;
10  
11   using Castle.DynamicProxy;
12  
13   #endregion
14  
15   namespace Seasar.Framework.Aop.Impl
16   {
17   /// <summary>
18   /// 複数のAdvice(Interceptor)によるチェーンを抽象化したインタフェースの実装クラスです
19   /// </summary>
20   /// <author>Kazz</author>
21   /// <version>1.3 2006/05/23</version>
22   ///
23   public class DynamicProxyMethodInvocation : IMethodInvocation
24   {
25   #region fields
26  
27   private Object target;
28   private Type targetType;
29   private IInvocation invocation;
30   private IMethodInterceptor[] interceptors;
31   private int interceptorsIndex = 1;
32   private Object[] arguments;
33   private Hashtable parameters;
34  
35   #endregion
36  
37   #region constructors
38  
39   /// <summary>
40   /// コンストラクタ
41   /// </summary>
42   /// <param name="target">対象のオブジェクトをセット</param>
43   /// <param name="targetType">対象の型をセット</param>
44   /// <param name="invocation">IInvocationインタフェースをセット</param>
45   /// <param name="interceptors">インターセプタの配列をセット</param>
46 0 public DynamicProxyMethodInvocation(object target
47   , Type targetType
48   , IInvocation invocation
49   , object[] arguments
50   , IMethodInterceptor[] interceptors
51   , Hashtable parameters)
52   {
53   if (target == null) throw new NullReferenceException("target");
54   if (targetType == null) throw new NullReferenceException("target");
55   if (invocation == null) throw new NullReferenceException("invocation");
56   if (interceptors == null) throw new NullReferenceException("interceptors");
57   this.target = target;
58   this.targetType = targetType;
59   this.invocation = invocation;
60   this.arguments = arguments;
61   this.interceptors = interceptors;
62   this.parameters = parameters;
63   }
64  
65   #endregion
66  
67   #region IMethodInvocation member
68  
69 0 public MethodBase Method
70   {
71   get { return this.invocation.Method; }
72   }
73  
74 0 public Object Target
75   {
76   get { return this.target; }
77   }
78 0 public Type TargetType
79   {
80   get { return this.targetType; }
81   }
82 0 public Object[] Arguments
83   {
84   get { return this.arguments; }
85   }
86  
87 0 public Object Proceed()
88   {
89   while (interceptorsIndex < interceptors.Length)
90   {
91   return interceptors[interceptorsIndex++].Invoke(this);
92   }
93   return this.invocation.Proceed(arguments);
94   }
95  
96 0 public object GetParameter(string name)
97   {
98   return this.parameters[name];
99   }
100  
101   #endregion
102   }
103   }
104