Clover.NET coverage report - Coverage for s2container.net

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

File Stats: LOC: 88   Methods: 5
NCLOC: 43 Classes: 1
 
Source File Conditionals Statements Methods TOTAL
Seasar.Framework.Container\Util\InitMethodDefSupport.cs 75.0% 90.0% 100.0% 89.5%
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.Collections;
21  
22   namespace Seasar.Framework.Container.Util
23   {
24   /// <summary>
25   /// InitMethodDefSupport の概要の説明です。
26   /// </summary>
27   public sealed class InitMethodDefSupport
28   {
29   private IList methodDefs_ = ArrayList.Synchronized(new ArrayList());
30   private IS2Container container_;
31  
32   /// <summary>
33   /// コンストラクタ
34   /// </summary>
35 791 public InitMethodDefSupport()
36   {
37   }
38  
39   /// <summary>
40   /// MethodDefを追加します。
41   /// </summary>
42   /// <param name="methodDef">MethodDef</param>
43 21 public void AddInitMethodDef(IInitMethodDef methodDef)
44   {
45 21 if(container_ != null)
46   {
47 0 methodDef.Container = container_;
48   }
49 21 methodDefs_.Add(methodDef);
50   }
51  
52   /// <summary>
53   /// IInitMethodDefの数
54   /// </summary>
55   public int InitMethodDefSize
56   {
57 475 get { return methodDefs_.Count; }
58   }
59  
60   /// <summary>
61   /// 番号を指定してIInitMethodDefを取得します。
62   /// </summary>
63   /// <param name="index">IInitMethodDefの番号</param>
64   /// <returns>IInitMethodDef</returns>
65 22 public IInitMethodDef GetInitMethodDef(int index)
66   {
67 22 return (IInitMethodDef) methodDefs_[index];
68   }
69  
70   /// <summary>
71   /// S2Container
72   /// </summary>
73   public IS2Container Container
74   {
75 788 set
76   {
77 788 container_ = value;
78 788 IEnumerator enu = methodDefs_.GetEnumerator();
79 807 while(enu.MoveNext())
80   {
81 19 IInitMethodDef methodDef = (IInitMethodDef) enu.Current;
82 19 methodDef.Container = value;
83   }
84   }
85   }
86   }
87   }
88