Clover.NET coverage report - Coverage for s2container.net

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

File Stats: LOC: 63   Methods: 3
NCLOC: 36 Classes: 1
 
Source File Conditionals Statements Methods TOTAL
Seasar.Framework.Aop\Interceptors\AbstractInterceptor.cs 0.0% 0.0% 0.0% 0.0%
coverage
1   #region Copyright
2   /*
3   * Copyright 2005 the Seasar Foundation and the Others.
4   *
5   * Licensed under the Apache License, Version 2.0 (the "License");
6   * you may not use this file except in compliance with the License.
7   * You may obtain a copy of the License at
8   *
9   * http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14   * either express or implied. See the License for the specific language
15   * governing permissions and limitations under the License.
16   */
17   #endregion
18  
19   using System;
20   using Seasar.Framework.Aop.Impl;
21   using Seasar.Framework.Aop.Proxy;
22   using Seasar.Framework.Container;
23  
24   namespace Seasar.Framework.Aop.Interceptors
25   {
26   /// <summary>
27   /// Interceptorを作成する場合は、このクラスを継承します
28   /// </summary>
29   [Serializable]
30   public abstract class AbstractInterceptor : IMethodInterceptor
31   {
32   const long serialVersionUID = 0L;
33  
34 0 public object CreateProxy(Type proxyType)
35   {
36   IAspect aspect = new AspectImpl(this, new PointcutImpl(
37   new string[] { ".*" } ));
38   return new AopProxy(proxyType,
39   new IAspect[] { aspect }).GetTransparentProxy();
40   }
41  
42 0 protected IComponentDef GetComponentDef(IMethodInvocation invocation)
43   {
44   if(invocation is IS2MethodInvocation)
45   {
46   IS2MethodInvocation impl = (IS2MethodInvocation) invocation;
47   return (IComponentDef) impl.GetParameter(ContainerConstants.COMPONENT_DEF_NAME);
48   }
49   return null;
50   }
51  
52   #region IMethodInterceptor インターフェイス
53  
54 0 public virtual object Invoke(IMethodInvocation invocation)
55   {
56   return invocation.Proceed();
57   }
58  
59   #endregion
60  
61   }
62   }
63