Clover.NET coverage report - Coverage

Coverage timestamp: Friday, May 20, 2005 9:17:00 PM

File Stats: LOC: 152   Methods: 11
NCLOC: 76 Classes: 1
 
Source File Conditionals Statements Methods TOTAL
Configuration\Sql\Dynamic\Handlers\SqlTagContext.cs - 100.0 % 100.0 % 100.0 %
coverage
1  
2   #region Apache Notice
3   /*****************************************************************************
4   * $Header: $
5   * $Revision: $
6   * $Date: $
7   *
8   * iBATIS.NET Data Mapper
9   * Copyright (C) 2004 - Gilles Bayon
10   *
11   *
12   * Licensed under the Apache License, Version 2.0 (the "License");
13   * you may not use this file except in compliance with the License.
14   * You may obtain a copy of the License at
15   *
16   * http://www.apache.org/licenses/LICENSE-2.0
17   *
18   * Unless required by applicable law or agreed to in writing, software
19   * distributed under the License is distributed on an "AS IS" BASIS,
20   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21   * See the License for the specific language governing permissions and
22   * limitations under the License.
23   *
24   ********************************************************************************/
25   #endregion
26  
27   #region Imports
28   using System;
29   using System.Collections;
30   using System.Text;
31   using System.IO;
32  
33   using IBatisNet.DataMapper.Configuration.Sql.Dynamic.Elements;
34   using IBatisNet.DataMapper.Configuration.ParameterMapping;
35   #endregion
36  
37  
38   namespace IBatisNet.DataMapper.Configuration.Sql.Dynamic.Handlers
39   {
40   /// <summary>
41   /// Summary description for SqlTagContext.
42   /// </summary>
43   public class SqlTagContext
44   {
45   #region Fields
46   private Hashtable _attributes = new Hashtable();
47   private bool _overridePrepend = false;
48   private SqlTag _firstNonDynamicTagWithPrepend = null;
49   private ArrayList _parameterMappings = new ArrayList();
50   private StringBuilder buffer = new StringBuilder();
51   #endregion
52  
53  
54   /// <summary>
55   ///
56   /// </summary>
57 49 public SqlTagContext()
58   {
59 49 _overridePrepend = false;
60   }
61  
62   /// <summary>
63   ///
64   /// </summary>
65   /// <returns></returns>
66 49 public StringBuilder GetWriter()
67   {
68 49 return buffer;
69   }
70  
71   /// <summary>
72   ///
73   /// </summary>
74   public string BodyText
75   {
76 49 get
77   {
78 49 return buffer.ToString().Trim();
79   }
80   }
81  
82   /// <summary>
83   ///
84   /// </summary>
85   public bool IsOverridePrepend
86   {
87 66 set
88   {
89 66 _overridePrepend = value;
90   }
91 164 get
92   {
93 164 return _overridePrepend;
94   }
95   }
96  
97   /// <summary>
98   ///
99   /// </summary>
100   public SqlTag FirstNonDynamicTagWithPrepend
101   {
102 151 get
103   {
104 151 return _firstNonDynamicTagWithPrepend;
105   }
106 47 set
107   {
108 47 _firstNonDynamicTagWithPrepend = value;
109   }
110   }
111  
112  
113   /// <summary>
114   ///
115   /// </summary>
116   /// <param name="key"></param>
117   /// <param name="value"></param>
118 8 public void AddAttribute(object key, object value)
119   {
120 8 _attributes.Add(key, value);
121   }
122  
123   /// <summary>
124   ///
125   /// </summary>
126   /// <param name="key"></param>
127   /// <returns></returns>
128 80 public object GetAttribute(object key)
129   {
130 80 return _attributes[key];
131   }
132  
133   /// <summary>
134   ///
135   /// </summary>
136   /// <param name="mapping"></param>
137 59 public void AddParameterMapping(ParameterProperty mapping)
138   {
139 59 _parameterMappings.Add(mapping);
140   }
141  
142   /// <summary>
143   ///
144   /// </summary>
145   /// <returns></returns>
146 49 public IList GetParameterMappings()
147   {
148 49 return _parameterMappings;
149   }
150   }
151   }
152