Clover.NET coverage report - Coverage for s2container.net

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

File Stats: LOC: 73   Methods: 4
NCLOC: 46 Classes: 1
 
Source File Conditionals Statements Methods TOTAL
Seasar.Framework.Container\Assembler\AbstractPropertyAssembler.cs 50.0% 75.0% 75.0% 71.4%
coverage 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 System.Reflection;
21   using Seasar.Framework.Beans;
22  
23   namespace Seasar.Framework.Container.Assembler
24   {
25   /// <summary>
26   /// AbstractPropertyAssembler の概要の説明です。
27   /// </summary>
28   public abstract class AbstractPropertyAssembler
29   : AbstractAssembler,IPropertyAssembler
30   {
31 477 public AbstractPropertyAssembler(IComponentDef componentDef)
32   : base(componentDef)
33   {
34   }
35  
36 284 protected object GetValue(IPropertyDef propertyDef,object component)
37   {
38 284 try
39   {
40 284 return propertyDef.Value;
41   }
42   catch(ComponentNotFoundRuntimeException cause)
43   {
44 0 throw new IllegalPropertyRuntimeException(
45   this.GetComponentType(component),propertyDef.PropertyName,cause);
46   }
47   }
48  
49 597 protected void SetValue(PropertyInfo propertyInfo,object component,object value)
50   {
51 0 if(value==null) return;
52 597 try
53   {
54 597 propertyInfo.SetValue(component,value,null);
55   }
56   catch(Exception ex)
57   {
58 1 throw new IllegalPropertyRuntimeException(
59   this.ComponentDef.ComponentType,propertyInfo.Name,ex);
60   }
61   }
62  
63   #region PropertyAssembler メンバ
64  
65 0 public virtual void Assemble(object component)
66   {
67  
68   }
69  
70   #endregion
71   }
72   }
73