Author: gbayon
Date: Tue Jun 28 10:08:36 2005
New Revision: 202249
URL: http://svn.apache.org/viewcvs?rev=202249&view=rev
Log:
- Updated to new logging API
Added:
ibatis/trunk/cs/mapper/IBatisNet.Common.Test/NUnit/CommonTests/Logging/
ibatis/trunk/cs/mapper/IBatisNet.Common.Test/NUnit/CommonTests/Logging/LogTest.cs
ibatis/trunk/cs/mapper/IBatisNet.Common/Logging/Impl/Log4NetFA.cs
Modified:
ibatis/trunk/cs/mapper/IBatisNet.Common.Test/IBatisNet.Common.Test.csproj
ibatis/trunk/cs/mapper/IBatisNet.Common.Test/bin/Debug/IBatisNet.Common.Test.dll.config
ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/IBatisNet.DataAccess.Test.dll.config
ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DaoProxy.cs
ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DomDaoManagerBuilder.cs
ibatis/trunk/cs/mapper/IBatisNet.DataAccess/DaoSession.cs
ibatis/trunk/cs/mapper/IBatisNet.DataAccess/DaoSessionHandlers/SimpleDaoSession.cs
ibatis/trunk/cs/mapper/IBatisNet.DataAccess/IBatisNet.DataAccess.csproj
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/IBatisNet.DataMapper.Test.dll.config
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/DefaultPreparedCommand.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/IPreparedCommand.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/IPreparedCommandProxy.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Cache/CacheModel.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.csproj
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/LazyLoadList.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapSession.cs
Modified:
ibatis/trunk/cs/mapper/IBatisNet.Common.Test/IBatisNet.Common.Test.csproj
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.Common.Test/IBatisNet.Common.Test.csproj?rev=202249&r1=202248&r2=202249&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.Common.Test/IBatisNet.Common.Test.csproj
(original)
+++ ibatis/trunk/cs/mapper/IBatisNet.Common.Test/IBatisNet.Common.Test.csproj
Tue Jun 28 10:08:36 2005
@@ -261,6 +261,11 @@
BuildAction = "Compile"
/>
<File
+ RelPath = "NUnit\CommonTests\Logging\LogTest.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
RelPath =
"NUnit\CommonTests\Pagination\PaginatedArrayListTest.cs"
SubType = "Code"
BuildAction = "Compile"
Added:
ibatis/trunk/cs/mapper/IBatisNet.Common.Test/NUnit/CommonTests/Logging/LogTest.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.Common.Test/NUnit/CommonTests/Logging/LogTest.cs?rev=202249&view=auto
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.Common.Test/NUnit/CommonTests/Logging/LogTest.cs
(added)
+++
ibatis/trunk/cs/mapper/IBatisNet.Common.Test/NUnit/CommonTests/Logging/LogTest.cs
Tue Jun 28 10:08:36 2005
@@ -0,0 +1,66 @@
+using System.Reflection;
+using IBatisNet.Common.Logging;
+using NUnit.Framework;
+
+
+namespace IBatisNet.Common.Test.NUnit.CommonTests.Logging
+{
+ /// <summary>
+ /// Summary description for LogTest.
+ /// </summary>
+ [TestFixture]
+ public class LogTest
+ {
+ private ILog _log = null;
+
+
+ [SetUp]
+ public void SetUp()
+ {
+ _log = LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType );
+ _log.Info( "Starting tests..." );
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ _log.Info( "Ending tests..." );
+ }
+
+ [Test]
+ public void LogDebug()
+ {
+ _log.Debug("test LogDebug");
+ }
+
+ [Test]
+ public void LogInfo()
+ {
+ _log.Info("test LogInfo");
+ }
+
+ [Test]
+ public void LogError()
+ {
+ _log.Error("test LogError");
+ }
+
+ [Test]
+ public void LogFatal()
+ {
+ _log.Fatal("test LogFatal");
+ }
+
+ [Test]
+ public void LogTrace()
+ {
+ _log.Trace("test LogTrace");
+ }
+
+ [Test]
+ public void LogWarn()
+ {
+ _log.Warn("test LogWarn");
+ }
+ }
+}
\ No newline at end of file
Modified:
ibatis/trunk/cs/mapper/IBatisNet.Common.Test/bin/Debug/IBatisNet.Common.Test.dll.config
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.Common.Test/bin/Debug/IBatisNet.Common.Test.dll.config?rev=202249&r1=202248&r2=202249&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.Common.Test/bin/Debug/IBatisNet.Common.Test.dll.config
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.Common.Test/bin/Debug/IBatisNet.Common.Test.dll.config
Tue Jun 28 10:08:36 2005
@@ -2,6 +2,9 @@
<configuration>
<!-- Register a section handler for the log4net section -->
<configSections>
+ <sectionGroup name="iBATIS">
+ <section name="logging"
type="IBatisNet.Common.Logging.ConfigurationSectionHandler, IBatisNet.Common" />
+ </sectionGroup>
<section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<appSettings>
@@ -19,6 +22,21 @@
<!-- To test via Odbc provider (any database) value="Odbc" -->
<add key="providerType" value="SqlClient"/>
</appSettings>
+
+ <iBATIS>
+ <logging>
+ <!--<logFactoryAdapter
type="IBatisNet.Common.Logging.Impl.SimpleLoggerFA, IBatisNet.Common">
+ <arg property="showLogName" value="true" />
+ <arg property="showDataTime" value="true" />
+ <arg property="level" value="ALL" />
+ <arg property="dateTimeFormat"
value="yyyy/MM/dd HH:mm:ss:SSS" />
+ </logFactoryAdapter> -->
+
+ <logFactoryAdapter
type="IBatisNet.Common.Logging.Impl.Log4NetLoggerFA, IBatisNet.Common">
+ <arg key="configType" value="inline" />
+ </logFactoryAdapter>
+ </logging>
+ </iBATIS>
<!-- This section contains the log4net configuration settings -->
<log4net>
Added: ibatis/trunk/cs/mapper/IBatisNet.Common/Logging/Impl/Log4NetFA.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.Common/Logging/Impl/Log4NetFA.cs?rev=202249&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.Common/Logging/Impl/Log4NetFA.cs (added)
+++ ibatis/trunk/cs/mapper/IBatisNet.Common/Logging/Impl/Log4NetFA.cs Tue Jun
28 10:08:36 2005
@@ -0,0 +1,106 @@
+
+#region Apache Notice
+/*****************************************************************************
+ * $Header: $
+ * $Revision: $
+ * $Date: $
+ *
+ * iBATIS.NET Data Mapper
+ * Copyright (C) 2004 - Gilles Bayon
+ *
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+
********************************************************************************/
+#endregion
+
+using System;
+using System.Collections.Specialized;
+using System.Configuration;
+using System.IO;
+using log4net.Config;
+
+namespace IBatisNet.Common.Logging.Impl
+{
+ /// <summary>
+ /// Concrete subclass of ILoggerFactoryAdapter specific to log4n.
+ /// </summary>
+ public class Log4NetFactoryAdapter : ILoggerFactoryAdapter
+ {
+ /// <summary>
+ /// Constructor
+ /// </summary>
+ /// <param name="properties"></param>
+ public Log4NetFactoryAdapter(NameValueCollection properties)
+ {
+ string configurationType = string.Empty;
+
+ if ( properties["configurationType"] != null )
+ {
+ configurationType =
properties["configurationType"].ToUpper();
+ }
+
+ string configurationFile = string.Empty;
+ if ( properties["configurationFile"] != null )
+ {
+ configurationFile =
properties["configurationFile"];
+ }
+
+ if ( configurationType == "FILE" )
+ {
+ if ( configurationFile == string.Empty )
+ throw new ConfigurationException(
"Configration property 'configurationFile' must be set for log4Net
configuration of type 'FILE'." );
+
+ if ( !File.Exists( configurationFile ) )
+ throw new ConfigurationException(
"log4net configuration file '" + configurationFile + "' does not exists" );
+ }
+
+ switch ( configurationType )
+ {
+ case "INLINE":
+ DOMConfigurator.Configure();
+ break;
+ case "FILE":
+ DOMConfigurator.Configure( new
FileInfo( configurationFile ) );
+ break;
+ default:
+ BasicConfigurator.Configure();
+ break;
+ }
+ }
+
+ #region ILoggerFactoryAdapter Members
+
+ /// <summary>
+ /// Get a ILog instance by type name
+ /// </summary>
+ /// <param name="name"></param>
+ /// <returns></returns>
+ public ILog GetLogger(string name)
+ {
+ return new Log4NetLogger( log4net.LogManager.GetLogger(
name ) );
+ }
+
+ /// <summary>
+ /// Get a ILog instance by type
+ /// </summary>
+ /// <param name="type"></param>
+ /// <returns></returns>
+ public ILog GetLogger(Type type)
+ {
+ return new Log4NetLogger( log4net.LogManager.GetLogger(
type ) );
+ }
+
+ #endregion
+ }
+}
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/IBatisNet.DataAccess.Test.dll.config
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/IBatisNet.DataAccess.Test.dll.config?rev=202249&r1=202248&r2=202249&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/IBatisNet.DataAccess.Test.dll.config
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/IBatisNet.DataAccess.Test.dll.config
Tue Jun 28 10:08:36 2005
@@ -2,8 +2,12 @@
<configuration>
<!-- Register a section handler for the log4net section -->
<configSections>
+ <sectionGroup name="iBATIS">
+ <section name="logging"
type="IBatisNet.Common.Logging.ConfigurationSectionHandler, IBatisNet.Common" />
+ </sectionGroup>
<section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
+
<appSettings>
<!-- To enable internal log4net logging specify the following
appSettings key -->
<!-- <add key="log4net.Internal.Debug" value="true"/> -->
@@ -20,6 +24,23 @@
<!-- To test via Odbc provider (any database) value="Odbc" -->
<add key="providerType" value="SqlClient"/>
</appSettings>
+
+ <iBATIS>
+ <logging>
+ <!--<logFactoryAdapter
type="IBatisNet.Common.Logging.Impl.SimpleLoggerFA, IBatisNet.Common">
+ <arg property="showLogName" value="true" />
+ <arg property="showDataTime" value="true" />
+ <arg property="level" value="ALL" />
+ <arg property="dateTimeFormat"
value="yyyy/MM/dd HH:mm:ss:SSS" />
+ </logFactoryAdapter>-->
+
+ <logFactoryAdapter
type="IBatisNet.Common.Logging.Impl.Log4NetLoggerFA, IBatisNet.Common">
+ <arg key="configType" value="inline" />
+ </logFactoryAdapter>
+
+ <!--<logFactoryAdapter
type="IBatisNet.Common.Logging.Impl.NoOpLoggerFA, IBatisNet.Common"/>-->
+ </logging>
+ </iBATIS>
<!-- This section contains the log4net configuration settings -->
<log4net>
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DaoProxy.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DaoProxy.cs?rev=202249&r1=202248&r2=202249&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DaoProxy.cs
(original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DaoProxy.cs Tue
Jun 28 10:08:36 2005
@@ -28,12 +28,11 @@
using System;
using System.Collections;
using System.Xml.Serialization;
-
+using IBatisNet.Common.Logging;
using IBatisNet.DataAccess.Interfaces;
using IBatisNet.DataAccess.Exceptions;
using Castle.DynamicProxy;
-using log4net;
#endregion
namespace IBatisNet.DataAccess.Configuration
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DomDaoManagerBuilder.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DomDaoManagerBuilder.cs?rev=202249&r1=202248&r2=202249&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DomDaoManagerBuilder.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DomDaoManagerBuilder.cs
Tue Jun 28 10:08:36 2005
@@ -34,10 +34,10 @@
using System.Xml.Serialization;
using IBatisNet.Common;
using IBatisNet.Common.Exceptions;
+using IBatisNet.Common.Logging;
using IBatisNet.Common.Utilities;
using IBatisNet.DataAccess.Interfaces;
using IBatisNet.DataAccess.Scope;
-using log4net;
#endregion
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataAccess/DaoSession.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataAccess/DaoSession.cs?rev=202249&r1=202248&r2=202249&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataAccess/DaoSession.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataAccess/DaoSession.cs Tue Jun 28
10:08:36 2005
@@ -25,15 +25,10 @@
#endregion
#region Imports
-using System;
-using System.Data;
-
-using log4net;
+using System.Data;
using IBatisNet.Common;
-using IBatisNet.DataAccess.Exceptions;
-using IBatisNet.DataAccess.Interfaces;
-using IBatisNet.DataAccess.DaoSessionHandlers;
+
#endregion
namespace IBatisNet.DataAccess
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataAccess/DaoSessionHandlers/SimpleDaoSession.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataAccess/DaoSessionHandlers/SimpleDaoSession.cs?rev=202249&r1=202248&r2=202249&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataAccess/DaoSessionHandlers/SimpleDaoSession.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataAccess/DaoSessionHandlers/SimpleDaoSession.cs
Tue Jun 28 10:08:36 2005
@@ -25,16 +25,13 @@
#endregion
#region Imports
+
using System;
using System.Data;
-
+using System.Reflection;
using IBatisNet.Common;
-
-using IBatisNet.DataAccess;
-using IBatisNet.DataAccess.Exceptions;
-using IBatisNet.DataAccess.Interfaces;
-
-using log4net;
+using IBatisNet.Common.Logging;
+using IBatisNet.DataAccess.Exceptions;
#endregion
@@ -48,7 +45,7 @@
{
#region Fields
- private static readonly ILog _logger = LogManager.GetLogger(
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType );
+ private static readonly ILog _logger = LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType );
private DataSource _dataSource = null;
private bool _isOpenTransaction = false;
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataAccess/IBatisNet.DataAccess.csproj
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataAccess/IBatisNet.DataAccess.csproj?rev=202249&r1=202248&r2=202249&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataAccess/IBatisNet.DataAccess.csproj
(original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataAccess/IBatisNet.DataAccess.csproj Tue
Jun 28 10:08:36 2005
@@ -90,11 +90,6 @@
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
/>
<Reference
- Name = "log4net"
- AssemblyName = "log4net"
- HintPath = "..\External-Bin\Net\1.1\log4net.dll"
- />
- <Reference
Name = "System.Web"
AssemblyName = "System.Web"
HintPath =
"D:\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Web.dll"
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/IBatisNet.DataMapper.Test.dll.config
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/IBatisNet.DataMapper.Test.dll.config?rev=202249&r1=202248&r2=202249&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/IBatisNet.DataMapper.Test.dll.config
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/IBatisNet.DataMapper.Test.dll.config
Tue Jun 28 10:08:36 2005
@@ -2,6 +2,9 @@
<configuration>
<!-- Register a section handler for the log4net section -->
<configSections>
+ <sectionGroup name="iBATIS">
+ <section name="logging"
type="IBatisNet.Common.Logging.ConfigurationSectionHandler, IBatisNet.Common" />
+ </sectionGroup>
<section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<appSettings>
@@ -24,7 +27,22 @@
<!-- To test via Odbc provider (any database) value="Odbc" -->
<add key="providerType" value="SqlClient"/>
</appSettings>
-
+
+ <iBATIS>
+ <logging>
+ <!--<logFactoryAdapter
type="IBatisNet.Common.Logging.Impl.SimpleLoggerFA, IBatisNet.Common">
+ <arg property="showLogName" value="true" />
+ <arg property="showDataTime" value="true" />
+ <arg property="level" value="ALL" />
+ <arg property="dateTimeFormat"
value="yyyy/MM/dd HH:mm:ss:SSS" />
+ </logFactoryAdapter> -->
+
+ <logFactoryAdapter
type="IBatisNet.Common.Logging.Impl.Log4NetLoggerFA, IBatisNet.Common">
+ <arg key="configType" value="inline" />
+ </logFactoryAdapter>
+ </logging>
+ </iBATIS>
+
<!-- This section contains the log4net configuration settings -->
<log4net>
<!-- Define some output appenders -->
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/DefaultPreparedCommand.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/DefaultPreparedCommand.cs?rev=202249&r1=202248&r2=202249&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/DefaultPreparedCommand.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/DefaultPreparedCommand.cs
Tue Jun 28 10:08:36 2005
@@ -28,8 +28,7 @@
using System.Data;
using System.Collections;
using System.Text;
-
-using log4net;
+using IBatisNet.Common.Logging;
using IBatisNet.Common;
using IBatisNet.Common.Utilities.Objects;
@@ -103,7 +102,6 @@
for ( int i = 0; i < properties.Count; ++i )
{
IDataParameter sqlParameter =
(IDataParameter)parameters[i];
- string propertyName = (string)properties[i];
IDataParameter parameterCopy =
command.CreateParameter();
ParameterProperty property =
request.ParameterMap.GetProperty(i);
@@ -153,9 +151,6 @@
#endregion
request.ParameterMap.SetParameter(property,
parameterCopy, parameterObject );
-
-// // Fix JIRA 20
-// property.TypeHandler.SetParameter(property,
parameterCopy, parameterValue, property.DbType);
parameterCopy.Direction =
sqlParameter.Direction;
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/IPreparedCommand.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/IPreparedCommand.cs?rev=202249&r1=202248&r2=202249&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/IPreparedCommand.cs
(original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/IPreparedCommand.cs
Tue Jun 28 10:08:36 2005
@@ -31,7 +31,6 @@
using IBatisNet.DataMapper.Configuration.Statements;
using IBatisNet.DataMapper.Scope;
-using log4net;
#endregion
namespace IBatisNet.DataMapper.Commands
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/IPreparedCommandProxy.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/IPreparedCommandProxy.cs?rev=202249&r1=202248&r2=202249&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/IPreparedCommandProxy.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/IPreparedCommandProxy.cs
Tue Jun 28 10:08:36 2005
@@ -25,21 +25,14 @@
#endregion
#region Using
+
using System;
-using System.Data;
using System.Collections;
-using System.Reflection;
-using System.Xml.Serialization;
+using System.Data;
using System.Text;
-
using Castle.DynamicProxy;
+using IBatisNet.Common.Logging;
-using IBatisNet.Common;
-using IBatisNet.Common.Utilities.Objects;
-
-using IBatisNet.Common.Exceptions;
-
-using log4net;
#endregion
namespace IBatisNet.DataMapper.Commands
@@ -124,7 +117,7 @@
for ( int i = 0; i <
command.Parameters.Count; ++i )
{
IDataParameter
sqlParameter = (IDataParameter)command.Parameters[i];
- if (sqlParameter.Value
== System.DBNull.Value)
+ if (sqlParameter.Value
== DBNull.Value)
{
valueList.Append("null,");
typeList.Append("null,");
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Cache/CacheModel.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Cache/CacheModel.cs?rev=202249&r1=202248&r2=202249&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Cache/CacheModel.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Cache/CacheModel.cs
Tue Jun 28 10:08:36 2005
@@ -24,16 +24,15 @@
********************************************************************************/
#endregion
-#region Imports
+#region Using
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Reflection;
using System.Xml.Serialization;
-using log4net;
-
using IBatisNet.Common.Exceptions;
+using IBatisNet.Common.Logging;
using IBatisNet.DataMapper.Exceptions;
using IBatisNet.DataMapper.MappedStatements;
#endregion
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs?rev=202249&r1=202248&r2=202249&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs
Tue Jun 28 10:08:36 2005
@@ -38,6 +38,7 @@
using System.Xml.Serialization;
using IBatisNet.Common;
using IBatisNet.Common.Exceptions;
+using IBatisNet.Common.Logging;
using IBatisNet.Common.Utilities;
using IBatisNet.DataMapper.Configuration.Alias;
using IBatisNet.DataMapper.Configuration.Cache;
@@ -52,7 +53,6 @@
using IBatisNet.DataMapper.MappedStatements;
using IBatisNet.DataMapper.Scope;
using IBatisNet.DataMapper.TypeHandlers;
-using log4net;
#endregion
@@ -115,6 +115,11 @@
/// </summary>
private static string XML_CONFIG_PROVIDERS =
"/sqlMapConfig/providers";
+ /// <summary>
+ /// Token for xml path to global properties elements.
+ /// </summary>
+ private static string XML_GLOBAL_PROPERTIES = "/settings/add";
+
// TODO: Other XML paths.
/// <summary>
@@ -1387,7 +1392,7 @@
// Load the file
defined by the attribute
XmlDocument
propertiesConfig = Resources.GetAsXmlDocument(propertyNode,
_configScope.Properties);
- foreach (XmlNode node
in propertiesConfig.SelectNodes("/settings/add"))
+ foreach (XmlNode node
in propertiesConfig.SelectNodes(XML_GLOBAL_PROPERTIES))
{
_configScope.Properties[node.Attributes[PROPERTY_ELEMENT_KEY_ATTRIB].Value] =
node.Attributes[PROPERTY_ELEMENT_VALUE_ATTRIB].Value;
_logger.Info(
string.Format("Add property \"{0}\" value
\"{1}\"",node.Attributes[PROPERTY_ELEMENT_KEY_ATTRIB].Value,node.Attributes[PROPERTY_ELEMENT_VALUE_ATTRIB].Value)
);
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs?rev=202249&r1=202248&r2=202249&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs
Tue Jun 28 10:08:36 2005
@@ -33,12 +33,12 @@
using System.Reflection;
using System.Text;
using IBatisNet.Common;
+using IBatisNet.Common.Logging;
using IBatisNet.Common.Utilities;
using IBatisNet.Common.Utilities.Objects;
using IBatisNet.DataMapper.Configuration.ParameterMapping;
using IBatisNet.DataMapper.Exceptions;
using IBatisNet.DataMapper.Scope;
-using log4net;
#endregion
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.csproj
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.csproj?rev=202249&r1=202248&r2=202249&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.csproj
(original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.csproj Tue
Jun 28 10:08:36 2005
@@ -85,11 +85,6 @@
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
/>
<Reference
- Name = "log4net"
- AssemblyName = "log4net"
- HintPath = "..\External-Bin\Net\1.1\log4net.dll"
- />
- <Reference
Name = "System.Web"
AssemblyName = "System.Web"
HintPath =
"D:\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Web.dll"
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/LazyLoadList.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/LazyLoadList.cs?rev=202249&r1=202248&r2=202249&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/LazyLoadList.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/LazyLoadList.cs Tue Jun 28
10:08:36 2005
@@ -25,20 +25,16 @@
#endregion
#region Using
+
using System;
using System.Collections;
using System.Reflection;
-using System.Xml.Serialization;
-
using Castle.DynamicProxy;
-
using IBatisNet.Common;
+using IBatisNet.Common.Logging;
using IBatisNet.Common.Utilities.Objects;
-
-using IBatisNet.DataMapper.Exceptions;
using IBatisNet.DataMapper.MappedStatements;
-using log4net;
#endregion
namespace IBatisNet.DataMapper
@@ -60,7 +56,7 @@
private object _loadLock = new object();
private static ArrayList _passthroughMethods = new ArrayList();
- private static readonly ILog _logger = LogManager.GetLogger(
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType );
+ private static readonly ILog _logger = LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType );
#endregion
#region Constructor (s) / Destructor
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs?rev=202249&r1=202248&r2=202249&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
Tue Jun 28 10:08:36 2005
@@ -25,29 +25,23 @@
#endregion
#region Imports
+
using System;
-using System.Data;
using System.Collections;
-using System.Text;
+using System.Data;
using System.Reflection;
-
+using System.Text;
using IBatisNet.Common;
-using IBatisNet.Common.Utilities;
+using IBatisNet.Common.Logging;
using IBatisNet.Common.Utilities.Objects;
-
-using IBatisNet.DataMapper;
using IBatisNet.DataMapper.Commands;
-using IBatisNet.DataMapper.Configuration;
-using IBatisNet.DataMapper.Configuration.Statements;
-using IBatisNet.DataMapper.Configuration.ResultMapping;
using IBatisNet.DataMapper.Configuration.ParameterMapping;
-using IBatisNet.DataMapper.Configuration.Sql.SimpleDynamic;
-using IBatisNet.DataMapper.Configuration.Sql.Static;
-using IBatisNet.DataMapper.TypeHandlers;
+using IBatisNet.DataMapper.Configuration.ResultMapping;
+using IBatisNet.DataMapper.Configuration.Statements;
using IBatisNet.DataMapper.Exceptions;
using IBatisNet.DataMapper.Scope;
+using IBatisNet.DataMapper.TypeHandlers;
-using log4net;
#endregion
namespace IBatisNet.DataMapper.MappedStatements
@@ -150,7 +144,7 @@
// Magic number used to set the the number of rows skipped to
'none'.
private const int NO_SKIPPED_RESULTS = -1;
- private static readonly ILog _logger = LogManager.GetLogger(
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType );
+ private static readonly ILog _logger = LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType );
private IStatement _statement = null;
@@ -1005,7 +999,7 @@
object hashValue =
reader.GetValue( reader.GetOrdinal(((string)enumerator.Current).Trim()) );
keyMap.Add(hashKey, hashValue );
- wasNull = (hashValue ==
System.DBNull.Value);
+ wasNull = (hashValue ==
DBNull.Value);
}
}
else // single parameter key
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapSession.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapSession.cs?rev=202249&r1=202248&r2=202249&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapSession.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapSession.cs Tue Jun 28
10:08:36 2005
@@ -29,9 +29,9 @@
using System.Data;
using IBatisNet.Common;
+using IBatisNet.Common.Logging;
using IBatisNet.DataMapper.Exceptions;
-using log4net;
#endregion