Permalink
Browse files

SVN: trunk@3893

  • Loading branch information...
1 parent c6072e6 commit 196a018511cbd9bc2933196d0b757249ff8cd940 @fabiomaulo fabiomaulo committed Nov 7, 2008
Showing with 94 additions and 2,929 deletions.
  1. +10 −10 default.build
  2. +4 −2 releasenotes.txt
  3. +2 −1 src/NHibernate.Config.Templates/FireBird.cfg.xml.tmpl
  4. +2 −1 src/NHibernate.Config.Templates/MSSQL.cfg.xml.tmpl
  5. +1 −0 src/NHibernate.Config.Templates/MySql.cfg.xml.tmpl
  6. +1 −0 src/NHibernate.Config.Templates/Oracle.cfg.xml.tmpl
  7. +1 −0 src/NHibernate.Config.Templates/PostgreSQL.cfg.xml.tmpl
  8. +1 −0 src/NHibernate.Config.Templates/SQLite.cfg.xml.tmpl
  9. +30 −4 src/NHibernate.Everything.sln
  10. +1 −0 src/NHibernate.Example.Web/Web.Config
  11. +0 −102 src/NHibernate.ProxyGenerators.CastleDynamicProxy.Tests/App.config
  12. +0 −72 src/NHibernate.ProxyGenerators.CastleDynamicProxy.Tests/DebugConnectionProvider.cs
  13. +0 −104 ...oxyGenerators.CastleDynamicProxy.Tests/NHibernate.ProxyGenerators.CastleDynamicProxy.Tests.csproj
  14. +0 −45 src/NHibernate.ProxyGenerators.CastleDynamicProxy.Tests/ProxyGenerators.Test.build
  15. +0 −14 src/NHibernate.ProxyGenerators.CastleDynamicProxy.Tests/ProxyInterface/CastleProxy.cs
  16. +0 −144 src/NHibernate.ProxyGenerators.CastleDynamicProxy.Tests/ProxyInterface/CastleProxyFixture.cs
  17. +0 −35 src/NHibernate.ProxyGenerators.CastleDynamicProxy.Tests/ProxyInterface/CastleProxyImpl.cs
  18. +0 −12 src/NHibernate.ProxyGenerators.CastleDynamicProxy.Tests/ProxyInterface/CastleProxyImpl.hbm.xml
  19. +0 −212 src/NHibernate.ProxyGenerators.CastleDynamicProxy.Tests/ProxyInterface/Classes.cs
  20. +0 −151 src/NHibernate.ProxyGenerators.CastleDynamicProxy.Tests/ProxyInterface/CustomProxyFixture.cs
  21. +0 −156 src/NHibernate.ProxyGenerators.CastleDynamicProxy.Tests/ProxyInterface/Mappings.hbm.xml
  22. +0 −323 src/NHibernate.ProxyGenerators.CastleDynamicProxy.Tests/TestCase.cs
  23. +0 −40 src/NHibernate.ProxyGenerators.CastleDynamicProxy.Tests/TestConfigurationHelper.cs
  24. +0 −86 src/NHibernate.ProxyGenerators.CastleDynamicProxy/LazyInitializer.cs
  25. +0 −78 ...Hibernate.ProxyGenerators.CastleDynamicProxy/NHibernate.ProxyGenerators.CastleDynamicProxy.csproj
  26. +0 −105 src/NHibernate.ProxyGenerators.CastleDynamicProxy/ProxyFactory.cs
  27. +0 −22 src/NHibernate.ProxyGenerators.CastleDynamicProxy/ProxyFactoryFactory.cs
  28. +0 −37 src/NHibernate.ProxyGenerators.CastleDynamicProxy/ProxyGenerators.build
  29. +0 −84 src/NHibernate.ProxyGenerators.LinFuDynamicProxy.Tests/App.config
  30. +0 −68 src/NHibernate.ProxyGenerators.LinFuDynamicProxy.Tests/DebugConnectionProvider.cs
  31. +0 −97 ...ProxyGenerators.LinFuDynamicProxy.Tests/NHibernate.ProxyGenerators.LinFuDynamicProxy.Tests.csproj
  32. +0 −44 src/NHibernate.ProxyGenerators.LinFuDynamicProxy.Tests/ProxyGenerators.Test.build
  33. +0 −11 src/NHibernate.ProxyGenerators.LinFuDynamicProxy.Tests/ProxyInterface/IMyProxy.cs
  34. +0 −30 src/NHibernate.ProxyGenerators.LinFuDynamicProxy.Tests/ProxyInterface/MyProxyImpl.cs
  35. +0 −137 src/NHibernate.ProxyGenerators.LinFuDynamicProxy.Tests/ProxyInterface/ProxyFixture.cs
  36. +0 −12 src/NHibernate.ProxyGenerators.LinFuDynamicProxy.Tests/ProxyInterface/ProxyImpl.hbm.xml
  37. +0 −323 src/NHibernate.ProxyGenerators.LinFuDynamicProxy.Tests/TestCase.cs
  38. +0 −40 src/NHibernate.ProxyGenerators.LinFuDynamicProxy.Tests/TestConfigurationHelper.cs
  39. +0 −49 src/NHibernate.ProxyGenerators.LinFuDynamicProxy/LazyInitializer.cs
  40. +0 −77 src/NHibernate.ProxyGenerators.LinFuDynamicProxy/NHibernate.ProxyGenerators.LinFuDynamicProxy.csproj
  41. +0 −74 src/NHibernate.ProxyGenerators.LinFuDynamicProxy/ProxyFactory.cs
  42. +0 −23 src/NHibernate.ProxyGenerators.LinFuDynamicProxy/ProxyFactoryFactory.cs
  43. +0 −36 src/NHibernate.ProxyGenerators.LinFuDynamicProxy/ProxyGenerators.build
  44. +0 −3 src/NHibernate.ProxyGenerators.LinFuDynamicProxy/app.config
  45. +2 −0 src/NHibernate.Test/App.config
  46. +10 −10 src/NHibernate.Test/DynamicEntity/DataProxyHandler.cs
  47. +17 −26 src/NHibernate.Test/DynamicEntity/ProxyHelper.cs
  48. +2 −3 src/NHibernate.Test/NHibernate.Test.build
  49. +8 −12 src/NHibernate.Test/NHibernate.Test.csproj
  50. +2 −14 src/NHibernate.sln
View
@@ -26,10 +26,10 @@
<include name="Iesi.Collections/Iesi.Collections.build" />
<include name="Iesi.Collections.Test/Iesi.Collections.Test.build" />
<include name="NHibernate/NHibernate.build" />
- <include name="NHibernate.ProxyGenerators.LinFuDynamicProxy/ProxyGenerators.build" />
- <include name="NHibernate.ProxyGenerators.LinFuDynamicProxy.Tests/ProxyGenerators.Test.build" />
- <include name="NHibernate.ProxyGenerators.CastleDynamicProxy/ProxyGenerators.build" />
- <include name="NHibernate.ProxyGenerators.CastleDynamicProxy.Tests/ProxyGenerators.Test.build" />
+ <include name="NHibernate.ByteCode.LinFu/ByteCode.build" />
+ <include name="NHibernate.ByteCode.LinFu.Tests/ByteCode.Test.build" />
+ <include name="NHibernate.ByteCode.Castle/ByteCode.build" />
+ <include name="NHibernate.ByteCode.Castle.Tests/ByteCode.Test.build" />
<include name="NHibernate.DomainModel/NHibernate.DomainModel.build" />
<include name="NHibernate.Test/NHibernate.Test.build" />
<include name="NHibernate.Test.Performance/NHibernate.Test.Performance.build" />
@@ -39,8 +39,8 @@
<fileset id="buildfiles.tests" basedir="src">
<include name="Iesi.Collections.Test/Iesi.Collections.Test.build" />
- <include name="NHibernate.ProxyGenerators.LinFuDynamicProxy.Tests/ProxyGenerators.Test.build" />
- <include name="NHibernate.ProxyGenerators.CastleDynamicProxy.Tests/ProxyGenerators.Test.build" />
+ <include name="NHibernate.ByteCode.LinFu.Tests/ByteCode.Test.build" />
+ <include name="NHibernate.ByteCode.Castle.Tests/ByteCode.Test.build" />
<include name="NHibernate.Test/NHibernate.Test.build" />
<include name="NHibernate.Test.Performance/NHibernate.Test.Performance.build"
if="${run.performance.tests}" />
@@ -89,10 +89,10 @@
-->
<exclude name="Iesi.Collections.dll" />
<exclude name="Iesi.Collections.xml" />
- <exclude name="NHibernate.ProxyGenerators.LinFuDynamicProxy.dll" />
- <exclude name="NHibernate.ProxyGenerators.LinFuDynamicProxy.xml" />
- <exclude name="NHibernate.ProxyGenerators.CastleDynamicProxy.dll" />
- <exclude name="NHibernate.ProxyGenerators.CastleDynamicProxy.xml" />
+ <exclude name="NHibernate.ByteCode.LinFuDynamicProxy.dll" />
+ <exclude name="NHibernate.ByteCode.LinFuDynamicProxy.xml" />
+ <exclude name="NHibernate.ByteCode.CastleDynamicProxy.dll" />
+ <exclude name="NHibernate.ByteCode.CastleDynamicProxy.xml" />
<include name="*.dll" />
<include name="*.xml" />
<include name="*.license.txt" />
View
@@ -2,15 +2,17 @@ Build 2.1.0.GA
========================
** BREAKING CHANGES from NH2.0.xGA to NH2.1.0
##### Run time #####
- * If you want work using lazy loading with Castle.DynamicProxy2 now you must deploy NHibernate.ProxyGenerators.CastleDynamicProxy.dll
+ * If you want work using lazy loading with LinFu.DynamicProxy now you must deploy NHibernate.ByteCode.LinFu.dll
+ * If you want work using lazy loading with Castle.DynamicProxy2 now you must deploy NHibernate.ByteCode.Castle.dll
##### Possible Breaking Changes for external frameworks #####
* ISession interface have additional methods
- * DefaultProxyFactoryFactory moved to NHibernate.Bytecode.Castle.ProxyFactoryFactory
+ * DefaultProxyFactoryFactory removed
* IProxyFactoryFactory now provide the IProxyValidator implementation
##### Initialization time #####
* The ProxyValidator check for "internal virtual" (to be intercepted by proxy need "protected internal virtual")
+ * The session-factory configuration property "proxyfactory.factory_class" is mandatory; You must choose one of the availables NHibernate.ByteCode
Build 2.0.1.GA
@@ -24,7 +24,8 @@ for your own use before compile tests in VisualStudio.
</property>
<property name="show_sql">false</property>
<property name="dialect">NHibernate.Dialect.FirebirdDialect</property>
- <property name="command_timeout">444</property>
+ <property name="command_timeout">60</property>
<property name="query.substitutions">true 1, false 0, yes 1, no 0</property>
+ <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property>
</session-factory>
</hibernate-configuration>
@@ -15,7 +15,8 @@ for your own use before compile tests in VisualStudio.
<property name="show_sql">false</property>
<property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property>
<property name="use_outer_join">true</property>
- <property name="command_timeout">444</property>
+ <property name="command_timeout">60</property>
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
+ <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property>
</session-factory>
</hibernate-configuration>
@@ -12,5 +12,6 @@ for your own use before compile tests in VisualStudio.
Database=test;Data Source=someip;User Id=blah;Password=blah
</property>
<property name="dialect">NHibernate.Dialect.MySQLDialect</property>
+ <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property>
</session-factory>
</hibernate-configuration>
@@ -14,5 +14,6 @@ for your own use before compile tests in VisualStudio.
<property name="show_sql">false</property>
<property name="dialect">NHibernate.Dialect.OracleDialect</property>
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
+ <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property>
</session-factory>
</hibernate-configuration>
@@ -11,5 +11,6 @@ for your own use before compile tests in VisualStudio.
Server=localhost;initial catalog=nhibernate;User ID=nhibernate;Password=nhibernate;
</property>
<property name="dialect">NHibernate.Dialect.PostgreSQLDialect</property>
+ <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property>
</session-factory>
</hibernate-configuration>
@@ -12,5 +12,6 @@ for your own use before compile tests in VisualStudio.
</property>
<property name="dialect">NHibernate.Dialect.SQLiteDialect</property>
<property name="query.substitutions">true=1;false=0</property>
+ <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property>
</session-factory>
</hibernate-configuration>
@@ -99,11 +99,15 @@ Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "NHibernate.Example.Web", "N
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.Tool.HbmXsd", "NHibernate.Tool.HbmXsd\NHibernate.Tool.HbmXsd.csproj", "{446E148D-A9D5-4D7D-A706-BEDD45B2BC7D}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Default proxy generator", "Default proxy generator", "{D2E4E87F-2531-4C7A-BBE9-FE8BFEDECECE}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ByteCode providers", "ByteCode providers", "{D2E4E87F-2531-4C7A-BBE9-FE8BFEDECECE}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.ProxyGenerators.CastleDynamicProxy", "NHibernate.ProxyGenerators.CastleDynamicProxy\NHibernate.ProxyGenerators.CastleDynamicProxy.csproj", "{31C3F0EA-0FED-4A2F-B68D-96CE29844487}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.ByteCode.Castle", "NHibernate.ByteCode.Castle\NHibernate.ByteCode.Castle.csproj", "{31C3F0EA-0FED-4A2F-B68D-96CE29844487}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.ProxyGenerators.CastleDynamicProxy.Tests", "NHibernate.ProxyGenerators.CastleDynamicProxy.Tests\NHibernate.ProxyGenerators.CastleDynamicProxy.Tests.csproj", "{4972EE96-2417-4D47-9FF1-3B1D6B1D3191}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.ByteCode.Castle.Tests", "NHibernate.ByteCode.Castle.Tests\NHibernate.ByteCode.Castle.Tests.csproj", "{4972EE96-2417-4D47-9FF1-3B1D6B1D3191}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.ByteCode.LinFu", "NHibernate.ByteCode.LinFu\NHibernate.ByteCode.LinFu.csproj", "{8289D6AD-9714-42D3-A94D-D4D9814D1281}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.ByteCode.LinFu.Tests", "NHibernate.ByteCode.LinFu.Tests\NHibernate.ByteCode.LinFu.Tests.csproj", "{94FDD99B-8275-4E51-8F43-958B2C632120}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -226,6 +230,26 @@ Global
{4972EE96-2417-4D47-9FF1-3B1D6B1D3191}.Release|Any CPU.Build.0 = Release|Any CPU
{4972EE96-2417-4D47-9FF1-3B1D6B1D3191}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{4972EE96-2417-4D47-9FF1-3B1D6B1D3191}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {8289D6AD-9714-42D3-A94D-D4D9814D1281}.Debug|.NET.ActiveCfg = Debug|Any CPU
+ {8289D6AD-9714-42D3-A94D-D4D9814D1281}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8289D6AD-9714-42D3-A94D-D4D9814D1281}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8289D6AD-9714-42D3-A94D-D4D9814D1281}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {8289D6AD-9714-42D3-A94D-D4D9814D1281}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {8289D6AD-9714-42D3-A94D-D4D9814D1281}.Release|.NET.ActiveCfg = Release|Any CPU
+ {8289D6AD-9714-42D3-A94D-D4D9814D1281}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8289D6AD-9714-42D3-A94D-D4D9814D1281}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8289D6AD-9714-42D3-A94D-D4D9814D1281}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {8289D6AD-9714-42D3-A94D-D4D9814D1281}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {94FDD99B-8275-4E51-8F43-958B2C632120}.Debug|.NET.ActiveCfg = Debug|Any CPU
+ {94FDD99B-8275-4E51-8F43-958B2C632120}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {94FDD99B-8275-4E51-8F43-958B2C632120}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {94FDD99B-8275-4E51-8F43-958B2C632120}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {94FDD99B-8275-4E51-8F43-958B2C632120}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {94FDD99B-8275-4E51-8F43-958B2C632120}.Release|.NET.ActiveCfg = Release|Any CPU
+ {94FDD99B-8275-4E51-8F43-958B2C632120}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {94FDD99B-8275-4E51-8F43-958B2C632120}.Release|Any CPU.Build.0 = Release|Any CPU
+ {94FDD99B-8275-4E51-8F43-958B2C632120}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {94FDD99B-8275-4E51-8F43-958B2C632120}.Release|Mixed Platforms.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -246,8 +270,10 @@ Global
{446E148D-A9D5-4D7D-A706-BEDD45B2BC7D} = {92509065-DAEA-4457-8300-C7B64CD0E9F4}
{4C251E3E-6EA1-4A51-BBCB-F9C42AE55344} = {C91E7018-3C67-4830-963A-C388C75E1BD5}
{58CE4584-31B9-4E74-A7FB-5D40BFAD0876} = {C91E7018-3C67-4830-963A-C388C75E1BD5}
- {31C3F0EA-0FED-4A2F-B68D-96CE29844487} = {D2E4E87F-2531-4C7A-BBE9-FE8BFEDECECE}
{4972EE96-2417-4D47-9FF1-3B1D6B1D3191} = {D2E4E87F-2531-4C7A-BBE9-FE8BFEDECECE}
+ {8289D6AD-9714-42D3-A94D-D4D9814D1281} = {D2E4E87F-2531-4C7A-BBE9-FE8BFEDECECE}
+ {94FDD99B-8275-4E51-8F43-958B2C632120} = {D2E4E87F-2531-4C7A-BBE9-FE8BFEDECECE}
+ {31C3F0EA-0FED-4A2F-B68D-96CE29844487} = {D2E4E87F-2531-4C7A-BBE9-FE8BFEDECECE}
EndGlobalSection
GlobalSection(TextTemplating) = postSolution
TextTemplating = 1
@@ -61,6 +61,7 @@
</property>
<property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property>
<property name="current_session_context_class">managed_web</property>
+ <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property>
</session-factory>
</hibernate-configuration>
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<configuration>
- <configSections>
- <section name="hibernate-configuration"
- type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
- <section name="log4net"
- type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
- </configSections>
-
- <!--
- hibernate-configuration section
-
- You don't need to change this section for your own use.
- You can write your own hibernate.cfg.xml to override all session-factory configuration.
- Templates are available in NHibernate.Config.Templates folder.
- -->
- <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
- <bytecode-provider type="lcg"/>
- <reflection-optimizer use="true"/>
- <session-factory name="NHibernate.Test">
- <property name="connection.provider">NHibernate.ProxyGenerators.CastleDynamicProxy.Tests.DebugConnectionProvider, NHibernate.ProxyGenerators.CastleDynamicProxy.Tests</property>
- <property name="cache.provider_class">NHibernate.Cache.HashtableCacheProvider, NHibernate</property>
- <property name="cache.use_query_cache">true</property>
- <property name="prepare_sql">false</property>
- <property name="query.startup_check">false</property>
- <property name="connection.isolation">ReadCommitted</property>
- <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
- <property name="connection.connection_string">
- Server=(local);initial catalog=nhibernate;Integrated Security=SSPI
- </property>
- <property name="show_sql">false</property>
- <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
- <property name="use_outer_join">true</property>
- <property name="command_timeout">10</property>
- <property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
- <property name="adonet.wrap_result_sets">false</property>
-
- <!-- This property is the default value in NH Core -->
- <property name="proxyfactory.factory_class">NHibernate.ProxyGenerators.CastleDynamicProxy.ProxyFactoryFactory, NHibernate.ProxyGenerators.CastleDynamicProxy</property>
-
- </session-factory>
- </hibernate-configuration>
-
- <!-- This section contains the log4net configuration settings -->
- <log4net debug="false">
-
- <!-- Define some output appenders -->
- <appender name="trace"
- type="log4net.Appender.TraceAppender, log4net">
- <layout type="log4net.Layout.PatternLayout,log4net">
- <param name="ConversionPattern"
- value="%d{ABSOLUTE} %-5p %c{1}:%L - %m%n" />
- </layout>
- </appender>
-
- <appender name="console"
- type="log4net.Appender.ConsoleAppender, log4net">
- <layout type="log4net.Layout.PatternLayout,log4net">
- <param name="ConversionPattern"
- value="%d{ABSOLUTE} %-5p %c{1}:%L - %m%n" />
- </layout>
- </appender>
-
- <appender name="rollingFile"
- type="log4net.Appender.RollingFileAppender,log4net" >
-
- <param name="File"
- value="log.txt" />
- <param name="AppendToFile"
- value="false" />
- <param name="RollingStyle"
- value="Date" />
- <param name="DatePattern"
- value="yyyy.MM.dd" />
- <param name="StaticLogFileName"
- value="true" />
-
- <layout type="log4net.Layout.PatternLayout,log4net">
- <param name="ConversionPattern"
- value="%d [%t] %-5p %c - %m%n" />
- </layout>
- </appender>
-
- <root>
- <priority value="WARN" />
- <appender-ref ref="console" />
- </root>
-
- <logger name="NHibernate">
- <priority value="ERROR" />
- </logger>
-
- <logger name="NHibernate.Tool.hbm2ddl.SchemaExport">
- <level value="ERROR" />
- </logger>
- </log4net>
-
-
-</configuration>
-
-
-
@@ -1,72 +0,0 @@
-using System.Collections;
-using System.Data;
-using Iesi.Collections;
-using NHibernate.Connection;
-
-namespace NHibernate.ProxyGenerators.CastleDynamicProxy.Tests
-{
- /// <summary>
- /// This connection provider keeps a list of all open connections,
- /// it is used when testing to check that tests clean up after themselves.
- /// </summary>
- public class DebugConnectionProvider : DriverConnectionProvider
- {
- private readonly ISet connections = new ListSet();
-
- public override IDbConnection GetConnection()
- {
- IDbConnection connection = base.GetConnection();
- connections.Add(connection);
- return connection;
- }
-
- public override void CloseConnection(IDbConnection conn)
- {
- base.CloseConnection(conn);
- connections.Remove(conn);
- }
-
- public bool HasOpenConnections
- {
- get
- {
- // check to see if all connections that were at one point opened
- // have been closed through the CloseConnection
- // method
- if (connections.IsEmpty)
- {
- // there are no connections, either none were opened or
- // all of the closings went through CloseConnection.
- return false;
- }
- else
- {
- // Disposing of an ISession does not call CloseConnection (should it???)
- // so a Diposed of ISession will leave an IDbConnection in the list but
- // the IDbConnection will be closed (atleast with MsSql it works this way).
- foreach (IDbConnection conn in connections)
- {
- if (conn.State != ConnectionState.Closed)
- {
- return true;
- }
- }
-
- // all of the connections have been Disposed and were closed that way
- // or they were Closed through the CloseConnection method.
- return false;
- }
- }
- }
-
- public void CloseAllConnections()
- {
- while (!connections.IsEmpty)
- {
- IEnumerator en = connections.GetEnumerator();
- en.MoveNext();
- CloseConnection(en.Current as IDbConnection);
- }
- }
- }
-}
Oops, something went wrong.

0 comments on commit 196a018

Please sign in to comment.