From: <te...@us...> - 2009-05-24 12:43:11
|
Revision: 4378 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4378&view=rev Author: tehlike Date: 2009-05-24 12:28:07 +0000 (Sun, 24 May 2009) Log Message: ----------- Improvements in Build files, now parameters for nh properties such as connection string is possible. Check sample build commands.txt for sample usages Modified Paths: -------------- trunk/nhibernate/build-common/common-project.xml trunk/nhibernate/build-common/nhibernate-properties.xml trunk/nhibernate/default.build trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.build Modified: trunk/nhibernate/build-common/common-project.xml =================================================================== --- trunk/nhibernate/build-common/common-project.xml 2009-05-24 10:13:22 UTC (rev 4377) +++ trunk/nhibernate/build-common/common-project.xml 2009-05-24 12:28:07 UTC (rev 4378) @@ -222,8 +222,11 @@ <target name="common.run-tests" description="Run NUnit tests"> + <exec program="${root.dir}/Tools/nunit/nunit-console-x86.exe"> + <arg line="${bin.dir}/${project::get-name()}.dll /xml=${bin.dir}/${project::get-name()}.dll.result.xml" /> + </exec> - <nunit2> + <!--<nunit2> <formatter type="Xml" usefile="true" @@ -233,7 +236,7 @@ <test assemblyname="${bin.dir}/${project::get-name()}.dll" appconfig="${bin.dir}/${project::get-name()}.dll.config" /> - </nunit2> + </nunit2>--> </target> @@ -250,21 +253,28 @@ <!-- Tell nhibernate how to connect to the test database. --> - <xmlpoke - file="${app.config}" - xpath="/configuration/nhibernate/add[@key='hibernate.dialect']/@value" - value="${nhibernate.dialect}" - /> - <xmlpoke - file="${app.config}" - xpath="/configuration/nhibernate/add[@key='hibernate.connection.driver_class']/@value" - value="${nhibernate.connection.driver_class}" - /> - <xmlpoke - file="${app.config}" - xpath="/configuration/nhibernate/add[@key='hibernate.connection.connection_string']/@value" - value="${nhibernate.connection.connection_string}" - /> + <xmlpoke file="${app.config}" + xpath="//*/hbm:property[@name='dialect']" + value="${nhibernate.dialect}"> + <namespaces> + <namespace prefix="hbm" uri="urn:nhibernate-configuration-2.2" /> + </namespaces> + </xmlpoke> + + <xmlpoke file="${app.config}" + xpath="//*/hbm:property[@name='connection.driver_class']" + value="${nhibernate.connection.driver_class}"> + <namespaces> + <namespace prefix="hbm" uri="urn:nhibernate-configuration-2.2" /> + </namespaces> + </xmlpoke> + <xmlpoke file="${app.config}" + xpath="//*/hbm:property[@name='connection.connection_string']" + value="${nhibernate.connection.connection_string}"> + <namespaces> + <namespace prefix="hbm" uri="urn:nhibernate-configuration-2.2" /> + </namespaces> + </xmlpoke> </target> <target name="common.remove-connection-settings-from-app-config"> Modified: trunk/nhibernate/build-common/nhibernate-properties.xml =================================================================== --- trunk/nhibernate/build-common/nhibernate-properties.xml 2009-05-24 10:13:22 UTC (rev 4377) +++ trunk/nhibernate/build-common/nhibernate-properties.xml 2009-05-24 12:28:07 UTC (rev 4378) @@ -1,6 +1,6 @@ <?xml version="1.0" ?> <project xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd"> - <property name="nhibernate.dialect" value="NHibernate.Dialect.MsSql2000Dialect" /> - <property name="nhibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver" /> - <property name="nhibernate.connection.connection_string" value="Server=(local);initial catalog=nhibernate;Integrated Security=SSPI" /> + <property name="nhibernate.dialect" value="NHibernate.Dialect.MsSql2005Dialect" overwrite="false"/> + <property name="nhibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver" overwrite="false"/> + <property name="nhibernate.connection.connection_string" value="Server=(local);initial catalog=nhibernate;Integrated Security=SSPI" overwrite="false"/> </project> Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2009-05-24 10:13:22 UTC (rev 4377) +++ trunk/nhibernate/default.build 2009-05-24 12:28:07 UTC (rev 4378) @@ -123,26 +123,9 @@ </target> <target name="test" depends="init build" description="Runs all NHibernate tests for the current framework" unless="${skip.tests}"> - <!-- <nant target="test"> <buildfiles refid="buildfiles.tests" /> </nant> - --> - <!-- --> - <foreach item="File" property="buildfile"> - <in> - <items refid="buildfiles.tests" /> - </in> - <do> - <exec program="nant.exe"> - <arg value="-f:${buildfile}" /> - <arg value="-t:${nant.settings.currentframework}" /> - <arg value="-D:project.config=${project.config}" /> - <arg value="test" /> - </exec> - </do> - </foreach> - <!-- --> </target> <target name="coverage-report" description="Builds the test coverage reports" Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.build =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.build 2009-05-24 10:13:22 UTC (rev 4377) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.build 2009-05-24 12:28:07 UTC (rev 4378) @@ -34,5 +34,5 @@ <copy file="TestEnbeddedConfig.cfg.xml" tofile="${bin.dir}/TestEnbeddedConfig.cfg.xml" /> <copy file="${root.dir}/src/NHibernate.DomainModel/ABC.hbm.xml" tofile="${bin.dir}/ABC.hbm.xml" /> </target> - <target name="test" depends="init build common.run-tests" /> + <target name="test" depends="init build common.run-database-tests" /> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-05-25 21:05:13
|
Revision: 4384 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4384&view=rev Author: tehlike Date: 2009-05-25 21:04:25 +0000 (Mon, 25 May 2009) Log Message: ----------- Initial teamcity build files. Added Paths: ----------- trunk/nhibernate/build-common/teamcity-hibernate.cfg.xml trunk/nhibernate/teamcity.build Added: trunk/nhibernate/build-common/teamcity-hibernate.cfg.xml =================================================================== --- trunk/nhibernate/build-common/teamcity-hibernate.cfg.xml (rev 0) +++ trunk/nhibernate/build-common/teamcity-hibernate.cfg.xml 2009-05-25 21:04:25 UTC (rev 4384) @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8" ?> +<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.Connection.DriverConnectionProvider</property> + <property name="cache.provider_class">NHibernate.Cache.HashtableCacheProvider, NHibernate</property> + <property name="cache.use_query_cache">true</property> + <property name="query.startup_check">false</property> + <!-- + The valid strings for Isolation can be found in the documentation for the System.Data.IsolationLevel + Enumeration documentation. + Use the member names - not the values. + --> + <property name="adonet.batch_size">10</property> + <property name="connection.isolation">ReadCommitted</property> + <property name="format_sql">true</property> + + <!-- This is the System.Data.dll provider for MSSQL Server --> + <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property> + <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property> + <property name="connection.connection_string">Server=.\SQLExpress;initial catalog=nhibernate;Integrated Security=SSPI</property> + <property name="show_sql">false</property> + <property name="use_outer_join">true</property> + <property name="command_timeout">444</property> + <property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property> + <property name="adonet.wrap_result_sets">false</property> + + <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property> + </session-factory> + </hibernate-configuration> \ No newline at end of file Added: trunk/nhibernate/teamcity.build =================================================================== --- trunk/nhibernate/teamcity.build (rev 0) +++ trunk/nhibernate/teamcity.build 2009-05-25 21:04:25 UTC (rev 4384) @@ -0,0 +1,18 @@ +<?xml version="1.0" ?> +<project name="NHibernate TeamCity Build" xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd" default="clean-configure-test"> + <property name="root.dir" value="." /> + <include buildfile="${root.dir}/default.build" /> + <!-- + <if test="${not property::exists('CCNetLabel') and not property::exists('build.number')}"> + <fail>This build file is for use with CruiseControl.NET or TeamCity</fail> + </if>--> + + <property name="build.number" value="${CCNetLabel}" if="${property::exists('CCNetLabel')}" /> + + <target name="clean-configure-test" depends="cleanall init copy-teamcity-configuration build test"> + + </target> + <target name="copy-teamcity-configuration"> + <copy file="build-common/teamcity-hibernate.cfg.xml" tofile="${bin.dir}/hibernate.cfg.xml" /> + </target> +</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-05-25 21:18:58
|
Revision: 4385 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4385&view=rev Author: tehlike Date: 2009-05-25 21:18:45 +0000 (Mon, 25 May 2009) Log Message: ----------- Work on test+teamcity integration. Modified Paths: -------------- trunk/nhibernate/teamcity.build Added Paths: ----------- trunk/nhibernate/Tools/nunit/addins/ Property changes on: trunk/nhibernate/Tools/nunit/addins ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: bugtraq:logregex + NH-\d+ Modified: trunk/nhibernate/teamcity.build =================================================================== --- trunk/nhibernate/teamcity.build 2009-05-25 21:04:25 UTC (rev 4384) +++ trunk/nhibernate/teamcity.build 2009-05-25 21:18:45 UTC (rev 4385) @@ -13,6 +13,7 @@ </target> <target name="copy-teamcity-configuration"> + <copy file="${teamcity.dotnet.nunitaddin}-2.5.0.dll" todir="${root.dir}/Tools/nunit/addins" /> <copy file="build-common/teamcity-hibernate.cfg.xml" tofile="${bin.dir}/hibernate.cfg.xml" /> </target> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-06-14 21:03:16
|
Revision: 4469 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4469&view=rev Author: fabiomaulo Date: 2009-06-14 21:01:41 +0000 (Sun, 14 Jun 2009) Log Message: ----------- Refactoring with Breaking Change BRAKING CHANGE: - see IParameterizedType Modified Paths: -------------- trunk/nhibernate/releasenotes.txt trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ResultSetMappingBinder.cs trunk/nhibernate/src/NHibernate/Mapping/SimpleValue.cs trunk/nhibernate/src/NHibernate/Type/CompositeCustomType.cs trunk/nhibernate/src/NHibernate/Type/CustomType.cs trunk/nhibernate/src/NHibernate/Type/TypeFactory.cs trunk/nhibernate/src/NHibernate/UserTypes/IParameterizedType.cs trunk/nhibernate/src/NHibernate.Test/TypeParameters/DefaultValueIntegerType.cs trunk/nhibernate/src/NHibernate.Test/UserCollection/Parameterized/DefaultableListType.cs Modified: trunk/nhibernate/releasenotes.txt =================================================================== --- trunk/nhibernate/releasenotes.txt 2009-06-14 19:51:40 UTC (rev 4468) +++ trunk/nhibernate/releasenotes.txt 2009-06-14 21:01:41 UTC (rev 4469) @@ -31,6 +31,7 @@ * Obsolete ORACLE dialects was removed (new implementations are available) * ISQLExceptionConverter was changed in order to have more flexibility about information available for the conversion and followed management. * ADOException now use string instead SqlString + * IParameterizedType is using IDictionary<string, string> Build 2.1.0.Beta1 (rev4424) ============================= Modified: trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs 2009-06-14 19:51:40 UTC (rev 4468) +++ trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs 2009-06-14 21:01:41 UTC (rev 4469) @@ -1231,7 +1231,7 @@ { IType type; - IDictionary parameters = null; + IDictionary<string, string> parameters = null; XmlAttribute typeAttribute = node.Attributes["type"]; if (typeAttribute == null) @@ -1246,7 +1246,7 @@ return null; XmlAttribute nameAttribute = typeNode.Attributes["name"]; //we know it exists because the schema validate it typeName = nameAttribute.Value; - parameters = new Hashtable(); + parameters = new Dictionary<string, string>(); foreach (XmlNode childNode in typeNode.ChildNodes) parameters.Add(childNode.Attributes["name"].Value, childNode.InnerText.Trim()); Modified: trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ResultSetMappingBinder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ResultSetMappingBinder.cs 2009-06-14 19:51:40 UTC (rev 4468) +++ trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ResultSetMappingBinder.cs 2009-06-14 21:01:41 UTC (rev 4469) @@ -88,7 +88,7 @@ typeName = returnScalarSchema.type; } - IType type = TypeFactory.HeuristicType(typeName, (IDictionary) parameters); + IType type = TypeFactory.HeuristicType(typeName, parameters); if (type == null) throw new MappingException("could not interpret type: " + returnScalarSchema.type); Modified: trunk/nhibernate/src/NHibernate/Mapping/SimpleValue.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Mapping/SimpleValue.cs 2009-06-14 19:51:40 UTC (rev 4468) +++ trunk/nhibernate/src/NHibernate/Mapping/SimpleValue.cs 2009-06-14 21:01:41 UTC (rev 4469) @@ -228,7 +228,7 @@ { throw new MappingException("No type name specified"); } - type = TypeFactory.HeuristicType(typeName, (IDictionary)typeParameters); + type = TypeFactory.HeuristicType(typeName, typeParameters); if (type == null) { string msg = "Could not determine type for: " + typeName; Modified: trunk/nhibernate/src/NHibernate/Type/CompositeCustomType.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Type/CompositeCustomType.cs 2009-06-14 19:51:40 UTC (rev 4468) +++ trunk/nhibernate/src/NHibernate/Type/CompositeCustomType.cs 2009-06-14 21:01:41 UTC (rev 4469) @@ -7,6 +7,7 @@ using NHibernate.Engine; using NHibernate.SqlTypes; using NHibernate.UserTypes; +using System.Collections.Generic; namespace NHibernate.Type { @@ -19,7 +20,7 @@ private readonly ICompositeUserType userType; private readonly string name; - public CompositeCustomType(System.Type userTypeClass, IDictionary parameters) + public CompositeCustomType(System.Type userTypeClass, IDictionary<string, string> parameters) { name = userTypeClass.FullName; Modified: trunk/nhibernate/src/NHibernate/Type/CustomType.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Type/CustomType.cs 2009-06-14 19:51:40 UTC (rev 4468) +++ trunk/nhibernate/src/NHibernate/Type/CustomType.cs 2009-06-14 21:01:41 UTC (rev 4469) @@ -8,6 +8,7 @@ using NHibernate.SqlTypes; using NHibernate.UserTypes; using NHibernate.Util; +using System.Collections.Generic; namespace NHibernate.Type { @@ -28,7 +29,7 @@ get { return userType; } } - public CustomType(System.Type userTypeClass, IDictionary parameters) + public CustomType(System.Type userTypeClass, IDictionary<string, string> parameters) { name = userTypeClass.Name; Modified: trunk/nhibernate/src/NHibernate/Type/TypeFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Type/TypeFactory.cs 2009-06-14 19:51:40 UTC (rev 4468) +++ trunk/nhibernate/src/NHibernate/Type/TypeFactory.cs 2009-06-14 21:01:41 UTC (rev 4469) @@ -363,7 +363,6 @@ return name + "(" + precision + ", " + scale + ")"; } - /// <summary> /// Uses heuristics to deduce a NHibernate type given a string naming the /// type. @@ -390,7 +389,7 @@ /// <param name="typeName">the type name</param> /// <param name="parameters">parameters for the type</param> /// <returns>An instance of <c>NHibernate.Type.IType</c></returns> - public static IType HeuristicType(string typeName, IDictionary parameters) + public static IType HeuristicType(string typeName, IDictionary<string, string> parameters) { IType type = Basic(typeName); @@ -1089,16 +1088,16 @@ CustomCollectionType result = new CustomCollectionType(typeClass, role, propertyRef, embedded); if (typeParameters != null) { - InjectParameters(result.UserType, (IDictionary)typeParameters); + InjectParameters(result.UserType, typeParameters); } return result; } - public static void InjectParameters(Object type, IDictionary parameters) + public static void InjectParameters(Object type, IDictionary<string, string> parameters) { if (type is IParameterizedType) { - ((IParameterizedType)type).SetParameterValues(parameters); + ((IParameterizedType) type).SetParameterValues(parameters); } else if (parameters != null && !(parameters.Count == 0)) { Modified: trunk/nhibernate/src/NHibernate/UserTypes/IParameterizedType.cs =================================================================== --- trunk/nhibernate/src/NHibernate/UserTypes/IParameterizedType.cs 2009-06-14 19:51:40 UTC (rev 4468) +++ trunk/nhibernate/src/NHibernate/UserTypes/IParameterizedType.cs 2009-06-14 21:01:41 UTC (rev 4469) @@ -1,5 +1,4 @@ -using System; -using System.Collections; +using System.Collections.Generic; namespace NHibernate.UserTypes { @@ -14,6 +13,6 @@ /// Gets called by Hibernate to pass the configured type parameters to /// the implementation. /// </summary> - void SetParameterValues(IDictionary parameters); + void SetParameterValues(IDictionary<string, string> parameters); } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/TypeParameters/DefaultValueIntegerType.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/TypeParameters/DefaultValueIntegerType.cs 2009-06-14 19:51:40 UTC (rev 4468) +++ trunk/nhibernate/src/NHibernate.Test/TypeParameters/DefaultValueIntegerType.cs 2009-06-14 21:01:41 UTC (rev 4469) @@ -1,9 +1,9 @@ using System; -using System.Collections; using System.Data; using NHibernate.SqlTypes; using NHibernate.Type; using NHibernate.UserTypes; +using System.Collections.Generic; namespace NHibernate.Test.TypeParameters { @@ -12,9 +12,9 @@ private int defaultValue; private static NullableType _int32Type = NHibernateUtil.Int32; - public void SetParameterValues(IDictionary parameters) + public void SetParameterValues(IDictionary<string, string> parameters) { - defaultValue = int.Parse((string) parameters["default"]); + defaultValue = int.Parse(parameters["default"]); } #region IUserType Members Modified: trunk/nhibernate/src/NHibernate.Test/UserCollection/Parameterized/DefaultableListType.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/UserCollection/Parameterized/DefaultableListType.cs 2009-06-14 19:51:40 UTC (rev 4468) +++ trunk/nhibernate/src/NHibernate.Test/UserCollection/Parameterized/DefaultableListType.cs 2009-06-14 21:01:41 UTC (rev 4469) @@ -4,6 +4,7 @@ using NHibernate.Persister.Collection; using NHibernate.UserTypes; using System; +using System.Collections.Generic; namespace NHibernate.Test.UserCollection.Parameterized { @@ -68,9 +69,9 @@ #region Implementation of IParameterizedType - public void SetParameterValues(IDictionary parameters) + public void SetParameterValues(IDictionary<string, string> parameters) { - defaultValue = parameters["default"] as string; + defaultValue = parameters["default"]; } #endregion This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-06-21 15:03:40
|
Revision: 4506 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4506&view=rev Author: fabiomaulo Date: 2009-06-21 15:03:38 +0000 (Sun, 21 Jun 2009) Log Message: ----------- trunk target to .NET3.5 Modified Paths: -------------- trunk/nhibernate/default.build trunk/nhibernate/lib/net/3.5/Iesi.Collections.dll trunk/nhibernate/src/Iesi.Collections.Test/Iesi.Collections.Test.csproj trunk/nhibernate/src/NHibernate/NHibernate.csproj trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/NHibernate.ByteCode.Castle.Tests.csproj trunk/nhibernate/src/NHibernate.ByteCode.LinFu/NHibernate.ByteCode.LinFu.csproj trunk/nhibernate/src/NHibernate.ByteCode.LinFu.Tests/NHibernate.ByteCode.LinFu.Tests.csproj trunk/nhibernate/src/NHibernate.ByteCode.Spring/NHibernate.ByteCode.Spring.csproj trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/NHibernate.ByteCode.Spring.Tests.csproj trunk/nhibernate/src/NHibernate.DomainModel/NHibernate.DomainModel.csproj trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Example.Web/Bin/Antlr3.Runtime.dll.refresh trunk/nhibernate/src/NHibernate.Example.Web/Bin/Iesi.Collections.dll.refresh trunk/nhibernate/src/NHibernate.Example.Web/Bin/LinFu.DynamicProxy.dll.refresh trunk/nhibernate/src/NHibernate.Example.Web/Bin/log4net.dll.refresh Removed Paths: ------------- trunk/nhibernate/lib/net/2.0/ trunk/nhibernate/src/NHibernate.Example.Web/Bin/log4net.dll.refresh Property Changed: ---------------- trunk/nhibernate/src/Iesi.Collections.Test/ Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2009-06-21 13:25:11 UTC (rev 4505) +++ trunk/nhibernate/default.build 2009-06-21 15:03:38 UTC (rev 4506) @@ -16,7 +16,7 @@ Supported versions of .NET Framework, separated by spaces. Used by *-all-frameworks targets. --> - <property name="supported.frameworks" value="net-2.0" /> + <property name="supported.frameworks" value="net-3.5" /> <fileset id="buildfiles.all" basedir="src"> <!-- Files have to be in dependency order --> @@ -110,7 +110,7 @@ <target name="check-framework-version"> <echo>Running with ${framework::get-target-framework()}</echo> - <fail message="ERROR: NHibernate requires .Net 3.5 to compile (but can run on .Net 2.0), please use the -t:net-3.5 parameter when starting nant" if="${framework::get-target-framework()!='net-3.5'}"/> + <fail message="ERROR: NHibernate requires .Net 3.5." if="${framework::get-target-framework()!='net-3.5'}"/> </target> <target name="test-report" if="${nunit2report.installed}"> Modified: trunk/nhibernate/lib/net/3.5/Iesi.Collections.dll =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/src/Iesi.Collections.Test ___________________________________________________________________ Modified: svn:ignore - bin obj AssemblyInfo.cs [Bb]in [Dd]ebug [Rr]elease *.user *.aps *.eto + bin obj AssemblyInfo.cs [Bb]in [Dd]ebug [Rr]elease *.user *.aps *.eto *resharper* Modified: trunk/nhibernate/src/Iesi.Collections.Test/Iesi.Collections.Test.csproj =================================================================== --- trunk/nhibernate/src/Iesi.Collections.Test/Iesi.Collections.Test.csproj 2009-06-21 13:25:11 UTC (rev 4505) +++ trunk/nhibernate/src/Iesi.Collections.Test/Iesi.Collections.Test.csproj 2009-06-21 15:03:38 UTC (rev 4506) @@ -14,6 +14,7 @@ <OldToolsVersion>2.0</OldToolsVersion> <UpgradeBackupLocation> </UpgradeBackupLocation> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -37,11 +38,14 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="nunit.framework, Version=2.2.0.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77"> + <Reference Include="nunit.framework, Version=2.5.0.9122, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\nunit.framework.dll</HintPath> + <HintPath>..\..\lib\net\3.5\nunit.framework.dll</HintPath> </Reference> <Reference Include="System" /> + <Reference Include="System.Core"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> </ItemGroup> Modified: trunk/nhibernate/src/NHibernate/NHibernate.csproj =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-06-21 13:25:11 UTC (rev 4505) +++ trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-06-21 15:03:38 UTC (rev 4506) @@ -14,7 +14,7 @@ <OldToolsVersion>2.0</OldToolsVersion> <UpgradeBackupLocation> </UpgradeBackupLocation> - <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkSubset> </TargetFrameworkSubset> </PropertyGroup> @@ -45,18 +45,21 @@ <ItemGroup> <Reference Include="Antlr3.Runtime, Version=3.1.0.39271, Culture=neutral, PublicKeyToken=3a9cab8f8d22bfb7, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\Antlr3.Runtime.dll</HintPath> + <HintPath>..\..\lib\net\3.5\Antlr3.Runtime.dll</HintPath> </Reference> - <Reference Include="Iesi.Collections, Version=1.0.0.1, Culture=neutral, PublicKeyToken=154fdcb44c4484fc"> + <Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\Iesi.Collections.dll</HintPath> + <HintPath>..\..\lib\net\3.5\Iesi.Collections.dll</HintPath> </Reference> - <Reference Include="log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905"> + <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\log4net.dll</HintPath> + <HintPath>..\..\lib\net\3.5\log4net.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.configuration" /> + <Reference Include="System.Core"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> <Reference Include="System.Data" /> <Reference Include="System.Data.OracleClient" /> <Reference Include="System.Transactions" /> Modified: trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj 2009-06-21 13:25:11 UTC (rev 4505) +++ trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj 2009-06-21 15:03:38 UTC (rev 4506) @@ -33,21 +33,21 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="Castle.Core, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> + <Reference Include="Castle.Core, Version=1.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\Castle.Core.dll</HintPath> + <HintPath>..\..\lib\net\3.5\Castle.Core.dll</HintPath> </Reference> <Reference Include="Castle.DynamicProxy2, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\Castle.DynamicProxy2.dll</HintPath> + <HintPath>..\..\lib\net\3.5\Castle.DynamicProxy2.dll</HintPath> </Reference> - <Reference Include="Iesi.Collections, Version=1.0.0.3, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL"> + <Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\Iesi.Collections.dll</HintPath> + <HintPath>..\..\lib\net\3.5\Iesi.Collections.dll</HintPath> </Reference> <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\log4net.dll</HintPath> + <HintPath>..\..\lib\net\3.5\log4net.dll</HintPath> </Reference> <Reference Include="System" /> </ItemGroup> Modified: trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/NHibernate.ByteCode.Castle.Tests.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/NHibernate.ByteCode.Castle.Tests.csproj 2009-06-21 13:25:11 UTC (rev 4505) +++ trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/NHibernate.ByteCode.Castle.Tests.csproj 2009-06-21 15:03:38 UTC (rev 4506) @@ -33,25 +33,25 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="Castle.Core, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> + <Reference Include="Castle.Core, Version=1.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\Castle.Core.dll</HintPath> + <HintPath>..\..\lib\net\3.5\Castle.Core.dll</HintPath> </Reference> <Reference Include="Castle.DynamicProxy2, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\Castle.DynamicProxy2.dll</HintPath> + <HintPath>..\..\lib\net\3.5\Castle.DynamicProxy2.dll</HintPath> </Reference> - <Reference Include="Iesi.Collections, Version=1.0.0.3, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL"> + <Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\Iesi.Collections.dll</HintPath> + <HintPath>..\..\lib\net\3.5\Iesi.Collections.dll</HintPath> </Reference> <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\log4net.dll</HintPath> + <HintPath>..\..\lib\net\3.5\log4net.dll</HintPath> </Reference> - <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> + <Reference Include="nunit.framework, Version=2.5.0.9122, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\nunit.framework.dll</HintPath> + <HintPath>..\..\lib\net\3.5\nunit.framework.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> Modified: trunk/nhibernate/src/NHibernate.ByteCode.LinFu/NHibernate.ByteCode.LinFu.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.LinFu/NHibernate.ByteCode.LinFu.csproj 2009-06-21 13:25:11 UTC (rev 4505) +++ trunk/nhibernate/src/NHibernate.ByteCode.LinFu/NHibernate.ByteCode.LinFu.csproj 2009-06-21 15:03:38 UTC (rev 4506) @@ -37,9 +37,9 @@ <SpecificVersion>False</SpecificVersion> <HintPath>..\..\lib\net\3.5\Iesi.Collections.dll</HintPath> </Reference> - <Reference Include="LinFu.DynamicProxy, Version=1.0.3232.29886, Culture=neutral, PublicKeyToken=62a6874124340d6e, processorArchitecture=MSIL"> + <Reference Include="LinFu.DynamicProxy, Version=1.0.3.14911, Culture=neutral, PublicKeyToken=62a6874124340d6e, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\LinFu.DynamicProxy.dll</HintPath> + <HintPath>..\..\lib\net\3.5\LinFu.DynamicProxy.dll</HintPath> </Reference> <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> Modified: trunk/nhibernate/src/NHibernate.ByteCode.LinFu.Tests/NHibernate.ByteCode.LinFu.Tests.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.LinFu.Tests/NHibernate.ByteCode.LinFu.Tests.csproj 2009-06-21 13:25:11 UTC (rev 4505) +++ trunk/nhibernate/src/NHibernate.ByteCode.LinFu.Tests/NHibernate.ByteCode.LinFu.Tests.csproj 2009-06-21 15:03:38 UTC (rev 4506) @@ -37,15 +37,15 @@ <SpecificVersion>False</SpecificVersion> <HintPath>..\..\lib\net\3.5\Iesi.Collections.dll</HintPath> </Reference> - <Reference Include="LinFu.DynamicProxy, Version=1.0.3232.29886, Culture=neutral, PublicKeyToken=62a6874124340d6e, processorArchitecture=MSIL"> + <Reference Include="LinFu.DynamicProxy, Version=1.0.3.14911, Culture=neutral, PublicKeyToken=62a6874124340d6e, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\LinFu.DynamicProxy.dll</HintPath> + <HintPath>..\..\lib\net\3.5\LinFu.DynamicProxy.dll</HintPath> </Reference> <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\lib\net\3.5\log4net.dll</HintPath> </Reference> - <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> + <Reference Include="nunit.framework, Version=2.5.0.9122, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\lib\net\3.5\nunit.framework.dll</HintPath> </Reference> Modified: trunk/nhibernate/src/NHibernate.ByteCode.Spring/NHibernate.ByteCode.Spring.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring/NHibernate.ByteCode.Spring.csproj 2009-06-21 13:25:11 UTC (rev 4505) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring/NHibernate.ByteCode.Spring.csproj 2009-06-21 15:03:38 UTC (rev 4506) @@ -49,11 +49,11 @@ <SpecificVersion>False</SpecificVersion> <HintPath>..\..\lib\net\3.5\log4net.dll</HintPath> </Reference> - <Reference Include="Spring.Aop, Version=1.2.0.20001, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Spring.Aop, Version=0.0.0.20110, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\lib\net\3.5\Spring.Aop.dll</HintPath> </Reference> - <Reference Include="Spring.Core, Version=1.2.0.20001, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Spring.Core, Version=0.0.0.20110, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\lib\net\3.5\Spring.Core.dll</HintPath> </Reference> Modified: trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/NHibernate.ByteCode.Spring.Tests.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/NHibernate.ByteCode.Spring.Tests.csproj 2009-06-21 13:25:11 UTC (rev 4505) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/NHibernate.ByteCode.Spring.Tests.csproj 2009-06-21 15:03:38 UTC (rev 4506) @@ -49,15 +49,15 @@ <SpecificVersion>False</SpecificVersion> <HintPath>..\..\lib\net\3.5\log4net.dll</HintPath> </Reference> - <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> + <Reference Include="nunit.framework, Version=2.5.0.9122, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\lib\net\3.5\nunit.framework.dll</HintPath> </Reference> - <Reference Include="Spring.Aop, Version=1.2.0.20001, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Spring.Aop, Version=0.0.0.20110, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\lib\net\3.5\Spring.Aop.dll</HintPath> </Reference> - <Reference Include="Spring.Core, Version=1.2.0.20001, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Spring.Core, Version=0.0.0.20110, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\lib\net\3.5\Spring.Core.dll</HintPath> </Reference> Modified: trunk/nhibernate/src/NHibernate.DomainModel/NHibernate.DomainModel.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.DomainModel/NHibernate.DomainModel.csproj 2009-06-21 13:25:11 UTC (rev 4505) +++ trunk/nhibernate/src/NHibernate.DomainModel/NHibernate.DomainModel.csproj 2009-06-21 15:03:38 UTC (rev 4506) @@ -37,9 +37,9 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="Iesi.Collections, Version=1.0.0.1, Culture=neutral, PublicKeyToken=154fdcb44c4484fc"> + <Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\Iesi.Collections.dll</HintPath> + <HintPath>..\..\lib\net\3.5\Iesi.Collections.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> Added: trunk/nhibernate/src/NHibernate.Example.Web/Bin/Antlr3.Runtime.dll.refresh =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/src/NHibernate.Example.Web/Bin/Antlr3.Runtime.dll.refresh ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/nhibernate/src/NHibernate.Example.Web/Bin/Iesi.Collections.dll.refresh =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/src/NHibernate.Example.Web/Bin/Iesi.Collections.dll.refresh ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/nhibernate/src/NHibernate.Example.Web/Bin/LinFu.DynamicProxy.dll.refresh =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/src/NHibernate.Example.Web/Bin/LinFu.DynamicProxy.dll.refresh ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: trunk/nhibernate/src/NHibernate.Example.Web/Bin/log4net.dll.refresh =================================================================== (Binary files differ) Added: trunk/nhibernate/src/NHibernate.Example.Web/Bin/log4net.dll.refresh =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/src/NHibernate.Example.Web/Bin/log4net.dll.refresh ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-06-21 13:25:11 UTC (rev 4505) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-06-21 15:03:38 UTC (rev 4506) @@ -14,7 +14,7 @@ <OldToolsVersion>2.0</OldToolsVersion> <UpgradeBackupLocation> </UpgradeBackupLocation> - <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkSubset> </TargetFrameworkSubset> </PropertyGroup> @@ -44,30 +44,29 @@ <ItemGroup> <Reference Include="Antlr3.Runtime, Version=3.1.0.39271, Culture=neutral, PublicKeyToken=3a9cab8f8d22bfb7, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\Antlr3.Runtime.dll</HintPath> + <HintPath>..\..\lib\net\3.5\Antlr3.Runtime.dll</HintPath> </Reference> - <Reference Include="Iesi.Collections, Version=1.0.0.1, Culture=neutral, PublicKeyToken=154fdcb44c4484fc"> + <Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\Iesi.Collections.dll</HintPath> + <HintPath>..\..\lib\net\3.5\Iesi.Collections.dll</HintPath> </Reference> - <Reference Include="LinFu.DynamicProxy, Version=1.0.3233.760, Culture=neutral, PublicKeyToken=62a6874124340d6e, processorArchitecture=MSIL"> + <Reference Include="LinFu.DynamicProxy, Version=1.0.3.14911, Culture=neutral, PublicKeyToken=62a6874124340d6e, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\LinFu.DynamicProxy.dll</HintPath> + <HintPath>..\..\lib\net\3.5\LinFu.DynamicProxy.dll</HintPath> </Reference> - <Reference Include="log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905"> + <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\log4net.dll</HintPath> + <HintPath>..\..\lib\net\3.5\log4net.dll</HintPath> </Reference> - <Reference Include="nunit.core, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> + <Reference Include="nunit.framework, Version=2.5.0.9122, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\nunit.core.dll</HintPath> + <HintPath>..\..\lib\net\3.5\nunit.framework.dll</HintPath> </Reference> - <Reference Include="nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\2.0\nunit.framework.dll</HintPath> - </Reference> <Reference Include="System" /> <Reference Include="System.configuration" /> + <Reference Include="System.Core"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> <Reference Include="System.Data" /> <Reference Include="System.Data.OracleClient" /> <Reference Include="System.Transactions" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ric...@us...> - 2009-06-22 22:01:06
|
Revision: 4510 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4510&view=rev Author: RicBrown Date: 2009-06-22 22:00:03 +0000 (Mon, 22 Jun 2009) Log Message: ----------- First test and overload for ICriteria Lambda overloads. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/ICriteria.cs trunk/nhibernate/src/NHibernate/Impl/CriteriaImpl.cs trunk/nhibernate/src/NHibernate/NHibernate.csproj trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.build trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/lib/net/3.5/Rhino.Mocks.acknowledgements.txt trunk/nhibernate/lib/net/3.5/Rhino.Mocks.dll trunk/nhibernate/lib/net/3.5/Rhino.Mocks.license.txt trunk/nhibernate/lib/net/3.5/Rhino.Mocks.xml trunk/nhibernate/src/NHibernate/Impl/ExpressionProcessor.cs trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/ trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/CriteriaFixture.cs trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/LambdaFixtureBase.cs trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/Model.cs Added: trunk/nhibernate/lib/net/3.5/Rhino.Mocks.acknowledgements.txt =================================================================== --- trunk/nhibernate/lib/net/3.5/Rhino.Mocks.acknowledgements.txt (rev 0) +++ trunk/nhibernate/lib/net/3.5/Rhino.Mocks.acknowledgements.txt 2009-06-22 22:00:03 UTC (rev 4510) @@ -0,0 +1,2 @@ +Rhino Mocks is using Castle Dynamic Proxy (http://www.castleproject.org/dynamicproxy/index.html) to handle proxying the types it needs to mock. +The Dynamic Proxy project has been invaluable resource and made creating Rhino Mocks possible. \ No newline at end of file Added: trunk/nhibernate/lib/net/3.5/Rhino.Mocks.dll =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/lib/net/3.5/Rhino.Mocks.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/nhibernate/lib/net/3.5/Rhino.Mocks.license.txt =================================================================== --- trunk/nhibernate/lib/net/3.5/Rhino.Mocks.license.txt (rev 0) +++ trunk/nhibernate/lib/net/3.5/Rhino.Mocks.license.txt 2009-06-22 22:00:03 UTC (rev 4510) @@ -0,0 +1,25 @@ +Copyright (c) 2005 - 2008 Ayende Rahien (ay...@ay...) +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of Ayende Rahien nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file Added: trunk/nhibernate/lib/net/3.5/Rhino.Mocks.xml =================================================================== --- trunk/nhibernate/lib/net/3.5/Rhino.Mocks.xml (rev 0) +++ trunk/nhibernate/lib/net/3.5/Rhino.Mocks.xml 2009-06-22 22:00:03 UTC (rev 4510) @@ -0,0 +1,5206 @@ +<?xml version="1.0"?> +<doc> + <assembly> + <name>Rhino.Mocks.Partial</name> + </assembly> + <members> + <member name="T:Rhino.Mocks.Constraints.AbstractConstraint"> + <summary> + Interface for constraints + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.AbstractConstraint.Eval(System.Object)"> + <summary> + determains if the object pass the constraints + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.AbstractConstraint.op_BitwiseAnd(Rhino.Mocks.Constraints.AbstractConstraint,Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + And operator for constraints + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.AbstractConstraint.op_LogicalNot(Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Not operator for constraints + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.AbstractConstraint.op_BitwiseOr(Rhino.Mocks.Constraints.AbstractConstraint,Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Or operator for constraints + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.AbstractConstraint.op_False(Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Allow overriding of || or && + </summary> + <param name="c"></param> + <returns></returns> + </member> + <member name="M:Rhino.Mocks.Constraints.AbstractConstraint.op_True(Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Allow overriding of || or && + </summary> + <param name="c"></param> + <returns></returns> + </member> + <member name="P:Rhino.Mocks.Constraints.AbstractConstraint.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="M:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.#ctor(System.Object)"> + <summary> + Initializes a new constraint object. + </summary> + <param name="expected">The expected object, The actual object is passed in as a parameter to the <see cref="M:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.Eval(System.Object)"/> method</param> + </member> + <member name="M:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.Eval(System.Object)"> + <summary> + Evaluate this constraint. + </summary> + <param name="obj">The actual object that was passed in the method call to the mock.</param> + <returns>True when the constraint is met, else false.</returns> + </member> + <member name="M:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.CheckReferenceType(System.Object,System.Object)"> + <summary> + Checks if the properties of the <paramref name="actual"/> object + are the same as the properies of the <paramref name="expected"/> object. + </summary> + <param name="expected">The expected object</param> + <param name="actual">The actual object</param> + <returns>True when both objects have the same values, else False.</returns> + </member> + <member name="M:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.CheckValue(System.Object,System.Object)"> + <summary> + + </summary> + <param name="expected"></param> + <param name="actual"></param> + <returns></returns> + <remarks>This is the real heart of the beast.</remarks> + </member> + <member name="M:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.CheckProperties(System.Object,System.Object)"> + <summary> + Used by CheckReferenceType to check all properties of the reference type. + </summary> + <param name="expected">The expected object</param> + <param name="actual">The actual object</param> + <returns>True when both objects have the same values, else False.</returns> + </member> + <member name="M:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.CheckFields(System.Object,System.Object)"> + <summary> + Used by CheckReferenceType to check all fields of the reference type. + </summary> + <param name="expected">The expected object</param> + <param name="actual">The actual object</param> + <returns>True when both objects have the same values, else False.</returns> + </member> + <member name="M:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.CheckCollection(System.Collections.IEnumerable,System.Collections.IEnumerable)"> + <summary> + Checks the items of both collections + </summary> + <param name="expectedCollection">The expected collection</param> + <param name="actualCollection"></param> + <returns>True if both collections contain the same items in the same order.</returns> + </member> + <member name="M:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.BuildPropertyName"> + <summary> + Builds a propertyname from the Stack _properties like 'Order.Product.Price' + to be used in the error message. + </summary> + <returns>A nested property name.</returns> + </member> + <member name="P:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.Message"> + <summary> + Rhino.Mocks uses this property to generate an error message. + </summary> + <value> + A message telling the tester why the constraint failed. + </value> + </member> + <member name="T:Rhino.Mocks.Constraints.PublicFieldIs"> + <summary> + Constrain that the public field has a specified value + </summary> + </member> + <member name="T:Rhino.Mocks.Constraints.PublicFieldConstraint"> + <summary> + Constrain that the public field matches another constraint. + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.PublicFieldConstraint.#ctor(System.String,Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.PublicFieldConstraint"/> instance. + </summary> + <param name="publicFieldName">Name of the public field.</param> + <param name="constraint">Constraint to place on the public field value.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.PublicFieldConstraint.#ctor(System.Type,System.String,Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.PublicFieldConstraint"/> instance, specifying a disambiguating + <paramref name="declaringType"/> for the public field. + </summary> + <param name="declaringType">The type that declares the public field, used to disambiguate between public fields.</param> + <param name="publicFieldName">Name of the public field.</param> + <param name="constraint">Constraint to place on the public field value.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.PublicFieldConstraint.Eval(System.Object)"> + <summary> + Determines if the object passes the constraint. + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.PublicFieldConstraint.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="M:Rhino.Mocks.Constraints.PublicFieldIs.#ctor(System.String,System.Object)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.PublicFieldIs"/> instance. + </summary> + <param name="publicFieldName">Name of the public field.</param> + <param name="expectedValue">Expected value.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.PublicFieldIs.#ctor(System.Type,System.String,System.Object)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.PublicFieldIs"/> instance, specifying a disambiguating + <paramref name="declaringType"/> for the public field. + </summary> + <param name="declaringType">The type that declares the public field, used to disambiguate between public fields.</param> + <param name="publicFieldName">Name of the public field.</param> + <param name="expectedValue">Expected value.</param> + </member> + <member name="T:Rhino.Mocks.Constraints.PropertyIs"> + <summary> + Constrain that the property has a specified value + </summary> + </member> + <member name="T:Rhino.Mocks.Constraints.PropertyConstraint"> + <summary> + Constrain that the property matches another constraint. + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.PropertyConstraint.#ctor(System.String,Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.PropertyConstraint"/> instance. + </summary> + <param name="propertyName">Name of the property.</param> + <param name="constraint">Constraint to place on the property value.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.PropertyConstraint.#ctor(System.Type,System.String,Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.PropertyConstraint"/> instance, specifying a disambiguating + <paramref name="declaringType"/> for the property. + </summary> + <param name="declaringType">The type that declares the property, used to disambiguate between properties.</param> + <param name="propertyName">Name of the property.</param> + <param name="constraint">Constraint to place on the property value.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.PropertyConstraint.Eval(System.Object)"> + <summary> + Determines if the object passes the constraint. + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.PropertyConstraint.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="M:Rhino.Mocks.Constraints.PropertyIs.#ctor(System.String,System.Object)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.PropertyIs"/> instance. + </summary> + <param name="propertyName">Name of the property.</param> + <param name="expectedValue">Expected value.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.PropertyIs.#ctor(System.Type,System.String,System.Object)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.PropertyIs"/> instance, specifying a disambiguating + <paramref name="declaringType"/> for the property. + </summary> + <param name="declaringType">The type that declares the property, used to disambiguate between properties.</param> + <param name="propertyName">Name of the property.</param> + <param name="expectedValue">Expected value.</param> + </member> + <member name="T:Rhino.Mocks.Constraints.TypeOf"> + <summary> + Constrain that the parameter must be of the specified type + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.TypeOf.#ctor(System.Type)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.TypeOf"/> instance. + </summary> + <param name="type">Type.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.TypeOf.Eval(System.Object)"> + <summary> + determains if the object pass the constraints + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.TypeOf.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="T:Rhino.Mocks.Constraints.Same"> + <summary> + Constraint that determines whether an object is the same object as another. + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.Same.#ctor(System.Object)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.Equal"/> instance. + </summary> + <param name="obj">Obj.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.Same.Eval(System.Object)"> + <summary> + Determines if the object passes the constraints. + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.Same.Message"> + <summary> + Gets the message for this constraint. + </summary> + </member> + <member name="T:Rhino.Mocks.Constraints.PredicateConstraint`1"> + <summary> + Evaluate a parameter using constraints + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.PredicateConstraint`1.#ctor(System.Predicate{`0})"> + <summary> + Create new instance + </summary> + <param name="predicate"></param> + </member> + <member name="M:Rhino.Mocks.Constraints.PredicateConstraint`1.Eval(System.Object)"> + <summary> + determains if the object pass the constraints + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.PredicateConstraint`1.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="T:Rhino.Mocks.Constraints.CollectionEqual"> + <summary> + Constrain that the list contains the same items as the parameter list + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.CollectionEqual.#ctor(System.Collections.IEnumerable)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.CollectionEqual"/> instance. + </summary> + <param name="collection">In list.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.CollectionEqual.Eval(System.Object)"> + <summary> + determains if the object pass the constraints + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.CollectionEqual.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="T:Rhino.Mocks.Constraints.OneOf"> + <summary> + Constrain that the parameter is one of the items in the list + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.OneOf.#ctor(System.Collections.IEnumerable)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.OneOf"/> instance. + </summary> + <param name="collection">In list.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.OneOf.Eval(System.Object)"> + <summary> + determains if the object pass the constraints + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.OneOf.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="T:Rhino.Mocks.Constraints.IsIn"> + <summary> + Constrain that the object is inside the parameter list + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.IsIn.#ctor(System.Object)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.IsIn"/> instance. + </summary> + <param name="inList">In list.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.IsIn.Eval(System.Object)"> + <summary> + determains if the object pass the constraints + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.IsIn.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="T:Rhino.Mocks.Constraints.CollectionCount"> + <summary> + Applies another AbstractConstraint to the collection count. + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.CollectionCount.#ctor(Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.CollectionCount"/> instance. + </summary> + <param name="constraint">The constraint that should be applied to the collection count.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.CollectionCount.Eval(System.Object)"> + <summary> + Determines if the parameter conforms to this constraint. + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.CollectionCount.Message"> + <summary> + Gets the message for this constraint. + </summary> + </member> + <member name="T:Rhino.Mocks.Constraints.ListElement"> + <summary> + Applies another AbstractConstraint to a specific list element. + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.ListElement.#ctor(System.Int32,Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.ListElement"/> instance. + </summary> + <param name="index">The zero-based index of the list element.</param> + <param name="constraint">The constraint that should be applied to the list element.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.ListElement.Eval(System.Object)"> + <summary> + Determines if the parameter conforms to this constraint. + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.ListElement.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="T:Rhino.Mocks.Constraints.KeyedListElement`1"> + <summary> + Applies another AbstractConstraint to a specific generic keyed list element. + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.KeyedListElement`1.#ctor(`0,Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Creates a new <see cref="T:KeyedListElement"/> instance. + </summary> + <param name="key">The key of the list element.</param> + <param name="constraint">The constraint that should be applied to the list element.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.KeyedListElement`1.Eval(System.Object)"> + <summary> + Determines if the parameter conforms to this constraint. + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.KeyedListElement`1.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="T:Rhino.Mocks.Constraints.ContainsAll"> + <summary> + Constrains that all elements are in the parameter list + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.ContainsAll.#ctor(System.Collections.IEnumerable)"> + <summary> + Initializes a new instance of the <see cref="T:Rhino.Mocks.Constraints.ContainsAll"/> class. + </summary> + <param name="these">The these.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.ContainsAll.Eval(System.Object)"> + <summary> + determains if the object pass the constraints + </summary> + <param name="obj"></param> + <returns></returns> + </member> + <member name="P:Rhino.Mocks.Constraints.ContainsAll.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="T:Rhino.Mocks.Constraints.Or"> + <summary> + Combines two constraints, constraint pass if either is fine. + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.Or.#ctor(Rhino.Mocks.Constraints.AbstractConstraint,Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.And"/> instance. + </summary> + <param name="c1">C1.</param> + <param name="c2">C2.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.Or.Eval(System.Object)"> + <summary> + determains if the object pass the constraints + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.Or.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="T:Rhino.Mocks.Constraints.Not"> + <summary> + Negate a constraint + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.Not.#ctor(Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.And"/> instance. + </summary> + <param name="c1">C1.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.Not.Eval(System.Object)"> + <summary> + determains if the object pass the constraints + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.Not.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="T:Rhino.Mocks.Constraints.And"> + <summary> + Combines two constraints + </summary> + <remarks></remarks> + </member> + <member name="M:Rhino.Mocks.Constraints.And.#ctor(Rhino.Mocks.Constraints.AbstractConstraint,Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.And"/> instance. + </summary> + <param name="c1">C1.</param> + <param name="c2">C2.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.And.Eval(System.Object)"> + <summary> + determains if the object pass the constraints + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.And.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="T:Rhino.Mocks.Constraints.Like"> + <summary> + Constrain the argument to validate according to regex pattern + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.Like.#ctor(System.String)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.Like"/> instance. + </summary> + <param name="pattern">Pattern.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.Like.Eval(System.Object)"> + <summary> + determains if the object pass the constraints + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.Like.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="T:Rhino.Mocks.Constraints.Contains"> + <summary> + Constraint that evaluate whatever an argument contains the specified string. + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.Contains.#ctor(System.String)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.Contains"/> instance. + </summary> + <param name="innerString">Inner string.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.Contains.Eval(System.Object)"> + <summary> + determains if the object pass the constraints + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.Contains.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="T:Rhino.Mocks.Constraints.EndsWith"> + <summary> + Constraint that evaluate whatever an argument ends with the specified string + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.EndsWith.#ctor(System.String)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.EndsWith"/> instance. + </summary> + <param name="end">End.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.EndsWith.Eval(System.Object)"> + <summary> + determains if the object pass the constraints + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.EndsWith.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="T:Rhino.Mocks.Constraints.StartsWith"> + <summary> + Constraint that evaluate whatever an argument start with the specified string + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.StartsWith.#ctor(System.String)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.StartsWith"/> instance. + </summary> + <param name="start">Start.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.StartsWith.Eval(System.Object)"> + <summary> + determains if the object pass the constraints + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.StartsWith.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="T:Rhino.Mocks.Constraints.Equal"> + <summary> + Constraint that evaluate whatever an object equals another + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.Equal.#ctor(System.Object)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.Equal"/> instance. + </summary> + <param name="obj">Obj.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.Equal.Eval(System.Object)"> + <summary> + determains if the object pass the constraints + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.Equal.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="T:Rhino.Mocks.Constraints.Anything"> + <summary> + Constraint that always returns true + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.Anything.Eval(System.Object)"> + <summary> + determains if the object pass the constraints + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.Anything.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="T:Rhino.Mocks.Constraints.ComparingConstraint"> + <summary> + Constraint that evaluate whatever a comparable is greater than another + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.ComparingConstraint.#ctor(System.IComparable,System.Boolean,System.Boolean)"> + <summary> + Creates a new <see cref="T:Rhino.Mocks.Constraints.ComparingConstraint"/> instance. + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.ComparingConstraint.Eval(System.Object)"> + <summary> + determains if the object pass the constraints + </summary> + </member> + <member name="P:Rhino.Mocks.Constraints.ComparingConstraint.Message"> + <summary> + Gets the message for this constraint + </summary> + <value></value> + </member> + <member name="T:Rhino.Mocks.Constraints.Is"> + <summary> + Central location for constraints + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.Is.GreaterThan(System.IComparable)"> + <summary> + Evaluate a greater than constraint for <see cref="T:System.IComparable"/>. + </summary> + <param name="objToCompare">The object the parameter should be greater than</param> + </member> + <member name="M:Rhino.Mocks.Constraints.Is.LessThan(System.IComparable)"> + <summary> + Evaluate a less than constraint for <see cref="T:System.IComparable"/>. + </summary> + <param name="objToCompare">The object the parameter should be less than</param> + </member> + <member name="M:Rhino.Mocks.Constraints.Is.LessThanOrEqual(System.IComparable)"> + <summary> + Evaluate a less than or equal constraint for <see cref="T:System.IComparable"/>. + </summary> + <param name="objToCompare">The object the parameter should be less than or equal to</param> + </member> + <member name="M:Rhino.Mocks.Constraints.Is.GreaterThanOrEqual(System.IComparable)"> + <summary> + Evaluate a greater than or equal constraint for <see cref="T:System.IComparable"/>. + </summary> + <param name="objToCompare">The object the parameter should be greater than or equal to</param> + </member> + <member name="M:Rhino.Mocks.Constraints.Is.Equal(System.Object)"> + <summary> + Evaluate an equal constraint for <see cref="T:System.IComparable"/>. + </summary> + <param name="obj">The object the parameter should equal to</param> + </member> + <member name="M:Rhino.Mocks.Constraints.Is.NotEqual(System.Object)"> + <summary> + Evaluate a not equal constraint for <see cref="T:System.IComparable"/>. + </summary> + <param name="obj">The object the parameter should not equal to</param> + </member> + <member name="M:Rhino.Mocks.Constraints.Is.Same(System.Object)"> + <summary> + Evaluate a same as constraint. + </summary> + <param name="obj">The object the parameter should the same as.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.Is.NotSame(System.Object)"> + <summary> + Evaluate a not same as constraint. + </summary> + <param name="obj">The object the parameter should not be the same as.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.Is.Anything"> + <summary> + A constraints that accept anything + </summary> + <returns></returns> + </member> + <member name="M:Rhino.Mocks.Constraints.Is.Null"> + <summary> + A constraint that accept only nulls + </summary> + <returns></returns> + </member> + <member name="M:Rhino.Mocks.Constraints.Is.NotNull"> + <summary> + A constraint that accept only non null values + </summary> + <returns></returns> + </member> + <member name="M:Rhino.Mocks.Constraints.Is.TypeOf(System.Type)"> + <summary> + A constraint that accept only value of the specified type + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.Is.TypeOf``1"> + <summary> + A constraint that accept only value of the specified type + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.Is.Matching``1(System.Predicate{``0})"> + <summary> + Evaluate a parameter using a predicate + </summary> + <param name="predicate">The predicate to use</param> + </member> + <member name="T:Rhino.Mocks.Constraints.IsArg`1"> + <summary> + Provides access to the constraintes defined in the class <see cref="T:Rhino.Mocks.Constraints.Is"/> to be used in context + with the <see cref="T:Rhino.Mocks.Arg`1"/> syntax. + </summary> + <typeparam name="T">The type of the argument</typeparam> + </member> + <member name="M:Rhino.Mocks.Constraints.IsArg`1.GreaterThan(System.IComparable)"> + <summary> + Evaluate a greater than constraint for <see cref="T:System.IComparable"/>. + </summary> + <param name="objToCompare">The object the parameter should be greater than</param> + </member> + <member name="M:Rhino.Mocks.Constraints.IsArg`1.LessThan(System.IComparable)"> + <summary> + Evaluate a less than constraint for <see cref="T:System.IComparable"/>. + </summary> + <param name="objToCompare">The object the parameter should be less than</param> + </member> + <member name="M:Rhino.Mocks.Constraints.IsArg`1.LessThanOrEqual(System.IComparable)"> + <summary> + Evaluate a less than or equal constraint for <see cref="T:System.IComparable"/>. + </summary> + <param name="objToCompare">The object the parameter should be less than or equal to</param> + </member> + <member name="M:Rhino.Mocks.Constraints.IsArg`1.GreaterThanOrEqual(System.IComparable)"> + <summary> + Evaluate a greater than or equal constraint for <see cref="T:System.IComparable"/>. + </summary> + <param name="objToCompare">The object the parameter should be greater than or equal to</param> + </member> + <member name="M:Rhino.Mocks.Constraints.IsArg`1.Equal(System.Object)"> + <summary> + Evaluate an equal constraint for <see cref="T:System.IComparable"/>. + </summary> + <param name="obj">The object the parameter should equal to</param> + </member> + <member name="M:Rhino.Mocks.Constraints.IsArg`1.NotEqual(System.Object)"> + <summary> + Evaluate a not equal constraint for <see cref="T:System.IComparable"/>. + </summary> + <param name="obj">The object the parameter should not equal to</param> + </member> + <member name="M:Rhino.Mocks.Constraints.IsArg`1.Same(System.Object)"> + <summary> + Evaluate a same as constraint. + </summary> + <param name="obj">The object the parameter should the same as.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.IsArg`1.NotSame(System.Object)"> + <summary> + Evaluate a not same as constraint. + </summary> + <param name="obj">The object the parameter should not be the same as.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.IsArg`1.Equals(System.Object)"> + <summary> + Throws NotSupportedException. Don't use Equals to define constraints. Use Equal instead. + </summary> + <param name="obj"></param> + <returns></returns> + </member> + <member name="M:Rhino.Mocks.Constraints.IsArg`1.GetHashCode"> + <summary> + Serves as a hash function for a particular type. + </summary> + <returns> + A hash code for the current <see cref="T:System.Object"/>. + </returns> + </member> + <member name="P:Rhino.Mocks.Constraints.IsArg`1.Anything"> + <summary> + A constraints that accept anything + </summary> + <returns></returns> + </member> + <member name="P:Rhino.Mocks.Constraints.IsArg`1.Null"> + <summary> + A constraint that accept only nulls + </summary> + <returns></returns> + </member> + <member name="P:Rhino.Mocks.Constraints.IsArg`1.NotNull"> + <summary> + A constraint that accept only non null values + </summary> + <returns></returns> + </member> + <member name="P:Rhino.Mocks.Constraints.IsArg`1.TypeOf"> + <summary> + A constraint that accept only value of the specified type. + The check is performed on the type that has been defined + as the argument type. + </summary> + </member> + <member name="T:Rhino.Mocks.Constraints.List"> + <summary> + Central location for constraints about lists and collections + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.List.IsIn(System.Object)"> + <summary> + Determines whether the specified obj is in the paramter. + The parameter must be IEnumerable. + </summary> + <param name="obj">Obj.</param> + <returns></returns> + </member> + <member name="M:Rhino.Mocks.Constraints.List.OneOf(System.Collections.IEnumerable)"> + <summary> + Determains whatever the parameter is in the collection. + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.List.Equal(System.Collections.IEnumerable)"> + <summary> + Determains that the parameter collection is identical to the specified collection + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.List.Count(Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Determines that the parameter collection has the specified number of elements. + </summary> + <param name="constraint">The constraint that should be applied to the collection count.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.List.Element(System.Int32,Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Determines that an element of the parameter collections conforms to another AbstractConstraint. + </summary> + <param name="index">The zero-based index of the list element.</param> + <param name="constraint">The constraint which should be applied to the list element.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.List.Element``1(``0,Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Determines that an element of the parameter collections conforms to another AbstractConstraint. + </summary> + <param name="key">The key of the element.</param> + <param name="constraint">The constraint which should be applied to the element.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.List.ContainsAll(System.Collections.IEnumerable)"> + <summary> + Determines that all elements of the specified collection are in the the parameter collection + </summary> + <param name="collection">The collection to compare against</param> + <returns>The constraint which should be applied to the list parameter.</returns> + </member> + <member name="T:Rhino.Mocks.Constraints.ListArg`1"> + <summary> + Provides access to the constraintes defined in the class <see cref="T:Rhino.Mocks.Constraints.Text"/> to be used in context + with the <see cref="T:Rhino.Mocks.Arg`1"/> syntax. + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.ListArg`1.IsIn(System.Object)"> + <summary> + Determines whether the specified object is in the paramter. + The parameter must be IEnumerable. + </summary> + <param name="obj">Obj.</param> + <returns></returns> + </member> + <member name="M:Rhino.Mocks.Constraints.ListArg`1.OneOf(System.Collections.IEnumerable)"> + <summary> + Determains whatever the parameter is in the collection. + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.ListArg`1.Equal(System.Collections.IEnumerable)"> + <summary> + Determains that the parameter collection is identical to the specified collection + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.ListArg`1.Count(Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Determines that the parameter collection has the specified number of elements. + </summary> + <param name="constraint">The constraint that should be applied to the collection count.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.ListArg`1.Element(System.Int32,Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Determines that an element of the parameter collections conforms to another AbstractConstraint. + </summary> + <param name="index">The zero-based index of the list element.</param> + <param name="constraint">The constraint which should be applied to the list element.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.ListArg`1.ContainsAll(System.Collections.IEnumerable)"> + <summary> + Determines that all elements of the specified collection are in the the parameter collection + </summary> + <param name="collection">The collection to compare against</param> + <returns>The constraint which should be applied to the list parameter.</returns> + </member> + <member name="M:Rhino.Mocks.Constraints.ListArg`1.Equals(System.Object)"> + <summary> + Throws NotSupportedException. Don't use Equals to define constraints. Use Equal instead. + </summary> + <param name="obj"></param> + <returns></returns> + </member> + <member name="M:Rhino.Mocks.Constraints.ListArg`1.GetHashCode"> + <summary> + Serves as a hash function for a particular type. + </summary> + <returns> + A hash code for the current <see cref="T:System.Object"/>. + </returns> + </member> + <member name="T:Rhino.Mocks.Constraints.OutRefArgDummy`1"> + <summary> + Provides a dummy field to pass as out or ref argument. + </summary> + <typeparam name="T"></typeparam> + </member> + <member name="F:Rhino.Mocks.Constraints.OutRefArgDummy`1.Dummy"> + <summary> + Dummy field to satisfy the compiler. Used for out and ref arguments. + </summary> + </member> + <member name="T:Rhino.Mocks.Constraints.Property"> + <summary> + Central location for constraints for object's properties + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.Property.Value(System.String,System.Object)"> + <summary> + Constrains the parameter to have property with the specified value + </summary> + <param name="propertyName">Name of the property.</param> + <param name="expectedValue">Expected value.</param> + <returns></returns> + </member> + <member name="M:Rhino.Mocks.Constraints.Property.Value(System.Type,System.String,System.Object)"> + <summary> + Constrains the parameter to have property with the specified value. + </summary> + <param name="declaringType">The type that declares the property, used to disambiguate between properties.</param> + <param name="propertyName">Name of the property.</param> + <param name="expectedValue">Expected value.</param> + <returns></returns> + </member> + <member name="M:Rhino.Mocks.Constraints.Property.ValueConstraint(System.String,Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Constrains the parameter to have a property satisfying a specified constraint. + </summary> + <param name="propertyName">Name of the property.</param> + <param name="propertyConstraint">Constraint for the property.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.Property.ValueConstraint(System.Type,System.String,Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Constrains the parameter to have a property satisfying a specified constraint. + </summary> + <param name="declaringType">The type that declares the property, used to disambiguate between properties.</param> + <param name="propertyName">Name of the property.</param> + <param name="propertyConstraint">Constraint for the property.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.Property.IsNull(System.String)"> + <summary> + Determines whether the parameter has the specified property and that it is null. + </summary> + <param name="propertyName">Name of the property.</param> + <returns></returns> + </member> + <member name="M:Rhino.Mocks.Constraints.Property.IsNull(System.Type,System.String)"> + <summary> + Determines whether the parameter has the specified property and that it is null. + </summary> + <param name="declaringType">The type that declares the property, used to disambiguate between properties.</param> + <param name="propertyName">Name of the property.</param> + <returns></returns> + </member> + <member name="M:Rhino.Mocks.Constraints.Property.IsNotNull(System.String)"> + <summary> + Determines whether the parameter has the specified property and that it is not null. + </summary> + <param name="propertyName">Name of the property.</param> + <returns></returns> + </member> + <member name="M:Rhino.Mocks.Constraints.Property.IsNotNull(System.Type,System.String)"> + <summary> + Determines whether the parameter has the specified property and that it is not null. + </summary> + <param name="declaringType">The type that declares the property, used to disambiguate between properties.</param> + <param name="propertyName">Name of the property.</param> + <returns></returns> + </member> + <member name="M:Rhino.Mocks.Constraints.Property.AllPropertiesMatch(System.Object)"> + <summary> + constraints the parameter to have the exact same property values as the expected object. + </summary> + <param name="expected">An object, of the same type as the parameter, whose properties are set with the expected values.</param> + <returns>An instance of the constraint that will do the actual check.</returns> + <remarks> + The parameter's public property values and public field values will be matched against the expected object's + public property values and public field values. The first mismatch will be reported and no further matching is done. + The matching is recursive for any property or field that has properties or fields of it's own. + Collections are supported through IEnumerable, which means the constraint will check if the actual and expected + collection contain the same values in the same order, where the values contained by the collection can have properties + and fields of their own that will be checked as well because of the recursive nature of this constraint. + </remarks> + </member> + <member name="T:Rhino.Mocks.Constraints.PublicField"> + <summary> + Central location for constraints for object's public fields + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.PublicField.Value(System.String,System.Object)"> + <summary> + Constrains the parameter to have a public field with the specified value + </summary> + <param name="publicFieldName">Name of the public field.</param> + <param name="expectedValue">Expected value.</param> + <returns></returns> + </member> + <member name="M:Rhino.Mocks.Constraints.PublicField.Value(System.Type,System.String,System.Object)"> + <summary> + Constrains the parameter to have a public field with the specified value. + </summary> + <param name="declaringType">The type that declares the public field, used to disambiguate between public fields.</param> + <param name="publicFieldName">Name of the public field.</param> + <param name="expectedValue">Expected value.</param> + <returns></returns> + </member> + <member name="M:Rhino.Mocks.Constraints.PublicField.ValueConstraint(System.String,Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Constrains the parameter to have a public field satisfying a specified constraint. + </summary> + <param name="publicFieldName">Name of the public field.</param> + <param name="publicFieldConstraint">Constraint for the public field.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.PublicField.ValueConstraint(System.Type,System.String,Rhino.Mocks.Constraints.AbstractConstraint)"> + <summary> + Constrains the parameter to have a public field satisfying a specified constraint. + </summary> + <param name="declaringType">The type that declares the public field, used to disambiguate between public fields.</param> + <param name="publicFieldName">Name of the public field.</param> + <param name="publicFieldConstraint">Constraint for the public field.</param> + </member> + <member name="M:Rhino.Mocks.Constraints.PublicField.IsNull(System.String)"> + <summary> + Determines whether the parameter has the specified public field and that it is null. + </summary> + <param name="publicFieldName">Name of the public field.</param> + <returns></returns> + </member> + <member name="M:Rhino.Mocks.Constraints.PublicField.IsNull(System.Type,System.String)"> + <summary> + Determines whether the parameter has the specified public field and that it is null. + </summary> + <param name="declaringType">The type that declares the public field, used to disambiguate between public fields.</param> + <param name="publicFieldName">Name of the public field.</param> + <returns></returns> + </member> + <member name="M:Rhino.Mocks.Constraints.PublicField.IsNotNull(System.String)"> + <summary> + Determines whether the parameter has the specified public field and that it is not null. + </summary> + <param name="publicFieldName">Name of the public field.</param> + <returns></returns> + </member> + <member name="M:Rhino.Mocks.Constraints.PublicField.IsNotNull(System.Type,System.String)"> + <summary> + Determines whether the parameter has the specified public field and that it is not null. + </summary> + <param name="declaringType">The type that declares the public field, used to disambiguate between public fields.</param> + <param name="publicFieldName">Name of the public field.</param> + <returns></returns> + </member> + <member name="T:Rhino.Mocks.Constraints.Text"> + <summary> + Central location for all text related constraints + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.Text.StartsWith(System.String)"> + <summary> + Constrain the argument to starts with the specified string + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.Text.EndsWith(System.String)"> + <summary> + Constrain the argument to end with the specified string + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.Text.Contains(System.String)"> + <summary> + Constrain the argument to contain the specified string + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.Text.Like(System.String)"> + <summary> + Constrain the argument to validate according to regex pattern + </summary> + </member> + <member name="T:Rhino.Mocks.Constraints.TextArg"> + <summary> + Provides access to the constraintes defined in the class <see cref="T:Rhino.Mocks.Constraints.Text"/> to be used in context + with the <see cref="T:Rhino.Mocks.Arg"/> syntax. + </summary> + </member> + <member name="M:Rhino.Mocks.Constraints.TextArg.StartsWith(System.String)"> + <summary> + Constrain the argument to starts with the specified string + </summary> + ... [truncated message content] |
From: <aye...@us...> - 2009-06-23 06:11:06
|
Revision: 4514 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4514&view=rev Author: ayenderahien Date: 2009-06-23 06:09:34 +0000 (Tue, 23 Jun 2009) Log Message: ----------- Merging from 2.1.x branch: - Made openCommandCount and openReaderCount thread safe - Fixed NH-1850 NHibernate should log query duration - Made LogSpy output easier to read for humans - Avoiding sync overhead when it is not needed for WrapResultSet Modified Paths: -------------- trunk/nhibernate/src/NHibernate/AdoNet/AbstractBatcher.cs trunk/nhibernate/src/NHibernate/Driver/NHybridDataReader.cs trunk/nhibernate/src/NHibernate/Loader/Loader.cs trunk/nhibernate/src/NHibernate.Test/LogSpy.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Customer.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Mappings.hbm.xml Removed Paths: ------------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Customer.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Mappings.hbm.xml Property Changed: ---------------- trunk/nhibernate/lib/net/3.5/ trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/ Property changes on: trunk/nhibernate/lib/net/3.5 ___________________________________________________________________ Added: svn:ignore + NHibernate.dll Modified: trunk/nhibernate/src/NHibernate/AdoNet/AbstractBatcher.cs =================================================================== --- trunk/nhibernate/src/NHibernate/AdoNet/AbstractBatcher.cs 2009-06-23 05:57:17 UTC (rev 4513) +++ trunk/nhibernate/src/NHibernate/AdoNet/AbstractBatcher.cs 2009-06-23 06:09:34 UTC (rev 4514) @@ -12,6 +12,10 @@ namespace NHibernate.AdoNet { + using System.Collections.Generic; + using System.Diagnostics; + using System.Threading; + /// <summary> /// Manages prepared statements and batching. Class exists to enforce separation of concerns /// </summary> @@ -34,6 +38,7 @@ private readonly ISet<IDbCommand> commandsToClose = new HashedSet<IDbCommand>(); private readonly ISet<IDataReader> readersToClose = new HashedSet<IDataReader>(); + private readonly IDictionary<IDataReader, Stopwatch> readersDuration = new Dictionary<IDataReader, Stopwatch>(); private IDbCommand lastQuery; private bool releasing; @@ -197,7 +202,10 @@ { CheckReaders(); Prepare(cmd); - try + Stopwatch duration = null; + if(log.IsDebugEnabled) + duration = Stopwatch.StartNew(); + try { return cmd.ExecuteNonQuery(); } @@ -207,14 +215,21 @@ log.Error("Could not execute command: " + cmd.CommandText, e); throw; } + finally + { + if (log.IsDebugEnabled && duration != null) + log.DebugFormat("ExecuteNonQuery took {0} ms", duration.ElapsedMilliseconds); + } } public IDataReader ExecuteReader(IDbCommand cmd) { CheckReaders(); Prepare(cmd); - - IDataReader reader; + Stopwatch duration = null; + if (log.IsDebugEnabled) + duration = Stopwatch.StartNew(); + IDataReader reader = null; try { reader = cmd.ExecuteReader(); @@ -225,6 +240,14 @@ log.Error("Could not execute query: " + cmd.CommandText, e); throw; } + finally + { + if(log.IsDebugEnabled && duration != null && reader != null) + { + log.DebugFormat("ExecuteReader took {0} ms", duration.ElapsedMilliseconds); + readersDuration[reader] = duration; + } + } if (!factory.ConnectionProvider.Driver.SupportsMultipleOpenReaders) { @@ -259,19 +282,17 @@ releasing = true; try { - foreach (IDataReader reader in readersToClose) + foreach (IDataReader reader in new HashedSet<IDataReader>(readersToClose)) { try { - LogCloseReader(); - reader.Dispose(); + CloseReader(reader); } catch (Exception e) { log.Warn("Could not close IDataReader", e); } } - readersToClose.Clear(); foreach (IDbCommand cmd in commandsToClose) { @@ -343,18 +364,26 @@ */ // TODO NH: Study a way to use directly IDbCommand.ExecuteReader() outsite the batcher // An example of it's use is the management of generated ID. - if (reader != null) - { - ResultSetWrapper rsw = reader as ResultSetWrapper; - readersToClose.Remove(rsw == null ? reader : rsw.Target); - CloseDataReader(reader); - } - } + if (reader == null) + return; - private void CloseDataReader(IDataReader reader) - { + ResultSetWrapper rsw = reader as ResultSetWrapper; + var actualReader = rsw == null ? reader : rsw.Target; + readersToClose.Remove(actualReader); reader.Dispose(); LogCloseReader(); + + if (!log.IsDebugEnabled) + return; + + var nhReader = actualReader as NHybridDataReader; + actualReader = nhReader == null ? actualReader : nhReader.Target; + + Stopwatch duration; + if (readersDuration.TryGetValue(actualReader, out duration)==false) + return; + readersDuration.Remove(actualReader); + log.DebugFormat("DataReader was closed after {0} ms", duration.ElapsedMilliseconds); } /// <summary></summary> @@ -434,8 +463,8 @@ { if (log.IsDebugEnabled) { - openCommandCount++; - log.Debug("Opened new IDbCommand, open IDbCommands: " + openCommandCount); + int currentOpenCommandCount = Interlocked.Increment(ref openCommandCount); + log.Debug("Opened new IDbCommand, open IDbCommands: " + currentOpenCommandCount); } if (factory.Statistics.IsStatisticsEnabled) @@ -448,8 +477,8 @@ { if (log.IsDebugEnabled) { - openCommandCount--; - log.Debug("Closed IDbCommand, open IDbCommands: " + openCommandCount); + int currentOpenCommandCount = Interlocked.Decrement(ref openCommandCount); + log.Debug("Closed IDbCommand, open IDbCommands: " + currentOpenCommandCount); } if (factory.Statistics.IsStatisticsEnabled) @@ -462,8 +491,8 @@ { if (log.IsDebugEnabled) { - openReaderCount++; - log.Debug("Opened IDataReader, open IDataReaders: " + openReaderCount); + int currentOpenReaderCount = Interlocked.Increment(ref openReaderCount); + log.Debug("Opened IDataReader, open IDataReaders: " + currentOpenReaderCount); } } @@ -471,8 +500,8 @@ { if (log.IsDebugEnabled) { - openReaderCount--; - log.Debug("Closed IDataReader, open IDataReaders :" + openReaderCount); + int currentOpenReaderCount = Interlocked.Decrement(ref openReaderCount); + log.Debug("Closed IDataReader, open IDataReaders :" + currentOpenReaderCount); } } Modified: trunk/nhibernate/src/NHibernate/Driver/NHybridDataReader.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Driver/NHybridDataReader.cs 2009-06-23 05:57:17 UTC (rev 4513) +++ trunk/nhibernate/src/NHibernate/Driver/NHybridDataReader.cs 2009-06-23 06:09:34 UTC (rev 4514) @@ -27,6 +27,8 @@ private IDataReader _reader; private bool _isMidstream = false; + public IDataReader Target { get { return _reader; } } + /// <summary> /// Initializes a new instance of the <see cref="NHybridDataReader"/> class. /// </summary> Modified: trunk/nhibernate/src/NHibernate/Loader/Loader.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Loader/Loader.cs 2009-06-23 05:57:17 UTC (rev 4513) +++ trunk/nhibernate/src/NHibernate/Loader/Loader.cs 2009-06-23 06:09:34 UTC (rev 4514) @@ -1297,8 +1297,13 @@ log.Info(st.CommandText); // TODO NH: Callable rs = session.Batcher.ExecuteReader(st); - rs = WrapResultSetIfEnabled(rs, session); + //NH: this is checked outside the WrapResultSet because we + // want to avoid the syncronization overhead in the vast majority + // of cases where IsWrapResultSetsEnabled is set to false + if (session.Factory.Settings.IsWrapResultSetsEnabled) + rs = WrapResultSet(rs); + Dialect.Dialect dialect = session.Factory.Dialect; if (!dialect.SupportsLimitOffset || !UseLimit(selection, dialect)) { @@ -1325,25 +1330,18 @@ } [MethodImpl(MethodImplOptions.Synchronized)] - private IDataReader WrapResultSetIfEnabled(IDataReader rs, ISessionImplementor session) + private IDataReader WrapResultSet(IDataReader rs) { // synchronized to avoid multi-thread access issues; defined as method synch to avoid // potential deadlock issues due to nature of code. - if (session.Factory.Settings.IsWrapResultSetsEnabled) + try { - try - { - log.Debug("Wrapping result set [" + rs + "]"); - return new ResultSetWrapper(rs, RetreiveColumnNameToIndexCache(rs)); - } - catch (Exception e) - { - log.Info("Error wrapping result set", e); - return rs; - } + log.Debug("Wrapping result set [" + rs + "]"); + return new ResultSetWrapper(rs, RetreiveColumnNameToIndexCache(rs)); } - else + catch (Exception e) { + log.Info("Error wrapping result set", e); return rs; } } Modified: trunk/nhibernate/src/NHibernate.Test/LogSpy.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/LogSpy.cs 2009-06-23 05:57:17 UTC (rev 4513) +++ trunk/nhibernate/src/NHibernate.Test/LogSpy.cs 2009-06-23 06:09:34 UTC (rev 4514) @@ -56,7 +56,8 @@ wholeMessage .Append(loggingEvent.LoggerName) .Append(" ") - .Append(loggingEvent.RenderedMessage); + .Append(loggingEvent.RenderedMessage) + .AppendLine(); } return wholeMessage.ToString(); } Deleted: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Customer.cs =================================================================== --- branches/2.1.x/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Customer.cs 2009-06-23 05:57:17 UTC (rev 4513) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Customer.cs 2009-06-23 06:09:34 UTC (rev 4514) @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NHibernate.Test.NHSpecificTest.NH1850 -{ - public class Customer - { - public virtual int Id { get; set; } - public virtual string Name { get; set; } - } -} Copied: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Customer.cs (from rev 4513, branches/2.1.x/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Customer.cs) =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Customer.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Customer.cs 2009-06-23 06:09:34 UTC (rev 4514) @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace NHibernate.Test.NHSpecificTest.NH1850 +{ + public class Customer + { + public virtual int Id { get; set; } + public virtual string Name { get; set; } + } +} Deleted: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Fixture.cs =================================================================== --- branches/2.1.x/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Fixture.cs 2009-06-23 05:57:17 UTC (rev 4513) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Fixture.cs 2009-06-23 06:09:34 UTC (rev 4514) @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using NHibernate.Criterion; -using NUnit.Framework; - -namespace NHibernate.Test.NHSpecificTest.NH1850 -{ - using AdoNet; - - [TestFixture] - public class Fixture:BugTestCase - { - [Test] - public void CanGetQueryDurationForDelete() - { - using (LogSpy spy = new LogSpy(typeof(AbstractBatcher))) - using (ISession session = OpenSession()) - using (ITransaction tx = session.BeginTransaction()) - { - session.CreateQuery("delete Customer").ExecuteUpdate(); - - var wholeLog = spy.GetWholeLog(); - Assert.True( - wholeLog.Contains("ExecuteNonQuery took") - ); - - tx.Rollback(); - } - } - - [Test] - public void CanGetQueryDurationForSelect() - { - using (LogSpy spy = new LogSpy(typeof(AbstractBatcher))) - using (ISession session = OpenSession()) - using (ITransaction tx = session.BeginTransaction()) - { - session.CreateQuery("from Customer").List(); - - var wholeLog = spy.GetWholeLog(); - Assert.True( - wholeLog.Contains("ExecuteReader took") - ); - Assert.True( - wholeLog.Contains("DataReader was closed after") - ); - - tx.Rollback(); - } - } - } -} Copied: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Fixture.cs (from rev 4513, branches/2.1.x/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Fixture.cs) =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Fixture.cs 2009-06-23 06:09:34 UTC (rev 4514) @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Text; +using NHibernate.Criterion; +using NUnit.Framework; + +namespace NHibernate.Test.NHSpecificTest.NH1850 +{ + using AdoNet; + + [TestFixture] + public class Fixture:BugTestCase + { + [Test] + public void CanGetQueryDurationForDelete() + { + using (LogSpy spy = new LogSpy(typeof(AbstractBatcher))) + using (ISession session = OpenSession()) + using (ITransaction tx = session.BeginTransaction()) + { + session.CreateQuery("delete Customer").ExecuteUpdate(); + + var wholeLog = spy.GetWholeLog(); + Assert.True( + wholeLog.Contains("ExecuteNonQuery took") + ); + + tx.Rollback(); + } + } + + [Test] + public void CanGetQueryDurationForSelect() + { + using (LogSpy spy = new LogSpy(typeof(AbstractBatcher))) + using (ISession session = OpenSession()) + using (ITransaction tx = session.BeginTransaction()) + { + session.CreateQuery("from Customer").List(); + + var wholeLog = spy.GetWholeLog(); + Assert.True( + wholeLog.Contains("ExecuteReader took") + ); + Assert.True( + wholeLog.Contains("DataReader was closed after") + ); + + tx.Rollback(); + } + } + } +} Deleted: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Mappings.hbm.xml =================================================================== --- branches/2.1.x/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Mappings.hbm.xml 2009-06-23 05:57:17 UTC (rev 4513) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Mappings.hbm.xml 2009-06-23 06:09:34 UTC (rev 4514) @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernate.Test" - namespace="NHibernate.Test.NHSpecificTest.NH1850" - default-lazy="false"> - - <class name="Customer"> - <id name="Id"> - <generator class="native"/> - </id> - <property name="Name"/> - - </class> -</hibernate-mapping> \ No newline at end of file Copied: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Mappings.hbm.xml (from rev 4513, branches/2.1.x/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Mappings.hbm.xml) =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Mappings.hbm.xml 2009-06-23 06:09:34 UTC (rev 4514) @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernate.Test" + namespace="NHibernate.Test.NHSpecificTest.NH1850" + default-lazy="false"> + + <class name="Customer"> + <id name="Id"> + <generator class="native"/> + </id> + <property name="Name"/> + + </class> +</hibernate-mapping> \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-06-23 05:57:17 UTC (rev 4513) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-06-23 06:09:34 UTC (rev 4514) @@ -527,6 +527,8 @@ <Compile Include="NHSpecificTest\NH1837\Customer.cs" /> <Compile Include="NHSpecificTest\NH1837\Fixture.cs" /> <Compile Include="NHSpecificTest\NH1837\Order.cs" /> + <Compile Include="NHSpecificTest\NH1850\Customer.cs" /> + <Compile Include="NHSpecificTest\NH1850\Fixture.cs" /> <Compile Include="NHSpecificTest\NH473\Child.cs" /> <Compile Include="NHSpecificTest\NH473\Fixture.cs" /> <Compile Include="NHSpecificTest\NH473\Parent.cs" /> @@ -1937,6 +1939,7 @@ <EmbeddedResource Include="Bytecode\Lightweight\ProductLine.hbm.xml" /> <EmbeddedResource Include="DriverTest\MultiTypeEntity.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="NHSpecificTest\NH1850\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1192\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1734\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1097\Mappings.hbm.xml" /> Property changes on: trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests ___________________________________________________________________ Modified: svn:mergeinfo - /branches/2.1.x/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests:4507-4508 + /branches/2.1.x/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests:4507-4508,4510-4513 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ric...@us...> - 2009-06-23 17:25:25
|
Revision: 4516 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4516&view=rev Author: RicBrown Date: 2009-06-23 17:25:23 +0000 (Tue, 23 Jun 2009) Log Message: ----------- Removed reference to Rhino.Mocks. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/LambdaFixtureBase.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/SessionStub.cs Removed Paths: ------------- trunk/nhibernate/lib/net/3.5/Rhino.Mocks.acknowledgements.txt trunk/nhibernate/lib/net/3.5/Rhino.Mocks.dll trunk/nhibernate/lib/net/3.5/Rhino.Mocks.license.txt trunk/nhibernate/lib/net/3.5/Rhino.Mocks.xml Deleted: trunk/nhibernate/lib/net/3.5/Rhino.Mocks.acknowledgements.txt =================================================================== --- trunk/nhibernate/lib/net/3.5/Rhino.Mocks.acknowledgements.txt 2009-06-23 11:20:23 UTC (rev 4515) +++ trunk/nhibernate/lib/net/3.5/Rhino.Mocks.acknowledgements.txt 2009-06-23 17:25:23 UTC (rev 4516) @@ -1,2 +0,0 @@ -Rhino Mocks is using Castle Dynamic Proxy (http://www.castleproject.org/dynamicproxy/index.html) to handle proxying the types it needs to mock. -The Dynamic Proxy project has been invaluable resource and made creating Rhino Mocks possible. \ No newline at end of file Deleted: trunk/nhibernate/lib/net/3.5/Rhino.Mocks.dll =================================================================== (Binary files differ) Deleted: trunk/nhibernate/lib/net/3.5/Rhino.Mocks.license.txt =================================================================== --- trunk/nhibernate/lib/net/3.5/Rhino.Mocks.license.txt 2009-06-23 11:20:23 UTC (rev 4515) +++ trunk/nhibernate/lib/net/3.5/Rhino.Mocks.license.txt 2009-06-23 17:25:23 UTC (rev 4516) @@ -1,25 +0,0 @@ -Copyright (c) 2005 - 2008 Ayende Rahien (ay...@ay...) -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Ayende Rahien nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file Deleted: trunk/nhibernate/lib/net/3.5/Rhino.Mocks.xml =================================================================== --- trunk/nhibernate/lib/net/3.5/Rhino.Mocks.xml 2009-06-23 11:20:23 UTC (rev 4515) +++ trunk/nhibernate/lib/net/3.5/Rhino.Mocks.xml 2009-06-23 17:25:23 UTC (rev 4516) @@ -1,5206 +0,0 @@ -<?xml version="1.0"?> -<doc> - <assembly> - <name>Rhino.Mocks.Partial</name> - </assembly> - <members> - <member name="T:Rhino.Mocks.Constraints.AbstractConstraint"> - <summary> - Interface for constraints - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.AbstractConstraint.Eval(System.Object)"> - <summary> - determains if the object pass the constraints - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.AbstractConstraint.op_BitwiseAnd(Rhino.Mocks.Constraints.AbstractConstraint,Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - And operator for constraints - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.AbstractConstraint.op_LogicalNot(Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Not operator for constraints - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.AbstractConstraint.op_BitwiseOr(Rhino.Mocks.Constraints.AbstractConstraint,Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Or operator for constraints - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.AbstractConstraint.op_False(Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Allow overriding of || or && - </summary> - <param name="c"></param> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.AbstractConstraint.op_True(Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Allow overriding of || or && - </summary> - <param name="c"></param> - <returns></returns> - </member> - <member name="P:Rhino.Mocks.Constraints.AbstractConstraint.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="M:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.#ctor(System.Object)"> - <summary> - Initializes a new constraint object. - </summary> - <param name="expected">The expected object, The actual object is passed in as a parameter to the <see cref="M:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.Eval(System.Object)"/> method</param> - </member> - <member name="M:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.Eval(System.Object)"> - <summary> - Evaluate this constraint. - </summary> - <param name="obj">The actual object that was passed in the method call to the mock.</param> - <returns>True when the constraint is met, else false.</returns> - </member> - <member name="M:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.CheckReferenceType(System.Object,System.Object)"> - <summary> - Checks if the properties of the <paramref name="actual"/> object - are the same as the properies of the <paramref name="expected"/> object. - </summary> - <param name="expected">The expected object</param> - <param name="actual">The actual object</param> - <returns>True when both objects have the same values, else False.</returns> - </member> - <member name="M:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.CheckValue(System.Object,System.Object)"> - <summary> - - </summary> - <param name="expected"></param> - <param name="actual"></param> - <returns></returns> - <remarks>This is the real heart of the beast.</remarks> - </member> - <member name="M:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.CheckProperties(System.Object,System.Object)"> - <summary> - Used by CheckReferenceType to check all properties of the reference type. - </summary> - <param name="expected">The expected object</param> - <param name="actual">The actual object</param> - <returns>True when both objects have the same values, else False.</returns> - </member> - <member name="M:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.CheckFields(System.Object,System.Object)"> - <summary> - Used by CheckReferenceType to check all fields of the reference type. - </summary> - <param name="expected">The expected object</param> - <param name="actual">The actual object</param> - <returns>True when both objects have the same values, else False.</returns> - </member> - <member name="M:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.CheckCollection(System.Collections.IEnumerable,System.Collections.IEnumerable)"> - <summary> - Checks the items of both collections - </summary> - <param name="expectedCollection">The expected collection</param> - <param name="actualCollection"></param> - <returns>True if both collections contain the same items in the same order.</returns> - </member> - <member name="M:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.BuildPropertyName"> - <summary> - Builds a propertyname from the Stack _properties like 'Order.Product.Price' - to be used in the error message. - </summary> - <returns>A nested property name.</returns> - </member> - <member name="P:Rhino.Mocks.Constraints.AllPropertiesMatchConstraint.Message"> - <summary> - Rhino.Mocks uses this property to generate an error message. - </summary> - <value> - A message telling the tester why the constraint failed. - </value> - </member> - <member name="T:Rhino.Mocks.Constraints.PublicFieldIs"> - <summary> - Constrain that the public field has a specified value - </summary> - </member> - <member name="T:Rhino.Mocks.Constraints.PublicFieldConstraint"> - <summary> - Constrain that the public field matches another constraint. - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.PublicFieldConstraint.#ctor(System.String,Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.PublicFieldConstraint"/> instance. - </summary> - <param name="publicFieldName">Name of the public field.</param> - <param name="constraint">Constraint to place on the public field value.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.PublicFieldConstraint.#ctor(System.Type,System.String,Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.PublicFieldConstraint"/> instance, specifying a disambiguating - <paramref name="declaringType"/> for the public field. - </summary> - <param name="declaringType">The type that declares the public field, used to disambiguate between public fields.</param> - <param name="publicFieldName">Name of the public field.</param> - <param name="constraint">Constraint to place on the public field value.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.PublicFieldConstraint.Eval(System.Object)"> - <summary> - Determines if the object passes the constraint. - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.PublicFieldConstraint.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="M:Rhino.Mocks.Constraints.PublicFieldIs.#ctor(System.String,System.Object)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.PublicFieldIs"/> instance. - </summary> - <param name="publicFieldName">Name of the public field.</param> - <param name="expectedValue">Expected value.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.PublicFieldIs.#ctor(System.Type,System.String,System.Object)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.PublicFieldIs"/> instance, specifying a disambiguating - <paramref name="declaringType"/> for the public field. - </summary> - <param name="declaringType">The type that declares the public field, used to disambiguate between public fields.</param> - <param name="publicFieldName">Name of the public field.</param> - <param name="expectedValue">Expected value.</param> - </member> - <member name="T:Rhino.Mocks.Constraints.PropertyIs"> - <summary> - Constrain that the property has a specified value - </summary> - </member> - <member name="T:Rhino.Mocks.Constraints.PropertyConstraint"> - <summary> - Constrain that the property matches another constraint. - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.PropertyConstraint.#ctor(System.String,Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.PropertyConstraint"/> instance. - </summary> - <param name="propertyName">Name of the property.</param> - <param name="constraint">Constraint to place on the property value.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.PropertyConstraint.#ctor(System.Type,System.String,Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.PropertyConstraint"/> instance, specifying a disambiguating - <paramref name="declaringType"/> for the property. - </summary> - <param name="declaringType">The type that declares the property, used to disambiguate between properties.</param> - <param name="propertyName">Name of the property.</param> - <param name="constraint">Constraint to place on the property value.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.PropertyConstraint.Eval(System.Object)"> - <summary> - Determines if the object passes the constraint. - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.PropertyConstraint.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="M:Rhino.Mocks.Constraints.PropertyIs.#ctor(System.String,System.Object)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.PropertyIs"/> instance. - </summary> - <param name="propertyName">Name of the property.</param> - <param name="expectedValue">Expected value.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.PropertyIs.#ctor(System.Type,System.String,System.Object)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.PropertyIs"/> instance, specifying a disambiguating - <paramref name="declaringType"/> for the property. - </summary> - <param name="declaringType">The type that declares the property, used to disambiguate between properties.</param> - <param name="propertyName">Name of the property.</param> - <param name="expectedValue">Expected value.</param> - </member> - <member name="T:Rhino.Mocks.Constraints.TypeOf"> - <summary> - Constrain that the parameter must be of the specified type - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.TypeOf.#ctor(System.Type)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.TypeOf"/> instance. - </summary> - <param name="type">Type.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.TypeOf.Eval(System.Object)"> - <summary> - determains if the object pass the constraints - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.TypeOf.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="T:Rhino.Mocks.Constraints.Same"> - <summary> - Constraint that determines whether an object is the same object as another. - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.Same.#ctor(System.Object)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.Equal"/> instance. - </summary> - <param name="obj">Obj.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.Same.Eval(System.Object)"> - <summary> - Determines if the object passes the constraints. - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.Same.Message"> - <summary> - Gets the message for this constraint. - </summary> - </member> - <member name="T:Rhino.Mocks.Constraints.PredicateConstraint`1"> - <summary> - Evaluate a parameter using constraints - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.PredicateConstraint`1.#ctor(System.Predicate{`0})"> - <summary> - Create new instance - </summary> - <param name="predicate"></param> - </member> - <member name="M:Rhino.Mocks.Constraints.PredicateConstraint`1.Eval(System.Object)"> - <summary> - determains if the object pass the constraints - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.PredicateConstraint`1.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="T:Rhino.Mocks.Constraints.CollectionEqual"> - <summary> - Constrain that the list contains the same items as the parameter list - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.CollectionEqual.#ctor(System.Collections.IEnumerable)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.CollectionEqual"/> instance. - </summary> - <param name="collection">In list.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.CollectionEqual.Eval(System.Object)"> - <summary> - determains if the object pass the constraints - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.CollectionEqual.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="T:Rhino.Mocks.Constraints.OneOf"> - <summary> - Constrain that the parameter is one of the items in the list - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.OneOf.#ctor(System.Collections.IEnumerable)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.OneOf"/> instance. - </summary> - <param name="collection">In list.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.OneOf.Eval(System.Object)"> - <summary> - determains if the object pass the constraints - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.OneOf.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="T:Rhino.Mocks.Constraints.IsIn"> - <summary> - Constrain that the object is inside the parameter list - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.IsIn.#ctor(System.Object)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.IsIn"/> instance. - </summary> - <param name="inList">In list.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.IsIn.Eval(System.Object)"> - <summary> - determains if the object pass the constraints - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.IsIn.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="T:Rhino.Mocks.Constraints.CollectionCount"> - <summary> - Applies another AbstractConstraint to the collection count. - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.CollectionCount.#ctor(Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.CollectionCount"/> instance. - </summary> - <param name="constraint">The constraint that should be applied to the collection count.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.CollectionCount.Eval(System.Object)"> - <summary> - Determines if the parameter conforms to this constraint. - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.CollectionCount.Message"> - <summary> - Gets the message for this constraint. - </summary> - </member> - <member name="T:Rhino.Mocks.Constraints.ListElement"> - <summary> - Applies another AbstractConstraint to a specific list element. - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.ListElement.#ctor(System.Int32,Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.ListElement"/> instance. - </summary> - <param name="index">The zero-based index of the list element.</param> - <param name="constraint">The constraint that should be applied to the list element.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.ListElement.Eval(System.Object)"> - <summary> - Determines if the parameter conforms to this constraint. - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.ListElement.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="T:Rhino.Mocks.Constraints.KeyedListElement`1"> - <summary> - Applies another AbstractConstraint to a specific generic keyed list element. - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.KeyedListElement`1.#ctor(`0,Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Creates a new <see cref="T:KeyedListElement"/> instance. - </summary> - <param name="key">The key of the list element.</param> - <param name="constraint">The constraint that should be applied to the list element.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.KeyedListElement`1.Eval(System.Object)"> - <summary> - Determines if the parameter conforms to this constraint. - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.KeyedListElement`1.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="T:Rhino.Mocks.Constraints.ContainsAll"> - <summary> - Constrains that all elements are in the parameter list - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.ContainsAll.#ctor(System.Collections.IEnumerable)"> - <summary> - Initializes a new instance of the <see cref="T:Rhino.Mocks.Constraints.ContainsAll"/> class. - </summary> - <param name="these">The these.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.ContainsAll.Eval(System.Object)"> - <summary> - determains if the object pass the constraints - </summary> - <param name="obj"></param> - <returns></returns> - </member> - <member name="P:Rhino.Mocks.Constraints.ContainsAll.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="T:Rhino.Mocks.Constraints.Or"> - <summary> - Combines two constraints, constraint pass if either is fine. - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.Or.#ctor(Rhino.Mocks.Constraints.AbstractConstraint,Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.And"/> instance. - </summary> - <param name="c1">C1.</param> - <param name="c2">C2.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.Or.Eval(System.Object)"> - <summary> - determains if the object pass the constraints - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.Or.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="T:Rhino.Mocks.Constraints.Not"> - <summary> - Negate a constraint - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.Not.#ctor(Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.And"/> instance. - </summary> - <param name="c1">C1.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.Not.Eval(System.Object)"> - <summary> - determains if the object pass the constraints - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.Not.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="T:Rhino.Mocks.Constraints.And"> - <summary> - Combines two constraints - </summary> - <remarks></remarks> - </member> - <member name="M:Rhino.Mocks.Constraints.And.#ctor(Rhino.Mocks.Constraints.AbstractConstraint,Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.And"/> instance. - </summary> - <param name="c1">C1.</param> - <param name="c2">C2.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.And.Eval(System.Object)"> - <summary> - determains if the object pass the constraints - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.And.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="T:Rhino.Mocks.Constraints.Like"> - <summary> - Constrain the argument to validate according to regex pattern - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.Like.#ctor(System.String)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.Like"/> instance. - </summary> - <param name="pattern">Pattern.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.Like.Eval(System.Object)"> - <summary> - determains if the object pass the constraints - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.Like.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="T:Rhino.Mocks.Constraints.Contains"> - <summary> - Constraint that evaluate whatever an argument contains the specified string. - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.Contains.#ctor(System.String)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.Contains"/> instance. - </summary> - <param name="innerString">Inner string.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.Contains.Eval(System.Object)"> - <summary> - determains if the object pass the constraints - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.Contains.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="T:Rhino.Mocks.Constraints.EndsWith"> - <summary> - Constraint that evaluate whatever an argument ends with the specified string - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.EndsWith.#ctor(System.String)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.EndsWith"/> instance. - </summary> - <param name="end">End.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.EndsWith.Eval(System.Object)"> - <summary> - determains if the object pass the constraints - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.EndsWith.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="T:Rhino.Mocks.Constraints.StartsWith"> - <summary> - Constraint that evaluate whatever an argument start with the specified string - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.StartsWith.#ctor(System.String)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.StartsWith"/> instance. - </summary> - <param name="start">Start.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.StartsWith.Eval(System.Object)"> - <summary> - determains if the object pass the constraints - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.StartsWith.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="T:Rhino.Mocks.Constraints.Equal"> - <summary> - Constraint that evaluate whatever an object equals another - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.Equal.#ctor(System.Object)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.Equal"/> instance. - </summary> - <param name="obj">Obj.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.Equal.Eval(System.Object)"> - <summary> - determains if the object pass the constraints - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.Equal.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="T:Rhino.Mocks.Constraints.Anything"> - <summary> - Constraint that always returns true - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.Anything.Eval(System.Object)"> - <summary> - determains if the object pass the constraints - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.Anything.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="T:Rhino.Mocks.Constraints.ComparingConstraint"> - <summary> - Constraint that evaluate whatever a comparable is greater than another - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.ComparingConstraint.#ctor(System.IComparable,System.Boolean,System.Boolean)"> - <summary> - Creates a new <see cref="T:Rhino.Mocks.Constraints.ComparingConstraint"/> instance. - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.ComparingConstraint.Eval(System.Object)"> - <summary> - determains if the object pass the constraints - </summary> - </member> - <member name="P:Rhino.Mocks.Constraints.ComparingConstraint.Message"> - <summary> - Gets the message for this constraint - </summary> - <value></value> - </member> - <member name="T:Rhino.Mocks.Constraints.Is"> - <summary> - Central location for constraints - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.Is.GreaterThan(System.IComparable)"> - <summary> - Evaluate a greater than constraint for <see cref="T:System.IComparable"/>. - </summary> - <param name="objToCompare">The object the parameter should be greater than</param> - </member> - <member name="M:Rhino.Mocks.Constraints.Is.LessThan(System.IComparable)"> - <summary> - Evaluate a less than constraint for <see cref="T:System.IComparable"/>. - </summary> - <param name="objToCompare">The object the parameter should be less than</param> - </member> - <member name="M:Rhino.Mocks.Constraints.Is.LessThanOrEqual(System.IComparable)"> - <summary> - Evaluate a less than or equal constraint for <see cref="T:System.IComparable"/>. - </summary> - <param name="objToCompare">The object the parameter should be less than or equal to</param> - </member> - <member name="M:Rhino.Mocks.Constraints.Is.GreaterThanOrEqual(System.IComparable)"> - <summary> - Evaluate a greater than or equal constraint for <see cref="T:System.IComparable"/>. - </summary> - <param name="objToCompare">The object the parameter should be greater than or equal to</param> - </member> - <member name="M:Rhino.Mocks.Constraints.Is.Equal(System.Object)"> - <summary> - Evaluate an equal constraint for <see cref="T:System.IComparable"/>. - </summary> - <param name="obj">The object the parameter should equal to</param> - </member> - <member name="M:Rhino.Mocks.Constraints.Is.NotEqual(System.Object)"> - <summary> - Evaluate a not equal constraint for <see cref="T:System.IComparable"/>. - </summary> - <param name="obj">The object the parameter should not equal to</param> - </member> - <member name="M:Rhino.Mocks.Constraints.Is.Same(System.Object)"> - <summary> - Evaluate a same as constraint. - </summary> - <param name="obj">The object the parameter should the same as.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.Is.NotSame(System.Object)"> - <summary> - Evaluate a not same as constraint. - </summary> - <param name="obj">The object the parameter should not be the same as.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.Is.Anything"> - <summary> - A constraints that accept anything - </summary> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.Is.Null"> - <summary> - A constraint that accept only nulls - </summary> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.Is.NotNull"> - <summary> - A constraint that accept only non null values - </summary> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.Is.TypeOf(System.Type)"> - <summary> - A constraint that accept only value of the specified type - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.Is.TypeOf``1"> - <summary> - A constraint that accept only value of the specified type - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.Is.Matching``1(System.Predicate{``0})"> - <summary> - Evaluate a parameter using a predicate - </summary> - <param name="predicate">The predicate to use</param> - </member> - <member name="T:Rhino.Mocks.Constraints.IsArg`1"> - <summary> - Provides access to the constraintes defined in the class <see cref="T:Rhino.Mocks.Constraints.Is"/> to be used in context - with the <see cref="T:Rhino.Mocks.Arg`1"/> syntax. - </summary> - <typeparam name="T">The type of the argument</typeparam> - </member> - <member name="M:Rhino.Mocks.Constraints.IsArg`1.GreaterThan(System.IComparable)"> - <summary> - Evaluate a greater than constraint for <see cref="T:System.IComparable"/>. - </summary> - <param name="objToCompare">The object the parameter should be greater than</param> - </member> - <member name="M:Rhino.Mocks.Constraints.IsArg`1.LessThan(System.IComparable)"> - <summary> - Evaluate a less than constraint for <see cref="T:System.IComparable"/>. - </summary> - <param name="objToCompare">The object the parameter should be less than</param> - </member> - <member name="M:Rhino.Mocks.Constraints.IsArg`1.LessThanOrEqual(System.IComparable)"> - <summary> - Evaluate a less than or equal constraint for <see cref="T:System.IComparable"/>. - </summary> - <param name="objToCompare">The object the parameter should be less than or equal to</param> - </member> - <member name="M:Rhino.Mocks.Constraints.IsArg`1.GreaterThanOrEqual(System.IComparable)"> - <summary> - Evaluate a greater than or equal constraint for <see cref="T:System.IComparable"/>. - </summary> - <param name="objToCompare">The object the parameter should be greater than or equal to</param> - </member> - <member name="M:Rhino.Mocks.Constraints.IsArg`1.Equal(System.Object)"> - <summary> - Evaluate an equal constraint for <see cref="T:System.IComparable"/>. - </summary> - <param name="obj">The object the parameter should equal to</param> - </member> - <member name="M:Rhino.Mocks.Constraints.IsArg`1.NotEqual(System.Object)"> - <summary> - Evaluate a not equal constraint for <see cref="T:System.IComparable"/>. - </summary> - <param name="obj">The object the parameter should not equal to</param> - </member> - <member name="M:Rhino.Mocks.Constraints.IsArg`1.Same(System.Object)"> - <summary> - Evaluate a same as constraint. - </summary> - <param name="obj">The object the parameter should the same as.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.IsArg`1.NotSame(System.Object)"> - <summary> - Evaluate a not same as constraint. - </summary> - <param name="obj">The object the parameter should not be the same as.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.IsArg`1.Equals(System.Object)"> - <summary> - Throws NotSupportedException. Don't use Equals to define constraints. Use Equal instead. - </summary> - <param name="obj"></param> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.IsArg`1.GetHashCode"> - <summary> - Serves as a hash function for a particular type. - </summary> - <returns> - A hash code for the current <see cref="T:System.Object"/>. - </returns> - </member> - <member name="P:Rhino.Mocks.Constraints.IsArg`1.Anything"> - <summary> - A constraints that accept anything - </summary> - <returns></returns> - </member> - <member name="P:Rhino.Mocks.Constraints.IsArg`1.Null"> - <summary> - A constraint that accept only nulls - </summary> - <returns></returns> - </member> - <member name="P:Rhino.Mocks.Constraints.IsArg`1.NotNull"> - <summary> - A constraint that accept only non null values - </summary> - <returns></returns> - </member> - <member name="P:Rhino.Mocks.Constraints.IsArg`1.TypeOf"> - <summary> - A constraint that accept only value of the specified type. - The check is performed on the type that has been defined - as the argument type. - </summary> - </member> - <member name="T:Rhino.Mocks.Constraints.List"> - <summary> - Central location for constraints about lists and collections - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.List.IsIn(System.Object)"> - <summary> - Determines whether the specified obj is in the paramter. - The parameter must be IEnumerable. - </summary> - <param name="obj">Obj.</param> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.List.OneOf(System.Collections.IEnumerable)"> - <summary> - Determains whatever the parameter is in the collection. - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.List.Equal(System.Collections.IEnumerable)"> - <summary> - Determains that the parameter collection is identical to the specified collection - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.List.Count(Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Determines that the parameter collection has the specified number of elements. - </summary> - <param name="constraint">The constraint that should be applied to the collection count.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.List.Element(System.Int32,Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Determines that an element of the parameter collections conforms to another AbstractConstraint. - </summary> - <param name="index">The zero-based index of the list element.</param> - <param name="constraint">The constraint which should be applied to the list element.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.List.Element``1(``0,Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Determines that an element of the parameter collections conforms to another AbstractConstraint. - </summary> - <param name="key">The key of the element.</param> - <param name="constraint">The constraint which should be applied to the element.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.List.ContainsAll(System.Collections.IEnumerable)"> - <summary> - Determines that all elements of the specified collection are in the the parameter collection - </summary> - <param name="collection">The collection to compare against</param> - <returns>The constraint which should be applied to the list parameter.</returns> - </member> - <member name="T:Rhino.Mocks.Constraints.ListArg`1"> - <summary> - Provides access to the constraintes defined in the class <see cref="T:Rhino.Mocks.Constraints.Text"/> to be used in context - with the <see cref="T:Rhino.Mocks.Arg`1"/> syntax. - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.ListArg`1.IsIn(System.Object)"> - <summary> - Determines whether the specified object is in the paramter. - The parameter must be IEnumerable. - </summary> - <param name="obj">Obj.</param> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.ListArg`1.OneOf(System.Collections.IEnumerable)"> - <summary> - Determains whatever the parameter is in the collection. - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.ListArg`1.Equal(System.Collections.IEnumerable)"> - <summary> - Determains that the parameter collection is identical to the specified collection - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.ListArg`1.Count(Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Determines that the parameter collection has the specified number of elements. - </summary> - <param name="constraint">The constraint that should be applied to the collection count.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.ListArg`1.Element(System.Int32,Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Determines that an element of the parameter collections conforms to another AbstractConstraint. - </summary> - <param name="index">The zero-based index of the list element.</param> - <param name="constraint">The constraint which should be applied to the list element.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.ListArg`1.ContainsAll(System.Collections.IEnumerable)"> - <summary> - Determines that all elements of the specified collection are in the the parameter collection - </summary> - <param name="collection">The collection to compare against</param> - <returns>The constraint which should be applied to the list parameter.</returns> - </member> - <member name="M:Rhino.Mocks.Constraints.ListArg`1.Equals(System.Object)"> - <summary> - Throws NotSupportedException. Don't use Equals to define constraints. Use Equal instead. - </summary> - <param name="obj"></param> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.ListArg`1.GetHashCode"> - <summary> - Serves as a hash function for a particular type. - </summary> - <returns> - A hash code for the current <see cref="T:System.Object"/>. - </returns> - </member> - <member name="T:Rhino.Mocks.Constraints.OutRefArgDummy`1"> - <summary> - Provides a dummy field to pass as out or ref argument. - </summary> - <typeparam name="T"></typeparam> - </member> - <member name="F:Rhino.Mocks.Constraints.OutRefArgDummy`1.Dummy"> - <summary> - Dummy field to satisfy the compiler. Used for out and ref arguments. - </summary> - </member> - <member name="T:Rhino.Mocks.Constraints.Property"> - <summary> - Central location for constraints for object's properties - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.Property.Value(System.String,System.Object)"> - <summary> - Constrains the parameter to have property with the specified value - </summary> - <param name="propertyName">Name of the property.</param> - <param name="expectedValue">Expected value.</param> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.Property.Value(System.Type,System.String,System.Object)"> - <summary> - Constrains the parameter to have property with the specified value. - </summary> - <param name="declaringType">The type that declares the property, used to disambiguate between properties.</param> - <param name="propertyName">Name of the property.</param> - <param name="expectedValue">Expected value.</param> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.Property.ValueConstraint(System.String,Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Constrains the parameter to have a property satisfying a specified constraint. - </summary> - <param name="propertyName">Name of the property.</param> - <param name="propertyConstraint">Constraint for the property.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.Property.ValueConstraint(System.Type,System.String,Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Constrains the parameter to have a property satisfying a specified constraint. - </summary> - <param name="declaringType">The type that declares the property, used to disambiguate between properties.</param> - <param name="propertyName">Name of the property.</param> - <param name="propertyConstraint">Constraint for the property.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.Property.IsNull(System.String)"> - <summary> - Determines whether the parameter has the specified property and that it is null. - </summary> - <param name="propertyName">Name of the property.</param> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.Property.IsNull(System.Type,System.String)"> - <summary> - Determines whether the parameter has the specified property and that it is null. - </summary> - <param name="declaringType">The type that declares the property, used to disambiguate between properties.</param> - <param name="propertyName">Name of the property.</param> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.Property.IsNotNull(System.String)"> - <summary> - Determines whether the parameter has the specified property and that it is not null. - </summary> - <param name="propertyName">Name of the property.</param> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.Property.IsNotNull(System.Type,System.String)"> - <summary> - Determines whether the parameter has the specified property and that it is not null. - </summary> - <param name="declaringType">The type that declares the property, used to disambiguate between properties.</param> - <param name="propertyName">Name of the property.</param> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.Property.AllPropertiesMatch(System.Object)"> - <summary> - constraints the parameter to have the exact same property values as the expected object. - </summary> - <param name="expected">An object, of the same type as the parameter, whose properties are set with the expected values.</param> - <returns>An instance of the constraint that will do the actual check.</returns> - <remarks> - The parameter's public property values and public field values will be matched against the expected object's - public property values and public field values. The first mismatch will be reported and no further matching is done. - The matching is recursive for any property or field that has properties or fields of it's own. - Collections are supported through IEnumerable, which means the constraint will check if the actual and expected - collection contain the same values in the same order, where the values contained by the collection can have properties - and fields of their own that will be checked as well because of the recursive nature of this constraint. - </remarks> - </member> - <member name="T:Rhino.Mocks.Constraints.PublicField"> - <summary> - Central location for constraints for object's public fields - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.PublicField.Value(System.String,System.Object)"> - <summary> - Constrains the parameter to have a public field with the specified value - </summary> - <param name="publicFieldName">Name of the public field.</param> - <param name="expectedValue">Expected value.</param> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.PublicField.Value(System.Type,System.String,System.Object)"> - <summary> - Constrains the parameter to have a public field with the specified value. - </summary> - <param name="declaringType">The type that declares the public field, used to disambiguate between public fields.</param> - <param name="publicFieldName">Name of the public field.</param> - <param name="expectedValue">Expected value.</param> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.PublicField.ValueConstraint(System.String,Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Constrains the parameter to have a public field satisfying a specified constraint. - </summary> - <param name="publicFieldName">Name of the public field.</param> - <param name="publicFieldConstraint">Constraint for the public field.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.PublicField.ValueConstraint(System.Type,System.String,Rhino.Mocks.Constraints.AbstractConstraint)"> - <summary> - Constrains the parameter to have a public field satisfying a specified constraint. - </summary> - <param name="declaringType">The type that declares the public field, used to disambiguate between public fields.</param> - <param name="publicFieldName">Name of the public field.</param> - <param name="publicFieldConstraint">Constraint for the public field.</param> - </member> - <member name="M:Rhino.Mocks.Constraints.PublicField.IsNull(System.String)"> - <summary> - Determines whether the parameter has the specified public field and that it is null. - </summary> - <param name="publicFieldName">Name of the public field.</param> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.PublicField.IsNull(System.Type,System.String)"> - <summary> - Determines whether the parameter has the specified public field and that it is null. - </summary> - <param name="declaringType">The type that declares the public field, used to disambiguate between public fields.</param> - <param name="publicFieldName">Name of the public field.</param> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.PublicField.IsNotNull(System.String)"> - <summary> - Determines whether the parameter has the specified public field and that it is not null. - </summary> - <param name="publicFieldName">Name of the public field.</param> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.PublicField.IsNotNull(System.Type,System.String)"> - <summary> - Determines whether the parameter has the specified public field and that it is not null. - </summary> - <param name="declaringType">The type that declares the public field, used to disambiguate between public fields.</param> - <param name="publicFieldName">Name of the public field.</param> - <returns></returns> - </member> - <member name="T:Rhino.Mocks.Constraints.Text"> - <summary> - Central location for all text related constraints - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.Text.StartsWith(System.String)"> - <summary> - Constrain the argument to starts with the specified string - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.Text.EndsWith(System.String)"> - <summary> - Constrain the argument to end with the specified string - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.Text.Contains(System.String)"> - <summary> - Constrain the argument to contain the specified string - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.Text.Like(System.String)"> - <summary> - Constrain the argument to validate according to regex pattern - </summary> - </member> - <member name="T:Rhino.Mocks.Constraints.TextArg"> - <summary> - Provides access to the constraintes defined in the class <see cref="T:Rhino.Mocks.Constraints.Text"/> to be used in context - with the <see cref="T:Rhino.Mocks.Arg"/> syntax. - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.TextArg.StartsWith(System.String)"> - <summary> - Constrain the argument to starts with the specified string - </summary> - <returns></returns> - </member> - <member name="M:Rhino.Mocks.Constraints.TextArg.EndsWith(System.String)"> - <summary> - Constrain the argument to end with the specified string - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.TextArg.Contains(System.String)"> - <summary> - Constrain the argument to contain the specified string - </summary> - </member> - <member name="M:Rhino.Mocks.Constraints.TextArg.Like(System.String)"> - ... [truncated message content] |
From: <te...@us...> - 2009-07-01 14:54:13
|
Revision: 4550 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4550&view=rev Author: tehlike Date: 2009-07-01 13:46:24 +0000 (Wed, 01 Jul 2009) Log Message: ----------- Changes to build files to produce xml outputs for tests. Modified Paths: -------------- trunk/nhibernate/build-common/common-project.xml trunk/nhibernate/build-common/common.xml trunk/nhibernate/default.build trunk/nhibernate/teamcity.build Modified: trunk/nhibernate/build-common/common-project.xml =================================================================== --- trunk/nhibernate/build-common/common-project.xml 2009-06-30 17:32:16 UTC (rev 4549) +++ trunk/nhibernate/build-common/common-project.xml 2009-07-01 13:46:24 UTC (rev 4550) @@ -222,8 +222,9 @@ <target name="common.run-tests" description="Run NUnit tests"> - <exec program="${root.dir}/Tools/nunit/nunit-console-x86.exe"> - <arg line="${bin.dir}/${project::get-name()}.dll" /> + <call target="common.find-nunit" unless="${property::exists('nunit.found')}" /> + <exec program="${nunit-console}"> + <arg line="${bin.dir}/${project::get-name()}.dll /xml:${testresults.dir}/${project::get-name()}.dll-results.xml " /> </exec> <!--<nunit2> Modified: trunk/nhibernate/build-common/common.xml =================================================================== --- trunk/nhibernate/build-common/common.xml 2009-06-30 17:32:16 UTC (rev 4549) +++ trunk/nhibernate/build-common/common.xml 2009-07-01 13:46:24 UTC (rev 4550) @@ -174,8 +174,12 @@ <property name="build.root.dir" value="${root.dir}/build/${build.name}" /> <property name="build.dir" value="${build.root.dir}" /> <property name="bin.dir" value="${build.dir}/bin/${nant.settings.currentframework}" dynamic="true" /> + <property name="testresults.dir" value="${bin.dir}/test-results" /> + <property name="tools.dir" value="${root.dir}/Tools"/> </target> + + <target name="set-framework-configuration"> <if test="${not(target::exists('set-'+framework::get-target-framework()+'-framework-configuration'))}"> <fail message="The '${framework::get-target-framework()}' framework is not supported by this version of NHibernate." /> @@ -242,5 +246,9 @@ </fileset> <resourcefileset id="project.resources" /> </target> + + <target name="common.find-nunit"> + <property name="nunit-console" value="${tools.dir}/NUnit/nunit-console-x86.exe" /> + </target> </project> Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2009-06-30 17:32:16 UTC (rev 4549) +++ trunk/nhibernate/default.build 2009-07-01 13:46:24 UTC (rev 4550) @@ -47,6 +47,7 @@ <target name="prepare-build-directory" depends="init"> <mkdir dir="${bin.dir}" /> + <mkdir dir="${testresults.dir}" /> <call target="copy-referenced-assemblies" /> </target> Modified: trunk/nhibernate/teamcity.build =================================================================== --- trunk/nhibernate/teamcity.build 2009-06-30 17:32:16 UTC (rev 4549) +++ trunk/nhibernate/teamcity.build 2009-07-01 13:46:24 UTC (rev 4550) @@ -2,10 +2,9 @@ <project name="NHibernate TeamCity Build" xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd" default="clean-configure-test"> <property name="root.dir" value="." /> <include buildfile="${root.dir}/default.build" /> - <!-- <if test="${not property::exists('CCNetLabel') and not property::exists('build.number')}"> <fail>This build file is for use with CruiseControl.NET or TeamCity</fail> - </if>--> + </if> <property name="build.number" value="${CCNetLabel}" if="${property::exists('CCNetLabel')}" /> @@ -13,8 +12,6 @@ </target> <target name="copy-teamcity-configuration"> - <copy file="${teamcity.dotnet.nunitaddin}-2.5.0.dll" todir="${root.dir}/Tools/nunit/addins" /> - <copy file="${teamcity.dotnet.nunitaddin}-2.5.0.pdb" todir="${root.dir}/Tools/nunit/addins" /> <copy file="build-common/teamcity-hibernate.cfg.xml" tofile="${bin.dir}/hibernate.cfg.xml" /> </target> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-07-06 08:48:16
|
Revision: 4589 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4589&view=rev Author: tehlike Date: 2009-07-06 08:48:13 +0000 (Mon, 06 Jul 2009) Log Message: ----------- Adding ndoc to tools folder, and modifying build files accordingly. Modified Paths: -------------- trunk/nhibernate/build-common/common.xml trunk/nhibernate/doc/documentation.build Added Paths: ----------- trunk/nhibernate/Tools/NDoc/ trunk/nhibernate/Tools/NDoc/Configuration/ trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/ trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/ trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Accessibility.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/CustomMarshalers.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/ISymWrapper.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/MSBuild.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.Build.Engine.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.Build.Framework.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.Build.Tasks.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.Build.Utilities.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.JScript.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.VisualBasic.Vsa.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.VisualBasic.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.VisualC.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Configuration.Install.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Configuration.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Data.OracleClient.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Data.SqlXml.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Data.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Deployment.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Design.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.DirectoryServices.Protocols.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.DirectoryServices.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Drawing.Design.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Drawing.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.EnterpriseServices.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Management.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Messaging.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Runtime.Remoting.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Runtime.Serialization.Formatters.Soap.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Security.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.ServiceProcess.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Transactions.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Web.Mobile.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Web.RegularExpressions.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Web.Services.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Web.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Windows.Forms.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Xml.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/mscorlib.xml trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/sysglobl.xml trunk/nhibernate/Tools/NDoc/Interop.MSHelpCompiler.dll trunk/nhibernate/Tools/NDoc/Interop.MSHelpServices.dll trunk/nhibernate/Tools/NDoc/Mvp.Xml.dll trunk/nhibernate/Tools/NDoc/NDoc.Core.UI.dll trunk/nhibernate/Tools/NDoc/NDoc.Core.UI.pdb trunk/nhibernate/Tools/NDoc/NDoc.Core.dll trunk/nhibernate/Tools/NDoc/NDoc.Core.pdb trunk/nhibernate/Tools/NDoc/NDoc.Documenter.Intellisense.dll trunk/nhibernate/Tools/NDoc/NDoc.Documenter.Intellisense.pdb trunk/nhibernate/Tools/NDoc/NDoc.Documenter.UnifiedMsdn.dll trunk/nhibernate/Tools/NDoc/NDoc.Documenter.UnifiedMsdn.pdb trunk/nhibernate/Tools/NDoc/NDoc.Documenter.Xml.dll trunk/nhibernate/Tools/NDoc/NDoc.Documenter.Xml.pdb trunk/nhibernate/Tools/NDoc/NDoc.ExtendedUI.dll trunk/nhibernate/Tools/NDoc/NDoc.ExtendedUI.pdb trunk/nhibernate/Tools/NDoc/NDoc2 Alpha3t ReadMe.htm trunk/nhibernate/Tools/NDoc/NDocConsole.exe trunk/nhibernate/Tools/NDoc/NDocConsole.pdb trunk/nhibernate/Tools/NDoc/NDocGui.exe trunk/nhibernate/Tools/NDoc/NDocGui.exe.manifest trunk/nhibernate/Tools/NDoc/NDocGui.pdb Property changes on: trunk/nhibernate/Tools/NDoc ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: bugtraq:logregex + NH-\d+ Property changes on: trunk/nhibernate/Tools/NDoc/Configuration ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: bugtraq:logregex + NH-\d+ Property changes on: trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: bugtraq:logregex + NH-\d+ Property changes on: trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: bugtraq:logregex + NH-\d+ Added: trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Accessibility.xml =================================================================== --- trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Accessibility.xml (rev 0) +++ trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Accessibility.xml 2009-07-06 08:48:13 UTC (rev 4589) @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<doc> + <assembly> + <name>Accessibility</name> + </assembly> + <members /> +</doc> \ No newline at end of file Added: trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/CustomMarshalers.xml =================================================================== --- trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/CustomMarshalers.xml (rev 0) +++ trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/CustomMarshalers.xml 2009-07-06 08:48:13 UTC (rev 4589) @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<doc> + <assembly> + <name>CustomMarshalers</name> + </assembly> + <members /> +</doc> \ No newline at end of file Added: trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/ISymWrapper.xml =================================================================== --- trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/ISymWrapper.xml (rev 0) +++ trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/ISymWrapper.xml 2009-07-06 08:48:13 UTC (rev 4589) @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<doc> + <assembly> + <name>ISymWrapper</name> + </assembly> + <members> + <member name="Overload:System.Diagnostics.SymbolStore.SymBinder.GetReader"> + <summary>Gets the interface of the symbol reader for the current file.</summary> + </member> + <member name="Overload:System.Diagnostics.SymbolStore.SymReader.GetMethod"> + <summary>Gets a symbol reader method object.</summary> + </member> + </members> +</doc> \ No newline at end of file Added: trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/MSBuild.xml =================================================================== --- trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/MSBuild.xml (rev 0) +++ trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/MSBuild.xml 2009-07-06 08:48:13 UTC (rev 4589) @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<doc> + <assembly> + <name>MSBuild</name> + </assembly> + <members /> +</doc> \ No newline at end of file Added: trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.Build.Engine.xml =================================================================== --- trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.Build.Engine.xml (rev 0) +++ trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.Build.Engine.xml 2009-07-06 08:48:13 UTC (rev 4589) @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<doc> + <assembly> + <name>Microsoft.Build.Engine</name> + </assembly> + <members> + <member name="Overload:Microsoft.Build.BuildEngine.BuildItemGroup.AddNewItem"> + <summary>Adds a new <see cref="T:Microsoft.Build.BuildEngine.BuildItem" /> to the <see cref="T:Microsoft.Build.BuildEngine.BuildItemGroup" />.</summary> + </member> + <member name="Overload:Microsoft.Build.BuildEngine.BuildItem.SetMetadata"> + <summary>Assigns the specified value to the specified item metadata.</summary> + </member> + <member name="Overload:Microsoft.Build.BuildEngine.BuildPropertyGroup.AddNewProperty"> + <summary>Adds a new <see cref="T:Microsoft.Build.BuildEngine.BuildProperty" /> to the <see cref="T:Microsoft.Build.BuildEngine.BuildPropertyGroup" />.</summary> + </member> + <member name="Overload:Microsoft.Build.BuildEngine.BuildPropertyGroup.RemoveProperty"> + <summary>Removes the specified <see cref="T:Microsoft.Build.BuildEngine.BuildProperty" /> from the <see cref="T:Microsoft.Build.BuildEngine.BuildPropertyGroup" />.</summary> + </member> + <member name="Overload:Microsoft.Build.BuildEngine.BuildPropertyGroup.SetProperty"> + <summary>Sets the <see cref="P:Microsoft.Build.BuildEngine.BuildProperty.Value" /> of the <see cref="T:Microsoft.Build.BuildEngine.BuildProperty" /> with the specified <see cref="P:Microsoft.Build.BuildEngine.BuildProperty.Name" />.</summary> + </member> + <member name="Overload:Microsoft.Build.BuildEngine.BuildTask.SetParameterValue"> + <summary>Sets the value of the specified task parameter.</summary> + </member> + <member name="Overload:Microsoft.Build.BuildEngine.Engine.BuildProject"> + <summary>Builds the specified project.</summary> + </member> + <member name="Overload:Microsoft.Build.BuildEngine.Engine.BuildProjectFile"> + <summary>Loads the specified project file and builds the project.</summary> + </member> + <member name="Overload:Microsoft.Build.BuildEngine.ImportCollection.CopyTo"> + <summary>Copies the entire <see cref="T:Microsoft.Build.BuildEngine.ImportCollection" /> to a compatible one-dimensional <see cref="T:System.Array" />, starting at the specified index of the target array.</summary> + </member> + <member name="Overload:Microsoft.Build.BuildEngine.Project.AddNewItem"> + <summary>Adds the specified <see cref="dcef5f91-0613-4bfc-8ee9-d7004bb6d3a9">Item</see> element to the project.</summary> + </member> + <member name="Overload:Microsoft.Build.BuildEngine.Project.Build"> + <summary>Builds the project.</summary> + </member> + <member name="Overload:Microsoft.Build.BuildEngine.Project.Load"> + <summary>Loads the contents of a project file into the <see cref="T:Microsoft.Build.BuildEngine.Project" /> object.</summary> + </member> + <member name="Overload:Microsoft.Build.BuildEngine.Project.Save"> + <summary>Saves the project to a file.</summary> + </member> + <member name="Overload:Microsoft.Build.BuildEngine.Project.SetImportedProperty"> + <summary>Sets the value of a property in an imported project.</summary> + </member> + <member name="Overload:Microsoft.Build.BuildEngine.Project.SetProperty"> + <summary>Sets the value of the specified property.</summary> + </member> + <member name="Overload:Microsoft.Build.BuildEngine.UsingTaskCollection.CopyTo"> + <summary>Copies the entire <see cref="T:Microsoft.Build.BuildEngine.UsingTaskCollection" /> to a compatible one-dimensional <see cref="T:System.Array" />, starting at the specified index of the target array.</summary> + </member> + </members> +</doc> \ No newline at end of file Added: trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.Build.Framework.xml =================================================================== --- trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.Build.Framework.xml (rev 0) +++ trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.Build.Framework.xml 2009-07-06 08:48:13 UTC (rev 4589) @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<doc> + <assembly> + <name>Microsoft.Build.Framework</name> + </assembly> + <members /> +</doc> \ No newline at end of file Added: trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.Build.Tasks.xml =================================================================== --- trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.Build.Tasks.xml (rev 0) +++ trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.Build.Tasks.xml 2009-07-06 08:48:13 UTC (rev 4589) @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<doc> + <assembly> + <name>Microsoft.Build.Tasks</name> + </assembly> + <members /> +</doc> \ No newline at end of file Added: trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.Build.Utilities.xml =================================================================== --- trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.Build.Utilities.xml (rev 0) +++ trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.Build.Utilities.xml 2009-07-06 08:48:13 UTC (rev 4589) @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<doc> + <assembly> + <name>Microsoft.Build.Utilities</name> + </assembly> + <members> + <member name="Overload:Microsoft.Build.Utilities.CommandLineBuilder.AppendFileNameIfNotNull"> + <summary>Appends the command line with file name represented by the parameter, inserting quotation marks if necessary.</summary> + </member> + <member name="Overload:Microsoft.Build.Utilities.CommandLineBuilder.AppendFileNamesIfNotNull"> + <summary>Appends the command line with a list of file names, inserting quotation marks if necessary.</summary> + </member> + <member name="Overload:Microsoft.Build.Utilities.CommandLineBuilder.AppendSwitchIfNotNull"> + <summary>Appends the command line with a switch.</summary> + </member> + <member name="Overload:Microsoft.Build.Utilities.CommandLineBuilder.AppendSwitchUnquotedIfNotNull"> + <summary>Appends the command line with a switch, without attempting to encapsulate the switch parameters with quotation marks.</summary> + </member> + <member name="Overload:Microsoft.Build.Utilities.TaskLoggingHelper.LogCommandLine"> + <summary>Logs the command line.</summary> + </member> + <member name="Overload:Microsoft.Build.Utilities.TaskLoggingHelper.LogError"> + <summary>Logs an error.</summary> + </member> + <member name="Overload:Microsoft.Build.Utilities.TaskLoggingHelper.LogErrorFromException"> + <summary>Logs an error using the message from the specified exception.</summary> + </member> + <member name="Overload:Microsoft.Build.Utilities.TaskLoggingHelper.LogErrorFromResources"> + <summary>Logs an error using the specified resource string.</summary> + </member> + <member name="Overload:Microsoft.Build.Utilities.TaskLoggingHelper.LogErrorWithCodeFromResources"> + <summary>Logs an error with an error code using the specified resource string.</summary> + </member> + <member name="Overload:Microsoft.Build.Utilities.TaskLoggingHelper.LogMessage"> + <summary>Logs a message with the specified string.</summary> + </member> + <member name="Overload:Microsoft.Build.Utilities.TaskLoggingHelper.LogMessageFromResources"> + <summary>Logs a message with the specified resource string.</summary> + </member> + <member name="Overload:Microsoft.Build.Utilities.TaskLoggingHelper.LogMessagesFromFile"> + <summary>Logs errors, warnings, and messages for each line of text in the given file.</summary> + </member> + <member name="Overload:Microsoft.Build.Utilities.TaskLoggingHelper.LogWarning"> + <summary>Logs a warning.</summary> + </member> + <member name="Overload:Microsoft.Build.Utilities.TaskLoggingHelper.LogWarningFromException"> + <summary>Logs a warning using the message from the specified exception.</summary> + </member> + <member name="Overload:Microsoft.Build.Utilities.TaskLoggingHelper.LogWarningFromResources"> + <summary>Logs a warning using the specified resource string.</summary> + </member> + <member name="Overload:Microsoft.Build.Utilities.TaskLoggingHelper.LogWarningWithCodeFromResources"> + <summary>Logs a warning with a warning code using the specified resource string.</summary> + </member> + </members> +</doc> \ No newline at end of file Added: trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.JScript.xml =================================================================== --- trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.JScript.xml (rev 0) +++ trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.JScript.xml 2009-07-06 08:48:13 UTC (rev 4589) @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<doc> + <assembly> + <name>Microsoft.JScript</name> + </assembly> + <members> + <member name="Overload:Microsoft.JScript.COMFieldInfo.SetValue"> + <summary>Sets the value of the field supported by the given object.</summary> + </member> + <member name="Overload:Microsoft.JScript.COMMethodInfo.Invoke"> + <summary>Invokes the method or constructor represented by the current instance, using the specified parameters.</summary> + </member> + <member name="Overload:Microsoft.JScript.COMPropertyInfo.GetAccessors"> + <summary>Returns an array whose elements reflect the public <b>get</b>, <b>set</b>, and other accessors of the property reflected by the current instance.</summary> + </member> + <member name="Overload:Microsoft.JScript.COMPropertyInfo.GetGetMethod"> + <summary>Returns the public <b>get</b> accessor for this property.</summary> + </member> + <member name="Overload:Microsoft.JScript.COMPropertyInfo.GetSetMethod"> + <summary>Returns the public <b>set</b> accessor for this property.</summary> + </member> + <member name="Overload:Microsoft.JScript.COMPropertyInfo.GetValue"> + <summary>Returns the value of the property with optional index values for indexed properties.</summary> + </member> + <member name="Overload:Microsoft.JScript.COMPropertyInfo.SetValue"> + <summary>Sets the value of the property with optional index values for index properties.</summary> + </member> + <member name="Overload:Microsoft.JScript.Convert.ToString"> + <summary>Returns a <see cref="T:System.String" /> that represents the current <see cref="T:System.Object" />.</summary> + </member> + <member name="Overload:Microsoft.JScript.JScriptCodeProvider.CreateGenerator"> + <summary>Provides access to instances of the JScript code generator and code compiler.</summary> + </member> + <member name="Overload:Microsoft.JScript.JSMethodInfo.Invoke"> + <summary>Invokes the method or constructor represented by the current instance, using the specified parameters.</summary> + </member> + <member name="Overload:Microsoft.JScript.JSMethod.Invoke"> + <summary>Invokes the method or constructor represented by the current instance, using the specified parameters.</summary> + </member> + <member name="Overload:Microsoft.JScript.StringObject.Equals"> + <summary>Determines whether the specified <see cref="T:System.Object" /> instances are considered equal.</summary> + </member> + <member name="Overload:Microsoft.JScript.TypedArray.Equals"> + <summary>Determines whether the specified <see cref="T:System.Object" /> instances are considered equal.</summary> + </member> + </members> +</doc> \ No newline at end of file Added: trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.VisualBasic.Vsa.xml =================================================================== --- trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.VisualBasic.Vsa.xml (rev 0) +++ trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.VisualBasic.Vsa.xml 2009-07-06 08:48:13 UTC (rev 4589) @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<doc> + <assembly> + <name>Microsoft.VisualBasic.Vsa</name> + </assembly> + <members /> +</doc> \ No newline at end of file Added: trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.VisualBasic.xml =================================================================== --- trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.VisualBasic.xml (rev 0) +++ trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.VisualBasic.xml 2009-07-06 08:48:13 UTC (rev 4589) @@ -0,0 +1,263 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<doc> + <assembly> + <name>Microsoft.VisualBasic</name> + </assembly> + <members> + <member name="Overload:Microsoft.VisualBasic.ApplicationServices.BuiltInRoleConverter.CanConvertTo"> + <summary>Gets a value indicating whether this converter can convert an object to the given destination type using the context.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.ApplicationServices.BuiltInRoleConverter.ConvertTo"> + <summary>Converts the given object to another type.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.ApplicationServices.User.IsInRole"> + <summary>Determines whether the current user belongs to the specified role.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Collection.Item"> + <summary>Returns a specific element of a <b>Collection</b> object either by position or by key. Read-only.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Collection.Remove"> + <summary>Removes an element from a <b>Collection</b> object.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Conversion.ErrorToString"> + <summary>Returns the error message that corresponds to a given error number.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Conversion.Fix"> + <summary>Return the integer portion of a number.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Conversion.Hex"> + <summary>Returns a string representing the hexadecimal value of a number.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Conversion.Int"> + <summary>Return the integer portion of a number.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Conversion.Oct"> + <summary>Returns a string representing the octal value of a number.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Conversion.Val"> + <summary>Returns the numbers contained in a string as a numeric value of appropriate type.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.DateAndTime.DateAdd"> + <summary>Returns a <b>Date</b> value containing a date and time value to which a specified time interval has been added.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.DateAndTime.DateDiff"> + <summary>Returns a <b>Long</b> value specifying the number of time intervals between two <b>Date</b> values.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.DateAndTime.DatePart"> + <summary>Returns an <b>Integer</b> value containing the specified component of a given <b>Date</b> value.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Devices.Audio.Play"> + <summary>Plays a .wav sound file.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Devices.Keyboard.SendKeys"> + <summary>Sends one or more keystrokes to the active window, as if typed on the keyboard.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Devices.Network.DownloadFile"> + <summary>Downloads the specified remote file and saves it in the specified location.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Devices.Network.Ping"> + <summary>Pings the specified server.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Devices.Network.UploadFile"> + <summary>Sends the specified file to the specified host address.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Devices.Ports.OpenSerialPort"> + <summary>Creates and opens a <see cref="T:System.IO.Ports.SerialPort" /> object.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileIO.FileSystem.CopyDirectory"> + <summary>Copies a directory to another directory.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileIO.FileSystem.CopyFile"> + <summary>Copies a file to a new location.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileIO.FileSystem.DeleteDirectory"> + <summary>Deletes a directory.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileIO.FileSystem.DeleteFile"> + <summary>Deletes a file.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileIO.FileSystem.FindInFiles"> + <summary>Returns a read-only collection of strings representing the names of files containing the specified text.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileIO.FileSystem.GetDirectories"> + <summary>Returns a collection of strings representing the path names of subdirectories within a directory.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileIO.FileSystem.GetFiles"> + <summary>Returns a read-only collection of strings representing the names of files within a directory.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileIO.FileSystem.MoveDirectory"> + <summary>Moves a directory from one location to another.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileIO.FileSystem.MoveFile"> + <summary>Moves a file to a new location.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileIO.FileSystem.OpenTextFieldParser"> + <summary>The <b>OpenTextFieldParser</b> method allows you to create a <see cref="d44bd2b0-7dfc-410b-a48b-534c1e97460b">TextFieldParser Object</see>, which provides a way to easily and efficiently parse structured text files, such as logs. The <b>TextFieldParser</b> object can be used to read both delimited and fixed-width files.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileIO.FileSystem.OpenTextFileReader"> + <summary>Opens a <see cref="T:System.IO.StreamReader" />.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileIO.FileSystem.OpenTextFileWriter"> + <summary>Opens a <see cref="T:System.IO.StreamWriter" />.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileIO.FileSystem.ReadAllText"> + <summary>Returns the contents of a text file as a <b>String</b>.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileIO.FileSystem.WriteAllText"> + <summary>Writes text to a file.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileIO.TextFieldParser.Dispose"> + <summary>Releases resources used by the <see cref="T:Microsoft.VisualBasic.FileIO.TextFieldParser" /> object.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileSystem.ChDrive"> + <summary>Changes the current drive.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileSystem.CurDir"> + <summary>Returns a string representing the current path. The <see cref="4c145456-5453-4bda-aab5-578dc8bee59a">My.Computer.FileSystem Object</see> gives you greater productivity and performance in file I/O operations than <b>CurDir</b>. For more information, see <see cref="2ebefb41-a889-46a5-9406-8688329288c3">My.Computer.FileSystem.CurrentDirectory Property</see>.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileSystem.Dir"> + <summary>Returns a string representing the name of a file, directory, or folder that matches a specified pattern or file attribute, or the volume label of a drive. The <see cref="4c145456-5453-4bda-aab5-578dc8bee59a">My.Computer.FileSystem Object</see> gives you greater productivity and performance in file I/O operations than the <b>Dir</b> function. See <see cref="24b3bb65-19d6-41b4-b5c5-532ac1fdb4f4">My.Computer.FileSystem.GetDirectoryInfo Method</see> for more information.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileSystem.FileGet"> + <summary>Reads data from an open disk file into a variable. The <b>My</b> feature gives you greater productivity and performance in file I/O operations than <b>FileGet</b>. For more information, see <see cref="4c145456-5453-4bda-aab5-578dc8bee59a">My.Computer.FileSystem Object</see>.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileSystem.FilePut"> + <summary>Writes data from a variable to a disk file. The <b>My</b> feature gives you greater productivity and performance in file I/O operations than <b>FilePut</b>. For more information, see <see cref="4c145456-5453-4bda-aab5-578dc8bee59a">My.Computer.FileSystem Object</see>.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileSystem.Input"> + <summary>Reads data from an open sequential file and assigns the data to variables.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileSystem.Lock"> + <summary>Controls access by other processes to all or part of a file opened using the <b>Open</b> function. The <b>My</b> feature gives you greater productivity and performance in file I/O operations than <b>Lock</b> and <b>Unlock</b>. For more information, see <see cref="4c145456-5453-4bda-aab5-578dc8bee59a">My.Computer.FileSystem Object</see>.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileSystem.Seek"> + <summary>Returns a <b>Long</b> specifying the current read/write position within a file opened using the <b>FileOpen</b> function, or sets the position for the next read/write operation within a file opened using the <b>FileOpen</b> function. The <b>My</b> feature gives you greater productivity and performance in file I/O operations than <b>Seek</b>. For more information, see <see cref="4c145456-5453-4bda-aab5-578dc8bee59a">My.Computer.FileSystem Object</see>.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileSystem.TAB"> + <summary>Used with the <b>Print</b> or <b>PrintLine</b> functions to position output.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.FileSystem.Unlock"> + <summary>Controls access by other processes to all or part of a file opened using the <b>Open</b> function. The <b>My</b> feature gives you greater productivity and performance in file I/O operations than <b>Lock</b> and <b>Unlock</b>. For more information, see <see cref="4c145456-5453-4bda-aab5-578dc8bee59a">My.Computer.FileSystem Object</see>.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Interaction.AppActivate"> + <summary>Activates an application that is already running.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Interaction.Environ"> + <summary>Returns the string associated with an operating-system environment variable.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Logging.FileLogTraceListener.Dispose"> + <summary>Closes the underlying stream and optionally releases the managed resources.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Logging.FileLogTraceListener.TraceData"> + <summary>Writes trace data to the output file.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Logging.FileLogTraceListener.TraceEvent"> + <summary>Writes trace and event information to the output file or stream.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Logging.FileLogTraceListener.Write"> + <summary>Writes a message to disk verbatim, without any additional context information.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Logging.FileLogTraceListener.WriteLine"> + <summary>Writes a verbatim message to disk, followed by the current line terminator, without any additional context information.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Logging.Log.WriteEntry"> + <summary>Writes a message to the application's log listeners.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Logging.Log.WriteException"> + <summary>Writes exception information to the application's log listeners.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.MyServices.ClipboardProxy.ContainsText"> + <summary>Determines if there is text on the Clipboard.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.MyServices.ClipboardProxy.GetText"> + <summary>Retrieves text from the Clipboard.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.MyServices.ClipboardProxy.SetAudio"> + <summary>Writes audio data to the Clipboard.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.MyServices.ClipboardProxy.SetText"> + <summary>Writes text to the Clipboard.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.MyServices.FileSystemProxy.CopyDirectory"> + <summary>Copies a directory to another directory.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.MyServices.FileSystemProxy.CopyFile"> + <summary>Copies a file to a new location.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.MyServices.FileSystemProxy.DeleteDirectory"> + <summary>Deletes a directory.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.MyServices.FileSystemProxy.DeleteFile"> + <summary>Deletes a file.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.MyServices.FileSystemProxy.FindInFiles"> + <summary>Returns a read-only collection of strings representing the names of files containing the specified text.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.MyServices.FileSystemProxy.GetDirectories"> + <summary>Returns a collection of strings representing the path names of subdirectories within a directory.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.MyServices.FileSystemProxy.GetFiles"> + <summary>Returns a read-only collection of strings representing the names of files within a directory.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.MyServices.FileSystemProxy.MoveDirectory"> + <summary>Moves a directory from one location to another.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.MyServices.FileSystemProxy.MoveFile"> + <summary>Moves a file to a new location.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.MyServices.FileSystemProxy.OpenTextFieldParser"> + <summary>The <b>OpenTextFieldParser</b> method allows you to create a <see cref="d44bd2b0-7dfc-410b-a48b-534c1e97460b">TextFieldParser Object</see>, which provides a way to easily and efficiently parse structured text files, such as logs. The <b>TextFieldParser</b> object can be used to read both delimited and fixed-width files.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.MyServices.FileSystemProxy.OpenTextFileReader"> + <summary>Opens a <see cref="T:System.IO.StreamReader" />.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.MyServices.FileSystemProxy.OpenTextFileWriter"> + <summary>Opens a <see cref="T:System.IO.StreamWriter" />.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.MyServices.FileSystemProxy.ReadAllText"> + <summary>Returns the contents of a text file as a <b>String</b>.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.MyServices.FileSystemProxy.WriteAllText"> + <summary>Writes text to a file.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.MyServices.RegistryProxy.SetValue"> + <summary>Writes a value to a registry key.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Strings.Asc"> + <summary>Returns an <b>Integer</b> value representing the character code corresponding to a character.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Strings.AscW"> + <summary>Returns an <b>Integer</b> value representing the character code corresponding to a character.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Strings.Filter"> + <summary>Returns a zero-based array containing a subset of a <b>String</b> array based on specified filter criteria.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Strings.InStr"> + <summary>Returns an integer specifying the start position of the first occurrence of one string within another.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Strings.Join"> + <summary>Returns a string created by joining a number of substrings contained in an array.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Strings.LCase"> + <summary>Returns a string or character converted to lowercase.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Strings.Len"> + <summary>Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Strings.Mid"> + <summary>Returns a string containing a specified number of characters from a string.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Strings.StrDup"> + <summary>Returns a string or object consisting of the specified character repeated the specified number of times.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.Strings.UCase"> + <summary>Returns a string or character containing the specified string converted to uppercase.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.VBMath.Randomize"> + <summary>Initializes the random-number generator.</summary> + </member> + <member name="Overload:Microsoft.VisualBasic.VBMath.Rnd"> + <summary>Returns a random number of type <b>Single</b>.</summary> + </member> + </members> +</doc> \ No newline at end of file Added: trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.VisualC.xml =================================================================== --- trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.VisualC.xml (rev 0) +++ trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/Microsoft.VisualC.xml 2009-07-06 08:48:13 UTC (rev 4589) @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<doc> + <assembly> + <name>Microsoft.VisualC</name> + </assembly> + <members /> +</doc> \ No newline at end of file Added: trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Configuration.Install.xml =================================================================== --- trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Configuration.Install.xml (rev 0) +++ trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Configuration.Install.xml 2009-07-06 08:48:13 UTC (rev 4589) @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<doc> + <assembly> + <name>System.Configuration.Install</name> + </assembly> + <members> + <member name="Overload:System.Configuration.Install.InstallerCollection.AddRange"> + <summary>Adds the specified installers to this collection.</summary> + </member> + </members> +</doc> \ No newline at end of file Added: trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Configuration.xml =================================================================== --- trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Configuration.xml (rev 0) +++ trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Configuration.xml 2009-07-06 08:48:13 UTC (rev 4589) @@ -0,0 +1,164 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<doc> + <assembly> + <name>System.Configuration</name> + </assembly> + <members> + <member name="Overload:System.Configuration.CommaDelimitedStringCollectionConverter.ConvertFrom"> + <summary>Converts a <see cref="T:System.String" /> object to a <see cref="T:System.Configuration.CommaDelimitedStringCollection" /> object.</summary> + </member> + <member name="Overload:System.Configuration.CommaDelimitedStringCollectionConverter.ConvertTo"> + <summary>Converts a <see cref="T:System.Configuration.CommaDelimitedStringCollection" /> object to a <see cref="T:System.String" /> object.</summary> + </member> + <member name="Overload:System.Configuration.ConfigurationConverterBase.CanConvertFrom"> + <summary>Determines whether the conversion is allowed.</summary> + </member> + <member name="Overload:System.Configuration.ConfigurationConverterBase.CanConvertTo"> + <summary>Determines whether the conversion is allowed.</summary> + </member> + <member name="Overload:System.Configuration.ConfigurationElementCollection.BaseAdd"> + <summary>Adds a <see cref="T:System.Configuration.ConfigurationElement" /> to an <see cref="T:System.Configuration.ConfigurationElementCollection" /> instance when overridden in a derived class.</summary> + </member> + <member name="Overload:System.Configuration.ConfigurationElementCollection.BaseGet"> + <summary>Gets the <see cref="T:System.Configuration.ConfigurationElement" /> at the specified index location.</summary> + </member> + <member name="Overload:System.Configuration.ConfigurationElementCollection.CreateNewElement"> + <summary>When overridden in a derived class, creates a new <see cref="T:System.Configuration.ConfigurationElement" />.</summary> + </member> + <member name="Overload:System.Configuration.ConfigurationElementCollection.Equals"> + <summary>Compares the <see cref="T:System.Configuration.ConfigurationElementCollection" /> to the specified object.</summary> + </member> + <member name="Overload:System.Configuration.ConfigurationElement.Equals"> + <summary>Compares the current <see cref="T:System.Configuration.ConfigurationElement" /> instance to the specified object.</summary> + </member> + <member name="Overload:System.Configuration.ConfigurationElement.Item"> + <summary>Gets or sets a property, attribute, or child element of this <see cref="T:System.Configuration.ConfigurationElement" /> object.</summary> + </member> + <member name="Overload:System.Configuration.ConfigurationErrorsException.GetFilename"> + <summary>Gets the path to the configuration file being read when this configuration exception was thrown.</summary> + </member> + <member name="Overload:System.Configuration.ConfigurationErrorsException.GetLineNumber"> + <summary>Gets the line number within the configuration file that was being processed when this configuration exception was thrown.</summary> + </member> + <member name="Overload:System.Configuration.ConfigurationManager.OpenExeConfiguration"> + <summary>Opens the specified client configuration file as a <see cref="T:System.Configuration.Configuration" /> object.</summary> + </member> + <member name="Overload:System.Configuration.ConfigurationSectionCollection.Get"> + <summary>Gets a <see cref="T:System.Configuration.ConfigurationSection" /> object from this <see cref="T:System.Configuration.ConfigurationSectionCollection" />.</summary> + </member> + <member name="Overload:System.Configuration.ConfigurationSectionCollection.Item"> + <summary>Gets the specified <see cref="T:System.Configuration.ConfigurationSection" /> object.</summary> + </member> + <member name="Overload:System.Configuration.ConfigurationSectionGroupCollection.Get"> + <summary>Gets a <see cref="T:System.Configuration.ConfigurationSectionGroup" /> object from the collection</summary> + </member> + <member name="Overload:System.Configuration.ConfigurationSectionGroupCollection.Item"> + <summary>Gets or sets a <see cref="T:System.Configuration.ConfigurationSectionGroup" /> contained in this <see cref="T:System.Configuration.ConfigurationSectionGroupCollection" />.</summary> + </member> + <member name="Overload:System.Configuration.ConfigurationSectionGroup.ForceDeclaration"> + <summary>Forces the declaration for this <see cref="T:System.Configuration.ConfigurationSectionGroup" /> object.</summary> + </member> + <member name="Overload:System.Configuration.Configuration.Save"> + <summary>Writes the configuration settings contained within this <see cref="T:System.Configuration.Configuration" /> object to the current XML configuration file.</summary> + </member> + <member name="Overload:System.Configuration.Configuration.SaveAs"> + <summary>Writes the configuration settings contained within this <see cref="T:System.Configuration.Configuration" /> object to the specified XML configuration file.</summary> + </member> + <member name="Overload:System.Configuration.ConnectionStringSettingsCollection.Item"> + <summary>Gets or sets a <see cref="T:System.Configuration.ConnectionStringSettings" /> object in the collection.</summary> + </member> + <member name="Overload:System.Configuration.ConnectionStringSettingsCollection.Remove"> + <summary>Removes a <see cref="T:System.Configuration.ConnectionStringSettings" /> object from the collection.</summary> + </member> + <member name="Overload:System.Configuration.GenericEnumConverter.ConvertFrom"> + <summary>Converts a <see cref="T:System.String" /> to an <see cref="T:System.Enum" /> type.</summary> + </member> + <member name="Overload:System.Configuration.GenericEnumConverter.ConvertTo"> + <summary>Converts an <see cref="T:System.Enum" /> type to a <see cref="T:System.String" /> value.</summary> + </member> + <member name="Overload:System.Configuration.InfiniteIntConverter.ConvertFrom"> + <summary>Converts a <see cref="T:System.String" /> to an <see cref="T:System.Int32" />.</summary> + </member> + <member name="Overload:System.Configuration.InfiniteIntConverter.ConvertTo"> + <summary>Converts an <see cref="T:System.Int32" /> to a <see cref="T:System.String" />.</summary> + </member> + <member name="Overload:System.Configuration.InfiniteTimeSpanConverter.ConvertFrom"> + <summary>Converts a <see cref="T:System.String" /> to a <see cref="T:System.TimeSpan" />.</summary> + </member> + <member name="Overload:System.Configuration.InfiniteTimeSpanConverter.ConvertTo"> + <summary>Converts a <see cref="T:System.TimeSpan" /> to a <see cref="T:System.String" />.</summary> + </member> + <member name="Overload:System.Configuration.Internal.DelegatingConfigHost.OpenStreamForRead"> + <summary>This member is for internal use only.</summary> + </member> + <member name="Overload:System.Configuration.Internal.DelegatingConfigHost.OpenStreamForWrite"> + <summary>This member is for internal use only.</summary> + </member> + <member name="Overload:System.Configuration.Internal.DelegatingConfigHost.WriteCompleted"> + <summary>This member is for internal use only.</summary> + </member> + <member name="Overload:System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead"> + <summary>This member is for internal use only.</summary> + </member> + <member name="Overload:System.Configuration.Internal.IInternalConfigHost.OpenStreamForWrite"> + <summary>This member is for internal use only.</summary> + </member> + <member name="Overload:System.Configuration.Internal.IInternalConfigHost.WriteCompleted"> + <summary>This member is for internal use only.</summary> + </member> + <member name="Overload:System.Configuration.KeyValueConfigurationCollection.Add"> + <summary>Adds a <see cref="T:System.Configuration.KeyValueConfigurationElement" /> object to the collection.</summary> + </member> + <member name="Overload:System.Configuration.KeyValueConfigurationCollection.CreateNewElement"> + <summary>When overridden in a derived class, the <see cref="Overload:System.Configuration.KeyValueConfigurationCollection.CreateNewElement" /> method creates a new <see cref="T:System.Configuration.KeyValueConfigurationElement" /> object.</summary> + </member> + <member name="Overload:System.Configuration.KeyValueConfigurationCollection.Item"> + <summary>Gets or sets the <see cref="T:System.Configuration.KeyValueConfigurationElement" /> object.</summary> + </member> + <member name="Overload:System.Configuration.NameValueConfigurationCollection.Remove"> + <summary>Removes a <see cref="T:System.Configuration.NameValueConfigurationElement" /> object from the collection.</summary> + </member> + <member name="Overload:System.Configuration.ProviderSettingsCollection.Item"> + <summary>Indexer to an instance of the <see cref="T:System.Configuration.ProviderSettingsCollection" /> class.</summary> + </member> + <member name="Overload:System.Configuration.SectionInformation.ForceDeclaration"> + <summary>Forces the associated configuration section to appear in the configuration file.</summary> + </member> + <member name="Overload:System.Configuration.TimeSpanMinutesConverter.ConvertFrom"> + <summary>Converts a <see cref="T:System.String" /> to a <see cref="T:System.TimeSpan" />.</summary> + </member> + <member name="Overload:System.Configuration.TimeSpanMinutesConverter.ConvertTo"> + <summary>Converts a <see cref="T:System.TimeSpan" /> to a <see cref="T:System.String" />.</summary> + </member> + <member name="Overload:System.Configuration.TimeSpanMinutesOrInfiniteConverter.ConvertFrom"> + <summary>Converts a <see cref="T:System.String" /> to a <see cref="T:System.TimeSpan" />.</summary> + </member> + <member name="Overload:System.Configuration.TimeSpanMinutesOrInfiniteConverter.ConvertTo"> + <summary>Converts a <see cref="T:System.TimeSpan" /> to a <see cref="T:System.String" />.</summary> + </member> + <member name="Overload:System.Configuration.TimeSpanSecondsConverter.ConvertFrom"> + <summary>Converts a <see cref="T:System.String" /> to a <see cref="T:System.TimeSpan" />.</summary> + </member> + <member name="Overload:System.Configuration.TimeSpanSecondsConverter.ConvertTo"> + <summary>Converts a <see cref="T:System.TimeSpan" /> to a <see cref="T:System.String" />.</summary> + </member> + <member name="Overload:System.Configuration.TimeSpanSecondsOrInfiniteConverter.ConvertFrom"> + <summary>Converts a <see cref="T:System.String" /> to a <see cref="T:System.TimeSpan" />.</summary> + </member> + <member name="Overload:System.Configuration.TimeSpanSecondsOrInfiniteConverter.ConvertTo"> + <summary>Converts a <see cref="T:System.TimeSpan" /> to a. <see cref="T:System.String" />.</summary> + </member> + <member name="Overload:System.Configuration.TypeNameConverter.ConvertFrom"> + <summary>Converts a <see cref="T:System.String" /> to a <see cref="T:System.Type" />.</summary> + </member> + <member name="Overload:System.Configuration.TypeNameConverter.ConvertTo"> + <summary>Converts a <see cref="T:System.Type" /> to a <see cref="T:System.String" />.</summary> + </member> + <member name="Overload:System.Configuration.WhiteSpaceTrimStringConverter.ConvertFrom"> + <summary>Converts a <see cref="T:System.String" /> to canonical form.</summary> + </member> + <member name="Overload:System.Configuration.WhiteSpaceTrimStringConverter.ConvertTo"> + <summary>Converts a <see cref="T:System.String" /> to canonical form.</summary> + </member> + </members> +</doc> \ No newline at end of file Added: trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Data.OracleClient.xml =================================================================== --- trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Data.OracleClient.xml (rev 0) +++ trunk/nhibernate/Tools/NDoc/Configuration/Supplemental Docs/EN/System.Data.OracleClient.xml 2009-07-06 08:48:13 UTC (rev 4589) @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<doc> + <assembly> + <name>System.Data.OracleClient</name> + </assembly> + <members> + <member name="Overload:System.Data.OracleClient.OracleBFile.CopyTo"> + <summary>Copies data from this <see cref="T:System.Data.OracleClient.OracleBFile" /> to a destination <see cref="T:System.Data.OracleClient.OracleLob" />.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleBinary.Equals"> + <summary>Compares two <see cref="T:System.Data.OracleClient.OracleBinary" /> structures to determine if they are equal.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleBoolean.Equals"> + <summary>Compares two <see cref="T:System.Data.OracleClient.OracleBoolean" /> structures to determine if they are equal.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleBoolean.op_Explicit"> + <summary>Used for explicit <see cref="T:System.Data.OracleClient.OracleBoolean" /> conversion.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleCommandBuilder.GetDeleteCommand"> + <summary>Gets the automatically generated <see cref="T:System.Data.OracleClient.OracleCommand" /> object required to perform deletions on the database.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleCommandBuilder.GetInsertCommand"> + <summary>Gets the automatically generated <see cref="T:System.Data.OracleClient.OracleCommand" /> object required to perform insertions on the database.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleCommandBuilder.GetUpdateCommand"> + <summary>Gets the automatically generated <see cref="T:System.Data.OracleClient.OracleCommand" /> object required to perform updates on the database.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleCommand.ExecuteReader"> + <summary>Sends the <see cref="P:System.Data.OracleClient.OracleCommand.CommandText" /> to the <see cref="P:System.Data.OracleClient.OracleCommand.Connection" /> and builds an <see cref="T:System.Data.OracleClient.OracleDataReader" />.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleConnection.BeginTransaction"> + <summary>Begins a transaction at the database.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleConnection.GetSchema"> + <summary>Returns schema information for the data source of this <see cref="T:System.Data.OracleClient.OracleConnection" />.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleDataReader.Item"> + <summary>Gets the value of a column in its native format.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleDateTime.Equals"> + <summary>Compares the supplied object parameter to the <see cref="P:System.Data.OracleClient.OracleDateTime.Value" /> property of the <see cref="T:System.Data.OracleClient.OracleDateTime" /> object.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleDateTime.op_Explicit"> + <summary>Used for explicit <see cref="T:System.Data.OracleClient.OracleDateTime" /> conversion.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleLob.BeginBatch"> + <summary>Prevents server-side triggers from firing while performing multiple write operations.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleLob.CopyTo"> + <summary>Copies from this <see cref="T:System.Data.OracleClient.OracleLob" /> to a destination <b>OracleLob</b>.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleLob.Erase"> + <summary>Erases data from this <see cref="T:System.Data.OracleClient.OracleLob" />.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleMonthSpan.Equals"> + <summary>Compares the supplied object parameter to the <see cref="P:System.Data.OracleClient.OracleMonthSpan.Value" /> property of the <see cref="T:System.Data.OracleClient.OracleMonthSpan" /> object.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleMonthSpan.op_Explicit"> + <summary>Used for explicit <see cref="T:System.Data.OracleClient.OracleMonthSpan" /> conversion.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleNumber.Equals"> + <summary>Compares the specified items to other items.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleNumber.Log"> + <summary>Performs a logarithmic calculation on an <see cref="T:System.Data.OracleClient.OracleNumber" />.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleNumber.op_Explicit"> + <summary>Used for explicit <see cref="T:System.Data.OracleClient.OracleNumber" /> conversion.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleNumber.Pow"> + <summary>Calculates the result of raising a specified <see cref="T:System.Data.OracleClient.OracleNumber" /> structure to the specified power.</summary> + </member> + <member name="Overload:System.Data.OracleClient.OracleParameterCollection.Add"> + <summary>Adds a <see cref="T:System.Data.OracleClient.OracleParameter" /> to the <see cref="T:System.Data.Ora... [truncated message content] |
From: <fab...@us...> - 2009-07-13 22:36:39
|
Revision: 4608 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4608&view=rev Author: fabiomaulo Date: 2009-07-13 22:36:33 +0000 (Mon, 13 Jul 2009) Log Message: ----------- Merge r4607 Modified Paths: -------------- trunk/nhibernate/default.build trunk/nhibernate/doc/reference/master.xml trunk/nhibernate/doc/reference/modules/architecture.xml trunk/nhibernate/doc/reference/modules/example_mappings.xml trunk/nhibernate/doc/reference/styles/fopdf.xsl trunk/nhibernate/src/NHibernate/ISession.cs Added Paths: ----------- trunk/nhibernate/doc/reference/images/EmployerEmployee.png trunk/nhibernate/doc/reference/images/fullcream.png trunk/nhibernate/doc/reference/images/lite.png trunk/nhibernate/doc/reference/images/overview.png Removed Paths: ------------- trunk/nhibernate/doc/reference/images/EmployerEmployee.gif trunk/nhibernate/doc/reference/images/EmployerEmployee.zargo trunk/nhibernate/doc/reference/images/full_cream.gif trunk/nhibernate/doc/reference/images/full_cream.svg trunk/nhibernate/doc/reference/images/hibernate_logo_a.png trunk/nhibernate/doc/reference/images/lite.gif trunk/nhibernate/doc/reference/images/lite.svg trunk/nhibernate/doc/reference/images/overview.gif trunk/nhibernate/doc/reference/images/overview.svg Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2009-07-13 22:32:35 UTC (rev 4607) +++ trunk/nhibernate/default.build 2009-07-13 22:36:33 UTC (rev 4608) @@ -151,6 +151,11 @@ description="Builds the Help Documentation and the API documentation"> <nant buildfile="doc/documentation.build" target="api manual" /> </target> + + <target name="manual" depends="init binaries" + description="Builds the Help Documentation"> + <nant buildfile="doc/documentation.build" target="manual" /> + </target> <target name="build-all-frameworks" depends="init"> <!-- Save the current framework --> @@ -293,8 +298,8 @@ <target name="installer" depends="init binaries doc prepare-installer-files"> <nant buildfile="src/NHibernate.Setup/NHibernate.Setup.build" target="msi" /> </target> - - <target name="package" depends="init test-all-frameworks binaries doc sources-zip binaries-zip installer" + + <target name="package" depends="init set-release-project-configuration test binaries manual sources-zip binaries-zip" description="Creates files for the File Release System on SourceForge"> <property name="dist.output.dir" value="${project::get-base-directory()}/build/" /> Deleted: trunk/nhibernate/doc/reference/images/EmployerEmployee.gif =================================================================== (Binary files differ) Added: trunk/nhibernate/doc/reference/images/EmployerEmployee.png =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/doc/reference/images/EmployerEmployee.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: trunk/nhibernate/doc/reference/images/EmployerEmployee.zargo =================================================================== (Binary files differ) Deleted: trunk/nhibernate/doc/reference/images/full_cream.gif =================================================================== (Binary files differ) Deleted: trunk/nhibernate/doc/reference/images/full_cream.svg =================================================================== --- trunk/nhibernate/doc/reference/images/full_cream.svg 2009-07-13 22:32:35 UTC (rev 4607) +++ trunk/nhibernate/doc/reference/images/full_cream.svg 2009-07-13 22:36:33 UTC (rev 4608) @@ -1,429 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" -"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" -[ - <!ATTLIST svg - xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink"> -]> -<!-- Created with Sodipodi ("http://www.sodipodi.com/") --> -<svg - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - width="354.331" - height="336.614" - id="svg1"> - <defs - id="defs3"> - <linearGradient - x1="0" - y1="0" - x2="1" - y2="0" - id="linearGradient127" - gradientUnits="objectBoundingBox" - spreadMethod="pad"> - <stop - style="stop-color:#000000;stop-opacity:1;" - offset="0" - id="stop128" /> - <stop - style="stop-color:#ffffff;stop-opacity:1;" - offset="1" - id="stop129" /> - </linearGradient> - <linearGradient - x1="0" - y1="0" - x2="1" - y2="0" - id="linearGradient130" - xlink:href="#linearGradient127" - gradientUnits="objectBoundingBox" - spreadMethod="pad" /> - <radialGradient - cx="0.5" - cy="0.5" - fx="0.5" - fy="0.5" - r="0.5" - id="radialGradient131" - xlink:href="#linearGradient127" - gradientUnits="objectBoundingBox" - spreadMethod="pad" /> - </defs> - <g - transform="matrix(0.823795,0,0,0.823795,0.120302,5.25349)" - style="font-size:12;" - id="g659"> - <rect - width="212.257" - height="57.2441" - x="17.9576" - y="100.132" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect137" /> - <rect - width="285.502" - height="118.523" - x="13.4238" - y="95.9309" - transform="matrix(0.743454,0,0,0.482981,6.46949,52.2178)" - style="fill:#d2d2d2;fill-rule:evenodd;stroke-width:1pt;" - id="rect132" /> - </g> - <rect - width="325.86" - height="63.6537" - x="17.4083" - y="15.194" - style="font-size:12;fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect136" /> - <rect - width="325.86" - height="63.6537" - x="13.6713" - y="12.4966" - style="font-size:12;fill:#d2d2d2;fill-rule:evenodd;stroke-width:1pt;" - id="rect126" /> - <g - transform="matrix(1.14345,0,0,0.729078,-1.67818,105.325)" - style="font-size:12;" - id="g164"> - <rect - width="285.502" - height="77.2688" - x="16.6979" - y="222.966" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect138" /> - <rect - width="285.502" - height="77.2688" - x="14.7335" - y="221.002" - transform="translate(-1.30962,-1.30992)" - style="fill:#d2d2d2;fill-rule:evenodd;stroke-width:1pt;" - id="rect133" /> - </g> - <text - x="170.824753" - y="58.402939" - transform="scale(0.823795,0.823795)" - style="font-size:18;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text183"> - <tspan - x="170.824997" - y="58.402901" - id="tspan360"> -Application</tspan> - </text> - <text - x="178.076340" - y="364.281433" - transform="scale(0.823795,0.823795)" - style="font-size:18;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text197"> - <tspan - x="178.076004" - y="364.281006" - id="tspan421"> -Database</tspan> - </text> - <text - x="68.605331" - y="138.524582" - transform="scale(0.823795,0.823795)" - style="font-size:16;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text216"> - <tspan - x="68.605301" - y="138.524994" - id="tspan384"> -SessionFactory</tspan> - </text> - <rect - width="67.0014" - height="101.35" - x="196.927" - y="89.2389" - style="font-size:12;fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect387" /> - <rect - width="67.0014" - height="101.35" - x="194.633" - y="86.4389" - style="font-size:12;fill:#d2d2d2;fill-rule:evenodd;stroke-width:1pt;" - id="rect388" /> - <text - x="249.108841" - y="173.885559" - transform="scale(0.823795,0.823795)" - style="font-size:16;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text389"> - <tspan - x="249.108994" - y="173.886002" - id="tspan392"> -Session</tspan> - </text> - <rect - width="73.0355" - height="101.35" - x="270.995" - y="90.0018" - style="font-size:12;fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect395" /> - <rect - width="73.0355" - height="101.35" - x="267.869" - y="87.2018" - style="font-size:12;fill:#d2d2d2;fill-rule:evenodd;stroke-width:1pt;" - id="rect396" /> - <text - x="328.593658" - y="174.715622" - transform="scale(0.823795,0.823795)" - style="font-size:16;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text397"> - <tspan - x="328.593994" - y="174.716003" - id="tspan563"> -Transaction</tspan> - </text> - <g - transform="matrix(0.29544,0,0,0.397877,9.70533,103.96)" - style="font-size:12;" - id="g565"> - <rect - width="285.502" - height="118.523" - x="16.6979" - y="99.2053" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect566" /> - <rect - width="285.502" - height="118.523" - x="13.4238" - y="95.9309" - style="fill:#d2d2d2;fill-rule:evenodd;stroke-width:1pt;" - id="rect567" /> - </g> - <text - x="25.592752" - y="204.497803" - transform="scale(0.823795,0.823795)" - style="font-size:10;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text568"> - <tspan - x="25.592800" - y="204.498001" - id="tspan662"> -TransactionFactory</tspan> - </text> - <g - transform="matrix(0.298082,0,0,0.397877,99.6898,103.96)" - style="font-size:12;" - id="g573"> - <rect - width="285.502" - height="118.523" - x="16.6979" - y="99.2053" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect574" /> - <rect - width="285.502" - height="118.523" - x="13.4238" - y="95.9309" - style="fill:#d2d2d2;fill-rule:evenodd;stroke-width:1pt;" - id="rect575" /> - </g> - <text - x="134.030670" - y="205.532791" - transform="scale(0.823795,0.823795)" - style="font-size:10;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text576"> - <tspan - x="134.031006" - y="205.533005" - id="tspan664"> -ConnectionProvider</tspan> - </text> - <g - transform="matrix(1.14345,0,0,0.729078,-1.67818,38.9539)" - style="font-size:12;" - id="g587"> - <rect - width="285.502" - height="77.2688" - x="16.6979" - y="222.966" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect588" /> - <rect - width="285.502" - height="77.2688" - x="14.7335" - y="221.002" - transform="translate(-1.30962,-1.30992)" - style="fill:#d2d2d2;fill-rule:evenodd;stroke-width:1pt;" - id="rect589" /> - </g> - <rect - width="90.951" - height="44.4829" - x="25.6196" - y="206.028" - style="font-size:12;fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect594" /> - <rect - width="90.951" - height="44.4829" - x="24.4229" - y="204.135" - style="font-size:12;fill:#b3b3b3;fill-rule:evenodd;stroke-width:1pt;" - id="rect595" /> - <text - x="85.575645" - y="282.300354" - transform="scale(0.823795,0.823795)" - style="font-size:18;font-weight:normal;stroke-width:1pt;font-family:Helvetica;text-anchor:middle;" - id="text596"> - <tspan - x="85.575600" - y="282.299988" - id="tspan607"> -JNDI</tspan> - </text> - <rect - width="90.951" - height="44.4829" - x="236.937" - y="206.791" - style="font-size:12;fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect610" /> - <rect - width="90.951" - height="44.4829" - x="235.741" - y="204.898" - style="font-size:12;fill:#b3b3b3;fill-rule:evenodd;stroke-width:1pt;" - id="rect611" /> - <text - x="342.093201" - y="283.226410" - transform="scale(0.823795,0.823795)" - style="font-size:18;font-weight:normal;stroke-width:1pt;font-family:Helvetica;text-anchor:middle;" - id="text612"> - <tspan - x="342.092987" - y="283.226013" - id="tspan621"> -JTA</tspan> - </text> - <rect - width="90.951" - height="44.4829" - x="130.134" - y="206.791" - style="font-size:12;fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect616" /> - <rect - width="90.951" - height="44.4829" - x="128.937" - y="204.898" - style="font-size:12;fill:#b3b3b3;fill-rule:evenodd;stroke-width:1pt;" - id="rect617" /> - <text - x="212.445343" - y="283.226410" - transform="scale(0.823795,0.823795)" - style="font-size:18;font-weight:normal;stroke-width:1pt;font-family:Helvetica;text-anchor:middle;" - id="text618"> - <tspan - x="212.445007" - y="283.226013" - id="tspan623"> -JDBC</tspan> - </text> - <g - transform="matrix(0.823795,0,0,0.823795,0.120302,6.19341)" - style="font-size:12;" - id="g637"> - <g - transform="matrix(0.499515,0,0,0.415467,-0.237339,5.61339)" - id="g167"> - <rect - width="199.065" - height="61.5532" - x="61.8805" - y="68.4288" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect134" /> - <rect - width="199.065" - height="61.5532" - x="59.2613" - y="65.8095" - style="fill:#e0e0e0;fill-rule:evenodd;stroke-width:1pt;" - id="rect135" /> - </g> - <text - x="33.749969" - y="50.589706" - style="font-size:11;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text188"> - <tspan - x="33.750000" - y="50.589699" - id="tspan635"> -Transient Objects</tspan> - </text> - </g> - <g - transform="matrix(0.823795,0,0,0.823795,0.120302,5.25349)" - style="font-size:12;" - id="g644"> - <g - transform="matrix(0.297486,0,0,0.516482,230.251,36.9178)" - id="g364"> - <rect - width="199.065" - height="61.5532" - x="61.8805" - y="68.4288" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect365" /> - <rect - width="199.065" - height="61.5532" - x="59.2613" - y="65.8095" - style="fill:#e0e0e0;fill-rule:evenodd;stroke-width:1pt;" - id="rect366" /> - </g> - <text - x="277.123230" - y="85.155571" - style="font-size:11;font-weight:normal;stroke-width:1pt;font-family:Helvetica;text-anchor:middle;" - id="text367"> - <tspan - x="277.122986" - y="85.155602" - id="tspan631"> -Persistent</tspan> - <tspan - x="277.122986" - y="96.155602" - id="tspan633"> -Objects</tspan> - </text> - </g> -</svg> Added: trunk/nhibernate/doc/reference/images/fullcream.png =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/doc/reference/images/fullcream.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: trunk/nhibernate/doc/reference/images/hibernate_logo_a.png =================================================================== (Binary files differ) Deleted: trunk/nhibernate/doc/reference/images/lite.gif =================================================================== (Binary files differ) Added: trunk/nhibernate/doc/reference/images/lite.png =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/doc/reference/images/lite.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: trunk/nhibernate/doc/reference/images/lite.svg =================================================================== --- trunk/nhibernate/doc/reference/images/lite.svg 2009-07-13 22:32:35 UTC (rev 4607) +++ trunk/nhibernate/doc/reference/images/lite.svg 2009-07-13 22:36:33 UTC (rev 4608) @@ -1,334 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" -"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" -[ - <!ATTLIST svg - xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink"> -]> -<!-- Created with Sodipodi ("http://www.sodipodi.com/") --> -<svg - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - width="318.898" - height="248.031" - id="svg1"> - <defs - id="defs3"> - <linearGradient - x1="0" - y1="0" - x2="1" - y2="0" - id="linearGradient127" - gradientUnits="objectBoundingBox" - spreadMethod="pad"> - <stop - style="stop-color:#000000;stop-opacity:1;" - offset="0" - id="stop128" /> - <stop - style="stop-color:#ffffff;stop-opacity:1;" - offset="1" - id="stop129" /> - </linearGradient> - <linearGradient - x1="0" - y1="0" - x2="1" - y2="0" - id="linearGradient130" - xlink:href="#linearGradient127" - gradientUnits="objectBoundingBox" - spreadMethod="pad" /> - <radialGradient - cx="0.5" - cy="0.5" - fx="0.5" - fy="0.5" - r="0.5" - id="radialGradient131" - xlink:href="#linearGradient127" - gradientUnits="objectBoundingBox" - spreadMethod="pad" /> - </defs> - <rect - width="291.837" - height="57.0074" - x="17.3169" - y="18.646" - style="font-size:12;fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect136" /> - <rect - width="291.837" - height="57.0074" - x="13.9703" - y="16.2302" - style="font-size:12;fill:#d2d2d2;fill-rule:evenodd;stroke-width:1pt;" - id="rect126" /> - <g - transform="matrix(0.326107,0,0,0.765831,9.59261,8.98517)" - style="font-size:12;" - id="g161"> - <rect - width="285.502" - height="118.523" - x="16.6979" - y="99.2053" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect137" /> - <rect - width="285.502" - height="118.523" - x="13.4238" - y="95.9309" - style="fill:#d2d2d2;fill-rule:evenodd;stroke-width:1pt;" - id="rect132" /> - </g> - <g - transform="matrix(1.02406,0,0,0.652953,0.223384,39.9254)" - style="font-size:12;" - id="g164"> - <rect - width="285.502" - height="77.2688" - x="16.6979" - y="222.966" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect138" /> - <rect - width="285.502" - height="77.2688" - x="14.7335" - y="221.002" - transform="translate(-1.30962,-1.30992)" - style="fill:#d2d2d2;fill-rule:evenodd;stroke-width:1pt;" - id="rect133" /> - </g> - <g - transform="matrix(0.449834,0,0,0.338463,-3.15909,9.73319)" - style="font-size:12;" - id="g167"> - <rect - width="199.065" - height="61.5532" - x="61.8805" - y="68.4288" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect134" /> - <rect - width="199.065" - height="61.5532" - x="59.2613" - y="65.8095" - style="fill:#e0e0e0;fill-rule:evenodd;stroke-width:1pt;" - id="rect135" /> - </g> - <text - x="302.277679" - y="65.943230" - transform="scale(0.73778,0.73778)" - style="font-size:18;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text183"> - <tspan - x="302.277954" - y="65.943184" - id="tspan360"> -Application</tspan> - </text> - <text - x="36.235924" - y="63.796055" - transform="scale(0.73778,0.73778)" - style="font-size:14;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text188"> - <tspan - x="36.235950" - y="63.796051" - id="tspan427"> -Transient Objects</tspan> - </text> - <text - x="180.416245" - y="290.543701" - transform="scale(0.73778,0.73778)" - style="font-size:18;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text197"> - <tspan - x="180.415939" - y="290.543549" - id="tspan421"> -Database</tspan> - </text> - <text - x="25.037701" - y="179.154755" - transform="scale(0.73778,0.73778)" - style="font-size:16;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text216"> - <tspan - x="25.037655" - y="179.154648" - id="tspan384"> -SessionFactory</tspan> - </text> - <g - transform="matrix(0.252763,0,0,0.765831,109.104,8.98517)" - style="font-size:12;" - id="g386"> - <rect - width="285.502" - height="118.523" - x="16.6979" - y="99.2053" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect387" /> - <rect - width="285.502" - height="118.523" - x="13.4238" - y="95.9309" - style="fill:#d2d2d2;fill-rule:evenodd;stroke-width:1pt;" - id="rect388" /> - </g> - <g - transform="matrix(0.297394,0,0,0.572692,101.502,21.6359)" - style="font-size:12;" - id="g364"> - <rect - width="199.065" - height="61.5532" - x="61.8805" - y="68.4288" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect365" /> - <rect - width="199.065" - height="61.5532" - x="59.2613" - y="65.8095" - style="fill:#e0e0e0;fill-rule:evenodd;stroke-width:1pt;" - id="rect366" /> - </g> - <text - x="202.746506" - y="102.992203" - transform="scale(0.73778,0.73778)" - style="font-size:14;font-weight:normal;stroke-width:1pt;font-family:Helvetica;text-anchor:middle;" - id="text367"> - <tspan - x="202.746948" - y="102.992249" - id="tspan423"> -Persistent</tspan> - <tspan - x="202.746948" - y="116.992355" - id="tspan425"> -Objects</tspan> - </text> - <text - x="174.458496" - y="180.080795" - transform="scale(0.73778,0.73778)" - style="font-size:16;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text389"> - <tspan - x="174.458618" - y="180.080338" - id="tspan392"> -Session</tspan> - </text> - <g - transform="matrix(0.127369,0,0,0.765831,188.675,8.98517)" - style="font-size:12;" - id="g394"> - <rect - width="285.502" - height="118.523" - x="16.6979" - y="99.2053" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect395" /> - <rect - width="285.502" - height="118.523" - x="13.4238" - y="95.9309" - style="fill:#d2d2d2;fill-rule:evenodd;stroke-width:1pt;" - id="rect396" /> - </g> - <text - x="260.413269" - y="179.154739" - transform="scale(0.73778,0.73778)" - style="font-size:16;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text397"> - <tspan - x="260.412964" - y="179.154343" - id="tspan400"> -JDBC</tspan> - </text> - <g - transform="matrix(0.127369,0,0,0.765831,229.156,8.98517)" - style="font-size:12;" - id="g405"> - <rect - width="285.502" - height="118.523" - x="16.6979" - y="99.2053" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect406" /> - <rect - width="285.502" - height="118.523" - x="13.4238" - y="95.9309" - style="fill:#d2d2d2;fill-rule:evenodd;stroke-width:1pt;" - id="rect407" /> - </g> - <text - x="320.606903" - y="179.154739" - transform="scale(0.73778,0.73778)" - style="font-size:16;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text408"> - <tspan - x="320.606964" - y="179.154343" - id="tspan417"> -JNDI</tspan> - </text> - <g - transform="matrix(0.127369,0,0,0.765831,269.281,8.98517)" - style="font-size:12;" - id="g411"> - <rect - width="285.502" - height="118.523" - x="16.6979" - y="99.2053" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect412" /> - <rect - width="285.502" - height="118.523" - x="13.4238" - y="95.9309" - style="fill:#d2d2d2;fill-rule:evenodd;stroke-width:1pt;" - id="rect413" /> - </g> - <text - x="377.096313" - y="179.154739" - transform="scale(0.73778,0.73778)" - style="font-size:16;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text414"> - <tspan - x="377.096008" - y="179.154999" - id="tspan145"> -JTA</tspan> - </text> -</svg> Deleted: trunk/nhibernate/doc/reference/images/overview.gif =================================================================== (Binary files differ) Added: trunk/nhibernate/doc/reference/images/overview.png =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/doc/reference/images/overview.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: trunk/nhibernate/doc/reference/images/overview.svg =================================================================== --- trunk/nhibernate/doc/reference/images/overview.svg 2009-07-13 22:32:35 UTC (rev 4607) +++ trunk/nhibernate/doc/reference/images/overview.svg 2009-07-13 22:36:33 UTC (rev 4608) @@ -1,250 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" -"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" -[ - <!ATTLIST svg - xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink"> -]> -<!-- Created with Sodipodi ("http://www.sodipodi.com/") --> -<svg - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - width="248.031" - height="248.031" - id="svg1"> - <defs - id="defs3"> - <linearGradient - x1="0" - y1="0" - x2="1" - y2="0" - id="linearGradient127" - gradientUnits="objectBoundingBox" - spreadMethod="pad"> - <stop - style="stop-color:#000000;stop-opacity:1;" - offset="0" - id="stop128" /> - <stop - style="stop-color:#ffffff;stop-opacity:1;" - offset="1" - id="stop129" /> - </linearGradient> - <linearGradient - x1="0" - y1="0" - x2="1" - y2="0" - id="linearGradient130" - xlink:href="#linearGradient127" - gradientUnits="objectBoundingBox" - spreadMethod="pad" /> - <radialGradient - cx="0.5" - cy="0.5" - fx="0.5" - fy="0.5" - r="0.5" - id="radialGradient131" - xlink:href="#linearGradient127" - gradientUnits="objectBoundingBox" - spreadMethod="pad" /> - </defs> - <g - transform="matrix(0.771934,0,0,0.771934,4.36019,-3.02123)" - style="font-size:12;" - id="g158"> - <rect - width="285.502" - height="77.2688" - x="16.6979" - y="17.3527" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect136" /> - <rect - width="285.502" - height="77.2688" - x="14.7335" - y="15.3883" - transform="translate(-1.30962,-1.30992)" - style="fill:#d2d2d2;fill-rule:evenodd;stroke-width:1pt;" - id="rect126" /> - </g> - <g - transform="matrix(0.771934,0,0,0.771934,4.36019,3.04452)" - style="font-size:12;" - id="g161"> - <rect - width="285.502" - height="118.523" - x="16.6979" - y="99.2053" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect137" /> - <rect - width="285.502" - height="118.523" - x="13.4238" - y="95.9309" - style="fill:#d2d2d2;fill-rule:evenodd;stroke-width:1pt;" - id="rect132" /> - </g> - <g - transform="matrix(0.771934,0,0,0.771934,4.36019,8.0993)" - style="font-size:12;" - id="g164"> - <rect - width="285.502" - height="77.2688" - x="16.6979" - y="222.966" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect138" /> - <rect - width="285.502" - height="77.2688" - x="14.7335" - y="221.002" - transform="translate(-1.30962,-1.30992)" - style="fill:#d2d2d2;fill-rule:evenodd;stroke-width:1pt;" - id="rect133" /> - </g> - <g - transform="matrix(0.771934,0,0,0.543505,2.59104,21.1103)" - style="font-size:12;" - id="g167"> - <rect - width="199.065" - height="61.5532" - x="61.8805" - y="68.4288" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect134" /> - <rect - width="199.065" - height="61.5532" - x="59.2613" - y="65.8095" - style="fill:#e0e0e0;fill-rule:evenodd;stroke-width:1pt;" - id="rect135" /> - </g> - <text - x="105.392174" - y="56.568123" - transform="scale(0.771934,0.771934)" - style="font-size:24;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text183"> - <tspan - x="105.392273" - y="56.568146" - id="tspan186"> -Application</tspan> - </text> - <text - x="81.820183" - y="103.149330" - transform="scale(0.771934,0.771934)" - style="font-size:20;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text188"> - <tspan - x="81.820213" - y="103.149727" - id="tspan206"> -Persistent Objects</tspan> - </text> - <text - x="111.548180" - y="278.927887" - transform="scale(0.771934,0.771934)" - style="font-size:24;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text197"> - <tspan - x="111.547874" - y="278.927551" - id="tspan200"> -Database</tspan> - </text> - <text - x="94.436180" - y="153.805740" - transform="scale(0.771934,0.771934)" - style="font-size:24;font-weight:normal;stroke-width:1pt;font-family:Helvetica;" - id="text216"> - <tspan - x="94.436180" - y="153.805740" - id="tspan221"> -HIBERNATE</tspan> - </text> - <g - transform="matrix(0.771934,0,0,0.771934,2.59083,1.02261)" - style="font-size:12;" - id="g254"> - <g - transform="translate(4.58374,2.61928)" - id="g176"> - <g - transform="matrix(0.571429,0,0,0.67347,-10.6174,117.093)" - id="g170"> - <rect - width="199.065" - height="61.5532" - x="61.8805" - y="68.4288" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect171" /> - <rect - width="199.065" - height="61.5532" - x="59.2613" - y="65.8095" - style="fill:#e0e0e0;fill-rule:evenodd;stroke-width:1pt;" - id="rect172" /> - </g> - <g - transform="matrix(0.571429,0,0,0.67347,138.682,117.093)" - id="g173"> - <rect - width="199.065" - height="61.5532" - x="61.8805" - y="68.4288" - style="fill:#757575;fill-rule:evenodd;stroke-width:1pt;" - id="rect174" /> - <rect - width="199.065" - height="61.5532" - x="59.2613" - y="65.8095" - style="fill:#e0e0e0;fill-rule:evenodd;stroke-width:1pt;" - id="rect175" /> - </g> - </g> - <text - x="47.259438" - y="182.367538" - style="font-weight:bold;stroke-width:1pt;font-family:Courier;" - id="text191"> - <tspan - x="47.259399" - y="182.367996" - id="tspan212"> -hibernate.</tspan> - <tspan - x="47.259399" - y="194.367996" - id="tspan214"> -properties</tspan> - </text> - <text - x="198.523010" - y="188.260941" - style="font-weight:normal;stroke-width:1pt;font-family:helvetica;" - id="text194"> - <tspan - id="tspan195"> -XML Mapping</tspan> - </text> - </g> -</svg> Modified: trunk/nhibernate/doc/reference/master.xml =================================================================== --- trunk/nhibernate/doc/reference/master.xml 2009-07-13 22:32:35 UTC (rev 4607) +++ trunk/nhibernate/doc/reference/master.xml 2009-07-13 22:36:33 UTC (rev 4608) @@ -36,7 +36,7 @@ <bookinfo> <title>NHibernate - Relational Persistence for Idiomatic .NET</title> <subtitle>NHibernate Reference Documentation</subtitle> - <releaseinfo>2.0.0</releaseinfo> + <releaseinfo>2.1.0</releaseinfo> </bookinfo> <toc /> Modified: trunk/nhibernate/doc/reference/modules/architecture.xml =================================================================== --- trunk/nhibernate/doc/reference/modules/architecture.xml 2009-07-13 22:32:35 UTC (rev 4607) +++ trunk/nhibernate/doc/reference/modules/architecture.xml 2009-07-13 22:36:33 UTC (rev 4608) @@ -11,13 +11,13 @@ <mediaobject> <imageobject role="fo"> - <imagedata fileref="images/overview.svg" format="SVG" align="center"/> + <imagedata fileref="images/overview.png" format="PNG" align="center"/> </imageobject> <imageobject role="html"> - <imagedata fileref="../shared/images/overview.gif" format="GIF" align="center"/> + <imagedata fileref="../shared/images/overview.png" format="PNG" align="center"/> </imageobject> <imageobject role="chm"> - <imagedata fileref="shared/images/overview.gif" format="GIF" align="center"/> + <imagedata fileref="shared/images/overview.png" format="PNG" align="center"/> </imageobject> </mediaobject> @@ -36,13 +36,13 @@ <mediaobject> <imageobject role="fo"> - <imagedata fileref="images/lite.svg" format="SVG" align="center"/> + <imagedata fileref="images/lite.png" format="PNG" align="center"/> </imageobject> <imageobject role="html"> - <imagedata fileref="../shared/images/lite.gif" format="GIF" align="center"/> + <imagedata fileref="../shared/images/lite.png" format="PNG" align="center"/> </imageobject> <imageobject role="chm"> - <imagedata fileref="shared/images/lite.gif" format="GIF" align="center"/> + <imagedata fileref="shared/images/lite.png" format="PNG" align="center"/> </imageobject> </mediaobject> @@ -53,13 +53,13 @@ <mediaobject> <imageobject role="fo"> - <imagedata fileref="images/full_cream.svg" format="SVG" align="center"/> + <imagedata fileref="images/fullcream.png" format="PNG" align="center"/> </imageobject> <imageobject role="html"> - <imagedata fileref="../shared/images/full_cream.gif" format="GIF" align="center"/> + <imagedata fileref="../shared/images/fullcream.png" format="PNG" align="center"/> </imageobject> <imageobject role="chm"> - <imagedata fileref="shared/images/full_cream.gif" format="GIF" align="center"/> + <imagedata fileref="shared/images/fullcream.png" format="PNG" align="center"/> </imageobject> </mediaobject> Modified: trunk/nhibernate/doc/reference/modules/example_mappings.xml =================================================================== --- trunk/nhibernate/doc/reference/modules/example_mappings.xml 2009-07-13 22:32:35 UTC (rev 4607) +++ trunk/nhibernate/doc/reference/modules/example_mappings.xml 2009-07-13 22:36:33 UTC (rev 4608) @@ -18,13 +18,13 @@ <mediaobject> <imageobject role="fo"> - <imagedata fileref="images/EmployerEmployee.gif" format="GIF" align="center"/> + <imagedata fileref="images/EmployerEmployee.png" format="PNG" align="center"/> </imageobject> <imageobject role="html"> - <imagedata fileref="../shared/images/EmployerEmployee.gif" format="GIF" align="center"/> + <imagedata fileref="../shared/images/EmployerEmployee.png" format="PNG" align="center"/> </imageobject> <imageobject role="chm"> - <imagedata fileref="shared/images/EmployerEmployee.gif" format="GIF" align="center"/> + <imagedata fileref="shared/images/EmployerEmployee.png" format="PNG" align="center"/> </imageobject> </mediaobject> Modified: trunk/nhibernate/doc/reference/styles/fopdf.xsl =================================================================== --- trunk/nhibernate/doc/reference/styles/fopdf.xsl 2009-07-13 22:32:35 UTC (rev 4607) +++ trunk/nhibernate/doc/reference/styles/fopdf.xsl 2009-07-13 22:36:33 UTC (rev 4608) @@ -41,7 +41,7 @@ <fo:table-row> <fo:table-cell text-align="center"> <fo:block> - <fo:external-graphic src="file:images/hibernate_logo_a.png"/> + <fo:external-graphic src="file:images/nhibernate_logo_a.png"/> </fo:block> <fo:block font-family="Helvetica" font-size="22pt" padding-before="10mm"> <xsl:value-of select="bookinfo/subtitle"/> Modified: trunk/nhibernate/src/NHibernate/ISession.cs =================================================================== --- trunk/nhibernate/src/NHibernate/ISession.cs 2009-07-13 22:32:35 UTC (rev 4607) +++ trunk/nhibernate/src/NHibernate/ISession.cs 2009-07-13 22:36:33 UTC (rev 4608) @@ -8,7 +8,7 @@ namespace NHibernate { /// <summary> - /// The main runtime interface between a Java application and Hibernate. This is the central + /// The main runtime interface between a .NET application and NHibernate. This is the central /// API class abstracting the notion of a persistence service. /// </summary> /// <remarks> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-07-14 22:53:16
|
Revision: 4632 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4632&view=rev Author: fabiomaulo Date: 2009-07-14 22:53:11 +0000 (Tue, 14 Jul 2009) Log Message: ----------- Merge r4631 Modified Paths: -------------- trunk/nhibernate/default.build trunk/nhibernate/doc/documentation.build trunk/nhibernate/doc/reference/reference.build Added Paths: ----------- trunk/nhibernate/doc/NHibernate.shfbproj.template Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2009-07-14 22:46:00 UTC (rev 4631) +++ trunk/nhibernate/default.build 2009-07-14 22:53:11 UTC (rev 4632) @@ -156,6 +156,11 @@ description="Builds the Help Documentation"> <nant buildfile="doc/documentation.build" target="manual" /> </target> + + <target name="api" depends="init binaries" + description="Builds the API Documentation"> + <nant buildfile="doc/documentation.build" target="api" /> + </target> <target name="build-all-frameworks" depends="init"> <!-- Save the current framework --> @@ -299,7 +304,7 @@ <nant buildfile="src/NHibernate.Setup/NHibernate.Setup.build" target="msi" /> </target> - <target name="package" depends="init set-release-project-configuration test binaries manual sources-zip binaries-zip" + <target name="package" depends="init binaries manual sources-zip binaries-zip" description="Creates files for the File Release System on SourceForge"> <property name="dist.output.dir" value="${project::get-base-directory()}/build/" /> Added: trunk/nhibernate/doc/NHibernate.shfbproj.template =================================================================== --- trunk/nhibernate/doc/NHibernate.shfbproj.template (rev 0) +++ trunk/nhibernate/doc/NHibernate.shfbproj.template 2009-07-14 22:53:11 UTC (rev 4632) @@ -0,0 +1,42 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> + <PropertyGroup> + <!-- The configuration and platform will be used to determine which + assemblies to include from solution and project documentation + sources --> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{91f431cd-23fb-4ed4-a690-0344073c65f0}</ProjectGuid> + <SHFBSchemaVersion>1.8.0.0</SHFBSchemaVersion> + <!-- AssemblyName, Name, and RootNamespace are not used by SHFB but Visual + Studio adds them anyway --> + <AssemblyName>Documentation</AssemblyName> + <RootNamespace>Documentation</RootNamespace> + <Name>Documentation</Name> + <!-- SHFB properties --> + <OutputPath>${doc.out.dir}</OutputPath> + <HtmlHelpName>NHibernateAPI</HtmlHelpName> + <HelpFileFormat>HtmlHelp1x</HelpFileFormat> + <CopyrightText>NHibernate</CopyrightText> + <CopyrightHref>www.nhforge.org</CopyrightHref> + <FeedbackEMailAddress>http://groups.google.com/group/nhibernate-development</FeedbackEMailAddress> + <FeedbackEMailLinkText>nhibernate team</FeedbackEMailLinkText> + <HelpTitle>NHibernate API Reference</HelpTitle> + <IndentHtml>False</IndentHtml> + <HelpFileVersion>${project.version.numeric}</HelpFileVersion> + <DocumentationSources> + <DocumentationSource sourceFile="${bin.dir}/Iesi.Collections.dll" /> + <DocumentationSource sourceFile="${bin.dir}/Iesi.Collections.xml" /> + <DocumentationSource sourceFile="${bin.dir}/NHibernate.dll" /> + <DocumentationSource sourceFile="${bin.dir}/Nhibernate.xml" /> + </DocumentationSources> + </PropertyGroup> + <!-- There are no properties for these two groups but they need to appear in + order for Visual Studio to perform the build. --> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + </PropertyGroup> + <!-- Import the SHFB build targets --> + <Import Project="$(SHFBROOT)\SandcastleHelpFileBuilder.targets" /> +</Project> Modified: trunk/nhibernate/doc/documentation.build =================================================================== --- trunk/nhibernate/doc/documentation.build 2009-07-14 22:46:00 UTC (rev 4631) +++ trunk/nhibernate/doc/documentation.build 2009-07-14 22:53:11 UTC (rev 4632) @@ -7,7 +7,6 @@ > <property name="root.dir" value=".." /> - <include buildfile="${root.dir}/build-common/common.xml"/> <include buildfile="${root.dir}/build-common/common-project.xml" /> <target name="init" depends="common.init"> @@ -22,7 +21,7 @@ <target name="clean" depends="init"> <nant target="clean" buildfile="reference/reference.build" /> <delete dir="${doc.out.dir}" /> - <delete file="NHibernate.ndoc" /> + <delete file="NHibernate.shfbproj" /> </target> <target name="manual" depends="init"> @@ -34,15 +33,15 @@ </nant> </target> - <target name="ndoc-project" depends="init"> - <copy file="NHibernate.ndoc.in" tofile="NHibernate.ndoc" overwrite="true"> + <target name="apidocbuilder-project" depends="init"> + <copy file="NHibernate.shfbproj.template" tofile="NHibernate.shfbproj" overwrite="true"> <filterchain> <expandproperties /> </filterchain> </copy> </target> - <target name="api" depends="init common.find-ndoc ndoc-project" description="Generates the API documentation (in MSDN style and VS.NET 2003 if available)"> + <target name="api" depends="init apidocbuilder-project" description="Generates the API documentation (in MSDN style and VS.NET 2005 if available)"> <uptodate property="api.uptodate"> <sourcefiles> <include name="${bin.dir}/*.dll" /> @@ -57,14 +56,10 @@ <echo if="${api.uptodate}">API documentation is up to date, skipping generation step.</echo> <if test="${not api.uptodate}"> - <exec program="${ndoc-console}"> - <arg line="-documenter=MSDN-Help2" /> - <arg line="-project=NHibernate.ndoc" /> + <property name="apidocbuilder.exe" value="${directory::get-parent-directory(environment::get-folder-path('System'))}\Microsoft.NET\Framework\v3.5\MSBuild.exe" /> + <exec program="${apidocbuilder.exe}"> + <arg line="NHibernate.shfbproj" /> </exec> - <exec program="${ndoc-console}"> - <arg line="-documenter=MSDN-CHM" /> - <arg line="-project=NHibernate.ndoc" /> - </exec> </if> </target> Modified: trunk/nhibernate/doc/reference/reference.build =================================================================== --- trunk/nhibernate/doc/reference/reference.build 2009-07-14 22:46:00 UTC (rev 4631) +++ trunk/nhibernate/doc/reference/reference.build 2009-07-14 22:53:11 UTC (rev 4632) @@ -12,7 +12,7 @@ <property name="lang" value="en" /> <property name="output.dir" value="${build.dir}/doc" /> - <property name="output.html.basename" value="NHibernate.Documentation" /> + <property name="output.html.basename" value="NHibernate.Reference" /> <property name="output.help2.dir" value="${output.dir}/help2" /> <property name="build.html.dir" value="${output.dir}" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-07-15 18:50:28
|
Revision: 4639 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4639&view=rev Author: fabiomaulo Date: 2009-07-15 18:50:23 +0000 (Wed, 15 Jul 2009) Log Message: ----------- Merge r4638 (tasks for release) Modified Paths: -------------- trunk/nhibernate/default.build trunk/nhibernate/doc/documentation.build Added Paths: ----------- trunk/nhibernate/Choose_Only_One.txt trunk/nhibernate/GaRelease.bat trunk/nhibernate/HowInstall.txt Added: trunk/nhibernate/Choose_Only_One.txt =================================================================== --- trunk/nhibernate/Choose_Only_One.txt (rev 0) +++ trunk/nhibernate/Choose_Only_One.txt 2009-07-15 18:50:23 UTC (rev 4639) @@ -0,0 +1,2 @@ +You don't need all assemblies contained in this folder. +Choose only one system between available. Added: trunk/nhibernate/GaRelease.bat =================================================================== --- trunk/nhibernate/GaRelease.bat (rev 0) +++ trunk/nhibernate/GaRelease.bat 2009-07-15 18:50:23 UTC (rev 4639) @@ -0,0 +1 @@ +NAnt -D:project.config=release clean package Added: trunk/nhibernate/HowInstall.txt =================================================================== --- trunk/nhibernate/HowInstall.txt (rev 0) +++ trunk/nhibernate/HowInstall.txt 2009-07-15 18:50:23 UTC (rev 4639) @@ -0,0 +1,7 @@ +Required Bins : Minimal required assemblies to work with NHibernate + + +Required for LazyLoading : +NHibernate 2.1 has a new important feature regarding dynamic-proxy systems for lazy-loading +Details are available in releasenotes.txt and in this post +http://nhforge.org/blogs/nhibernate/archive/2008/11/09/nh2-1-0-bytecode-providers.aspx Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2009-07-15 18:47:57 UTC (rev 4638) +++ trunk/nhibernate/default.build 2009-07-15 18:50:23 UTC (rev 4639) @@ -152,11 +152,16 @@ <nant buildfile="doc/documentation.build" target="api manual" /> </target> - <target name="manual" depends="init binaries" - description="Builds the Help Documentation"> + <target name="reference" depends="init binaries" + description="Builds Reference Manual"> <nant buildfile="doc/documentation.build" target="manual" /> </target> + <target name="reference-zip" depends="init binaries" + description="Builds Reference Manual zip"> + <nant buildfile="doc/documentation.build" target="manual-zip" /> + </target> + <target name="api" depends="init binaries" description="Builds the API Documentation"> <nant buildfile="doc/documentation.build" target="api" /> @@ -247,91 +252,101 @@ </target> <target name="sources-zip" depends="init sources"> - <mkdir dir="${build.dir}/src" /> - <zip zipfile="${build.dir}/src/NHibernate-${project.version}-src.zip"> + <zip zipfile="${build.dir}/NHibernate-${project.version}-src.zip"> <fileset basedir="${source.tmpdir}"> <include name="**/*" /> </fileset> </zip> </target> - <target name="copy-release-notes" depends="init"> - <copy file="releasenotes.txt" todir="${build.dir}" /> - </target> - - <target name="copy-xml-schemas" depends="init"> - <!-- - TODO: Probably need to think of a better place for the XML schemas since - they are used by NHibernate and this build file. - --> - <copy todir="${build.dir}"> - <fileset basedir="src/NHibernate"> - <include name="nhibernate-mapping.xsd" /> - <include name="nhibernate-configuration.xsd" /> + <target name="binaries-zip" depends="init bin-pack"> + <zip zipfile="${build.dir}/NHibernate-${project.version}-bin.zip"> + <fileset basedir="${bin-pack.tmpdir}"> + <include name="**/*" /> </fileset> - </copy> + </zip> </target> - <target name="copy-config-templates" depends="init"> - <!-- - TODO: I don't like where these are put now. Should think of a better - place for these. - --> - <copy todir="${build.dir}/config.templates"> + <target name="bin-pack" depends="init binaries"> + <property name="bin-pack.tmpdir" value="${build.dir}/tmp-bin" /> + <property name="bin-pack.conf-template" value="${bin-pack.tmpdir}/Configuration_Templates" /> + <property name="bin-pack.required" value="${bin-pack.tmpdir}/Required_Bins" /> + <property name="bin-pack.requiredlazy" value="${bin-pack.tmpdir}/Required_For_LazyLoading" /> + <property name="bin-pack.tests" value="${bin-pack.tmpdir}/Tests" /> + + <copy file="releasenotes.txt" todir="${bin-pack.tmpdir}"/> + <copy file="readme.html" todir="${bin-pack.tmpdir}"/> + <copy file="lgpl.txt" todir="${bin-pack.tmpdir}"/> + <copy file="gfdl.txt" todir="${bin-pack.tmpdir}"/> + <copy file="HowInstall.txt" todir="${bin-pack.tmpdir}"/> + + <!--Configuration templates--> + <copy todir="${bin-pack.conf-template}"> <fileset basedir="src/NHibernate.Config.Templates"> <include name="*"/> </fileset> </copy> - </target> - - <target name="binaries-zip" depends="init binaries copy-release-notes copy-xml-schemas copy-config-templates"> - <zip zipfile="${build.dir}/bin/NHibernate-${project.version}-bin.zip"> - <fileset basedir="${build.dir}"> - <include name="releasenotes.txt" /> + + <!--Minimal Required Bins--> + <copy todir="${bin-pack.required}"> + <fileset basedir="src/NHibernate"> <include name="*.xsd" /> - <include name="bin/**" /> - - <exclude name="**/*.hbm.xml" /> - <exclude name="**/*.commandlog" /> - <exclude name="**/MyTest*" /> </fileset> - </zip> + </copy> + <copy todir="${bin-pack.required}"> + <fileset basedir="${bin.dir}"> + <include name="Antlr3.Runtime.dll" /> + <include name="Iesi.Collections.???" /> + <include name="log4net*" /> + <include name="NHibernate.???" /> + </fileset> + </copy> + <!--Required Bins for lazy loading NHibernate.ByteCode.Castle.dll--> + <copy file="Choose_Only_One.txt" todir="${bin-pack.requiredlazy}"/> + <copy todir="${bin-pack.requiredlazy}/Castle"> + <fileset basedir="${bin.dir}"> + <include name="Castle.*" /> + <include name="NHibernate.ByteCode.Castle.???" /> + </fileset> + </copy> + <copy todir="${bin-pack.requiredlazy}/LinFu"> + <fileset basedir="${bin.dir}"> + <include name="LinFu.*" /> + <include name="NHibernate.ByteCode.LinFu.???" /> + </fileset> + </copy> + <copy todir="${bin-pack.requiredlazy}/Spring"> + <fileset basedir="${bin.dir}"> + <include name="antlr.runtime.dll" /> + <include name="Common.Logging.dll" /> + <include name="Spring.*" /> + <include name="NHibernate.ByteCode.Spring.???" /> + </fileset> + </copy> + <!-- Tests --> + <copy file="${bin.dir}/TestEnbeddedConfig.cfg.xml" todir="${bin-pack.tests}"/> + <copy file="${bin.dir}/ABC.hbm.xml" todir="${bin-pack.tests}"/> + <copy todir="${bin-pack.tests}"> + <fileset basedir="${bin.dir}"> + <include name="nunit*" /> + <include name="NHibernate.Domain*" /> + <include name="NHibernate.Test*" /> + </fileset> + </copy> </target> + + <target name="package" depends="init binaries reference-zip sources-zip binaries-zip" + description="Creates files for the General Available Release on SourceForge"> - <target name="prepare-installer-files" depends="init sources-zip copy-release-notes" /> - - <target name="installer" depends="init binaries doc prepare-installer-files"> - <nant buildfile="src/NHibernate.Setup/NHibernate.Setup.build" target="msi" /> + <echo message="Created a '${project.config}' package in ${build.dir}" /> </target> - <target name="package" depends="init binaries manual sources-zip binaries-zip" - description="Creates files for the File Release System on SourceForge"> + <target name="release" depends="init binaries binaries-zip sources-zip" + description="Creates files for the partial (Alpha-Beta-Candidate) Release on SourceForge"> - <property name="dist.output.dir" value="${project::get-base-directory()}/build/" /> - <move todir="${dist.output.dir}" flatten="true" overwrite="true"> - <fileset basedir="${build.dir}"> - <include name="*.msi" /> - <include name="src/NHibernate-${project.version}-src.zip" /> - <include name="bin/NHibernate-${project.version}-bin.zip" /> - </fileset> - </move> - - <echo message="Created a '${project.config}' package in ${dist.output.dir}" /> - + <echo message="Created a '${project.config}' package in ${build.dir}" /> </target> - <target name="fxcop" depends="init" > - <exec program="${fxcop.exe}" - commandline="/f:${build.dir}\bin\nhibernate.dll /o:${build.dir}\bin\fxcop-results.xml" - failonerror="false"/> - </target> - - <target name="simian" depends="init" > - <exec program="${simian.exe}" verbose="true" - commandline="-recurse=src/*.cs -formatter=xml:${build.dir}\bin\simian-results.xml -failOnDuplication-" - failonerror="false"/> - </target> - <target name="visual-studio" depends="init" description="Modifies AssemblyInfo.cs files to work with Visual Studio"> <property name="visual-studio" value="true" /> <nant target="generate-assemblyinfo"> Modified: trunk/nhibernate/doc/documentation.build =================================================================== --- trunk/nhibernate/doc/documentation.build 2009-07-15 18:47:57 UTC (rev 4638) +++ trunk/nhibernate/doc/documentation.build 2009-07-15 18:50:23 UTC (rev 4639) @@ -32,6 +32,14 @@ </properties> </nant> </target> + + <target name="manual-zip" depends="manual"> + <zip zipfile="${build.dir}/NHibernate-${project.version}-reference.zip"> + <fileset basedir="${doc.out.dir}"> + <include name="**/*" /> + </fileset> + </zip> + </target> <target name="apidocbuilder-project" depends="init"> <copy file="NHibernate.shfbproj.template" tofile="NHibernate.shfbproj" overwrite="true"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-07-15 22:28:42
|
Revision: 4640 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4640&view=rev Author: tehlike Date: 2009-07-15 22:28:37 +0000 (Wed, 15 Jul 2009) Log Message: ----------- Build file modifications: 1. Making project builds optimized 2. Adding "test" to package target dependencies. Modified Paths: -------------- trunk/nhibernate/build-common/common-project.xml trunk/nhibernate/build-common/common.xml trunk/nhibernate/default.build trunk/nhibernate/teamcity.build Modified: trunk/nhibernate/build-common/common-project.xml =================================================================== --- trunk/nhibernate/build-common/common-project.xml 2009-07-15 18:50:23 UTC (rev 4639) +++ trunk/nhibernate/build-common/common-project.xml 2009-07-15 22:28:37 UTC (rev 4640) @@ -146,6 +146,7 @@ debug="${build.debug}" output="${bin.dir}/${project::get-name()}.exe" if="${sign}" + optimize="true" > <nowarn> <warning number="1591" /> <!-- No XML comment for publicly visible member --> @@ -161,6 +162,7 @@ debug="${build.debug}" output="${bin.dir}/${project::get-name()}.exe" unless="${sign}" + optimize="true" > <nowarn> <warning number="1591" /> <!-- No XML comment for publicly visible member --> Modified: trunk/nhibernate/build-common/common.xml =================================================================== --- trunk/nhibernate/build-common/common.xml 2009-07-15 18:50:23 UTC (rev 4639) +++ trunk/nhibernate/build-common/common.xml 2009-07-15 22:28:37 UTC (rev 4640) @@ -173,7 +173,7 @@ <property name="build.root.dir" value="${root.dir}/build/${build.name}" /> <property name="build.dir" value="${build.root.dir}" /> - <property name="bin.dir" value="${build.dir}/bin/${nant.settings.currentframework}" dynamic="true" /> + <property name="bin.dir" value="${build.dir}/bin/${nant.settings.currentframework}" /> <property name="testresults.dir" value="${bin.dir}/test-results" /> <property name="tools.dir" value="${root.dir}/Tools"/> </target> Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2009-07-15 18:50:23 UTC (rev 4639) +++ trunk/nhibernate/default.build 2009-07-15 22:28:37 UTC (rev 4640) @@ -335,7 +335,7 @@ </copy> </target> - <target name="package" depends="init binaries reference-zip sources-zip binaries-zip" + <target name="package" depends="init binaries test reference-zip sources-zip binaries-zip" description="Creates files for the General Available Release on SourceForge"> <echo message="Created a '${project.config}' package in ${build.dir}" /> Modified: trunk/nhibernate/teamcity.build =================================================================== --- trunk/nhibernate/teamcity.build 2009-07-15 18:50:23 UTC (rev 4639) +++ trunk/nhibernate/teamcity.build 2009-07-15 22:28:37 UTC (rev 4640) @@ -2,13 +2,13 @@ <project name="NHibernate TeamCity Build" xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd" default="clean-configure-test"> <property name="root.dir" value="." /> <include buildfile="${root.dir}/default.build" /> + <if test="${not property::exists('CCNetLabel') and not property::exists('build.number')}"> <fail>This build file is for use with CruiseControl.NET or TeamCity</fail> </if> - <property name="build.number" value="${CCNetLabel}" if="${property::exists('CCNetLabel')}" /> - <target name="clean-configure-test" depends="cleanall init copy-teamcity-configuration build test"> + <target name="clean-configure-test" depends="cleanall init copy-teamcity-configuration package"> </target> <target name="copy-teamcity-configuration"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-07-16 08:29:57
|
Revision: 4642 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4642&view=rev Author: tehlike Date: 2009-07-16 08:29:56 +0000 (Thu, 16 Jul 2009) Log Message: ----------- Making it possible to skip manual, as it needs external dependency. Modified Paths: -------------- trunk/nhibernate/default.build trunk/nhibernate/teamcity.build Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2009-07-15 22:43:58 UTC (rev 4641) +++ trunk/nhibernate/default.build 2009-07-16 08:29:56 UTC (rev 4642) @@ -11,7 +11,7 @@ <!-- Pass -D:skip.tests=true to NAnt to skip running tests when building --> <property name="skip.tests" value="false" overwrite="false" /> - + <property name="skip.manual" value="false" overwrite="false" /> <!-- Supported versions of .NET Framework, separated by spaces. Used by *-all-frameworks targets. @@ -152,14 +152,14 @@ <nant buildfile="doc/documentation.build" target="api manual" /> </target> - <target name="reference" depends="init binaries" + <target name="reference" depends="init binaries" unless="${skip.manual}" description="Builds Reference Manual"> <nant buildfile="doc/documentation.build" target="manual" /> </target> - <target name="reference-zip" depends="init binaries" + <target name="reference-zip" depends="init binaries" unless="${skip.manual}" description="Builds Reference Manual zip"> - <nant buildfile="doc/documentation.build" target="manual-zip" /> + <nant buildfile="doc/documentation.build" target="manual-zip"/> </target> <target name="api" depends="init binaries" Modified: trunk/nhibernate/teamcity.build =================================================================== --- trunk/nhibernate/teamcity.build 2009-07-15 22:43:58 UTC (rev 4641) +++ trunk/nhibernate/teamcity.build 2009-07-16 08:29:56 UTC (rev 4642) @@ -8,7 +8,7 @@ <property name="build.number" value="${CCNetLabel}" if="${property::exists('CCNetLabel')}" /> - <target name="clean-configure-test" depends="cleanall init copy-teamcity-configuration build test"> + <target name="clean-configure-test" depends="cleanall init copy-teamcity-configuration package"> </target> <target name="copy-teamcity-configuration"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-07-17 12:59:45
|
Revision: 4646 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4646&view=rev Author: fabiomaulo Date: 2009-07-17 12:59:43 +0000 (Fri, 17 Jul 2009) Log Message: ----------- Revert r3849 because NH-1890 (ugly but needed). Modified Paths: -------------- trunk/nhibernate/lib/net/3.5/Iesi.Collections.dll trunk/nhibernate/src/Iesi.Collections/Iesi.Collections.build trunk/nhibernate/src/Iesi.Collections.Test/Iesi.Collections.Test.build Modified: trunk/nhibernate/lib/net/3.5/Iesi.Collections.dll =================================================================== (Binary files differ) Modified: trunk/nhibernate/src/Iesi.Collections/Iesi.Collections.build =================================================================== --- trunk/nhibernate/src/Iesi.Collections/Iesi.Collections.build 2009-07-17 12:56:10 UTC (rev 4645) +++ trunk/nhibernate/src/Iesi.Collections/Iesi.Collections.build 2009-07-17 12:59:43 UTC (rev 4646) @@ -18,7 +18,7 @@ value="Declaration of code in public domain can be found in comment by Jason Smith at http://www.codeproject.com/csharp/sets.asp#xx703510xx. Copyright © 2002-2004 by Aidant Systems, Inc., and by Jason Smith." /> <property name="assembly.version" value="1.0.1.0" /> <property name="assembly.version.informational" value="1.0" /> - <property name="assembly.version.file" value="1.0.1.0" /> + <!-- NOTE : Don't add file version see NH-1890 issue --> <property name="assembly.allow-partially-trusted-callers" value="true" /> <property name="clover.instrument" value="true" /> Modified: trunk/nhibernate/src/Iesi.Collections.Test/Iesi.Collections.Test.build =================================================================== --- trunk/nhibernate/src/Iesi.Collections.Test/Iesi.Collections.Test.build 2009-07-17 12:56:10 UTC (rev 4645) +++ trunk/nhibernate/src/Iesi.Collections.Test/Iesi.Collections.Test.build 2009-07-17 12:59:43 UTC (rev 4646) @@ -16,7 +16,6 @@ <property name="assembly.description" value="The Unit Tests for Iesi.Collections." /> <property name="assembly.version" value="1.0.1.0" /> <property name="assembly.version.informational" value="1.0" /> - <property name="assembly.version.file" value="1.0.1.0" /> <property name="clover.instrument" value="false" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2009-08-31 10:01:52
|
Revision: 4703 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4703&view=rev Author: steverstrong Date: 2009-08-31 10:01:43 +0000 (Mon, 31 Aug 2009) Log Message: ----------- New files for linq provider Added Paths: ----------- trunk/nhibernate/lib/net/3.5/Remotion.Data.Linq.dll trunk/nhibernate/lib/net/3.5/Remotion.Interfaces.dll trunk/nhibernate/lib/net/3.5/Remotion.dll trunk/nhibernate/src/NHibernate/Hql/Ast/HqlExpression.cs trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs trunk/nhibernate/src/NHibernate/Linq/CommandData.cs trunk/nhibernate/src/NHibernate/Linq/HqlNodeStack.cs trunk/nhibernate/src/NHibernate/Linq/NamedParameter.cs trunk/nhibernate/src/NHibernate/Linq/NhExpressionTreeVisitor.cs trunk/nhibernate/src/NHibernate/Linq/NhQueryExecutor.cs trunk/nhibernate/src/NHibernate/Linq/NhQueryable.cs trunk/nhibernate/src/NHibernate/Linq/Nominator.cs trunk/nhibernate/src/NHibernate/Linq/ParameterAggregator.cs trunk/nhibernate/src/NHibernate/Linq/ProjectionEvaluator.cs trunk/nhibernate/src/NHibernate/Linq/QueryModelVisitor.cs trunk/nhibernate/src/NHibernate/Linq/ResultTransformer.cs trunk/nhibernate/src/NHibernate.Test/Linq/LinqQuerySamples.cs trunk/nhibernate/src/NHibernate.Test/Linq/ReadonlyTestCase.cs Added: trunk/nhibernate/lib/net/3.5/Remotion.Data.Linq.dll =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/lib/net/3.5/Remotion.Data.Linq.dll ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/nhibernate/lib/net/3.5/Remotion.Interfaces.dll =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/lib/net/3.5/Remotion.Interfaces.dll ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/nhibernate/lib/net/3.5/Remotion.dll =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/lib/net/3.5/Remotion.dll ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/nhibernate/src/NHibernate/Hql/Ast/HqlExpression.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/HqlExpression.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/HqlExpression.cs 2009-08-31 10:01:43 UTC (rev 4703) @@ -0,0 +1,36 @@ +using System.Collections.Generic; +using System.Reflection; +using NHibernate.Hql.Ast.ANTLR; +using NHibernate.Hql.Ast.ANTLR.Tree; + +namespace NHibernate.Hql.Ast +{ + public class HqlExpression : IQueryExpression + { + private readonly IASTNode _node; + private readonly System.Type _type; + private readonly string _key; + + public HqlExpression(HqlQuery node, System.Type type) + { + _node = node.AstNode; + _type = type; + _key = _node.ToStringTree(); + } + + public IASTNode Translate(ISessionFactory sessionFactory) + { + return _node; + } + + public string Key + { + get { return _key; } + } + + public System.Type Type + { + get { return _type; } + } + } +} Property changes on: trunk/nhibernate/src/NHibernate/Hql/Ast/HqlExpression.cs ___________________________________________________________________ Added: svn:executable + * Added: trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs 2009-08-31 10:01:43 UTC (rev 4703) @@ -0,0 +1,332 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using NHibernate.Hql.Ast.ANTLR.Tree; + +namespace NHibernate.Hql.Ast +{ + public class HqlTreeBuilder + { + private readonly ASTFactory _factory; + + public HqlTreeBuilder() + { + _factory = new ASTFactory(new ASTTreeAdaptor()); + } + + public HqlQuery Query() + { + return new HqlQuery(_factory); + } + + public HqlQuery Query(HqlSelectFrom selectFrom) + { + return new HqlQuery(_factory, selectFrom); + } + + public HqlQuery Query(HqlSelectFrom selectFrom, HqlWhere where) + { + return new HqlQuery(_factory, selectFrom, where); + } + + public HqlTreeNode Query(HqlSelectFrom selectFrom, HqlWhere where, HqlOrderBy orderBy) + { + return new HqlQuery(_factory, selectFrom, where, orderBy); + } + + public HqlSelectFrom SelectFrom() + { + return new HqlSelectFrom(_factory); + } + + public HqlSelectFrom SelectFrom(HqlSelect select) + { + return new HqlSelectFrom(_factory, select); + } + + public HqlSelectFrom SelectFrom(HqlFrom @from, HqlSelect select) + { + return new HqlSelectFrom(_factory, @from, select); + } + + public HqlSelectFrom SelectFrom(HqlFrom @from) + { + return new HqlSelectFrom(_factory, @from); + } + + public HqlFrom From(HqlRange range) + { + return new HqlFrom(_factory, range); + } + + public HqlFrom From() + { + return new HqlFrom(_factory); + } + + public HqlRange Range(HqlIdent ident) + { + return new HqlRange(_factory, ident); + } + + public HqlRange Range() + { + return new HqlRange(_factory); + } + + public HqlRange Range(HqlTreeNode ident, HqlAlias alias) + { + return new HqlRange(_factory, ident, alias); + } + + public HqlIdent Ident(string ident) + { + return new HqlIdent(_factory, ident); + } + + public HqlAlias Alias(string alias) + { + return new HqlAlias(_factory, alias); + } + + public HqlEquality Equality() + { + return new HqlEquality(_factory); + } + + public HqlBooleanAnd BooleanAnd() + { + return new HqlBooleanAnd(_factory); + } + + public HqlBooleanOr BooleanOr() + { + return new HqlBooleanOr(_factory); + } + + public HqlAdd Add() + { + return new HqlAdd(_factory); + } + + public HqlSubtract Subtract() + { + return new HqlSubtract(_factory); + } + + public HqlMultiplty Multiply() + { + return new HqlMultiplty(_factory); + } + + public HqlDivide Divide() + { + return new HqlDivide(_factory); + } + + public HqlDot Dot() + { + return new HqlDot(_factory); + } + + public HqlParameter Parameter(string name) + { + return new HqlParameter(_factory, name); + } + + public HqlWhere Where(HqlTreeNode expression) + { + return new HqlWhere(_factory, expression); + } + + public HqlWhere Where() + { + return new HqlWhere(_factory); + } + + // TODO - constant will be removed when we have parameter handling done properly. Particularly bad datetime handling here, so it'll be good to delete it :) + public HqlConstant Constant(object value) + { + if (value == null) + { + return new HqlNull(_factory); + } + else + { + switch (System.Type.GetTypeCode(value.GetType())) + { + case TypeCode.Int16: + case TypeCode.Int32: + case TypeCode.Int64: + return new HqlIntegerConstant(_factory, value.ToString()); + case TypeCode.Single: + return new HqlFloatConstant(_factory, value.ToString()); + case TypeCode.Double: + return new HqlDoubleConstant(_factory, value.ToString()); + case TypeCode.Decimal: + return new HqlDecimalConstant(_factory, value.ToString()); + case TypeCode.String: + case TypeCode.Char: + return new HqlStringConstant(_factory, "\'" + value + "\'"); + case TypeCode.DateTime: + return new HqlStringConstant(_factory, "\'" + ((DateTime)value).ToString() + "\'"); + case TypeCode.Boolean: + return new HqlStringConstant(_factory, "\'" + (((bool)value) ? "true" : "false") + "\'"); + default: + throw new NotSupportedException(string.Format("The constant for '{0}' is not supported", value)); + } + } + } + + public HqlOrderBy OrderBy(HqlTreeNode expression, HqlDirection hqlDirection) + { + return new HqlOrderBy(_factory, expression, hqlDirection); + } + + public HqlSelect Select(HqlTreeNode expression) + { + return new HqlSelect(_factory, expression); + } + + public HqlSelect Select(params HqlTreeNode[] expression) + { + return new HqlSelect(_factory, expression); + } + + public HqlSelect Select(IEnumerable<HqlTreeNode> expressions) + { + return new HqlSelect(_factory, expressions.ToArray()); + } + + public HqlConstructor Constructor(ConstructorInfo constructor) + { + return new HqlConstructor(_factory, constructor); + } + + public HqlNill Holder() + { + return new HqlNill(_factory); + } + + public HqlCase Case() + { + return new HqlCase(_factory); + } + + public HqlWhen When() + { + return new HqlWhen(_factory); + } + + public HqlElse Else() + { + return new HqlElse(_factory); + } + + public HqlInequality Inequality() + { + return new HqlInequality(_factory); + } + + public HqlLessThan LessThan() + { + return new HqlLessThan(_factory); + } + + public HqlLessThanOrEqual LessThanOrEqual() + { + return new HqlLessThanOrEqual(_factory); + } + + public HqlGreaterThan GreaterThan() + { + return new HqlGreaterThan(_factory); + } + + public HqlGreaterThanOrEqual GreaterThanOrEqual() + { + return new HqlGreaterThanOrEqual(_factory); + } + + public HqlCount Count(HqlTreeNode child) + { + return new HqlCount(_factory, child); + } + + public HqlRowStar RowStar() + { + return new HqlRowStar(_factory); + } + + public HqlCast Cast(HqlTreeNode expression, System.Type type) + { + return new HqlCast(_factory, expression, type); + } + + public HqlBitwiseNot BitwiseNot() + { + return new HqlBitwiseNot(_factory); + } + + public HqlNot Not() + { + return new HqlNot(_factory); + } + + public HqlAverage Average() + { + return new HqlAverage(_factory); + } + + public HqlAverage Average(HqlTreeNode expression) + { + return new HqlAverage(_factory, expression); + } + + public HqlSum Sum() + { + return new HqlSum(_factory); + } + + public HqlSum Sum(HqlTreeNode expression) + { + return new HqlSum(_factory, expression); + } + + public HqlMin Min() + { + return new HqlMin(_factory); + } + + public HqlMax Max() + { + return new HqlMax(_factory); + } + + public HqlAnd And(HqlTreeNode left, HqlTreeNode right) + { + return new HqlAnd(_factory, left, right); + } + + public HqlJoin Join(HqlTreeNode expression, HqlAlias @alias) + { + return new HqlJoin(_factory, expression, @alias); + } + + public HqlAny Any() + { + return new HqlAny(_factory); + } + + public HqlExists Exists() + { + return new HqlExists(_factory); + } + + public HqlElements Elements() + { + return new HqlElements(_factory); + } + } +} \ No newline at end of file Property changes on: trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs ___________________________________________________________________ Added: svn:executable + * Added: trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs 2009-08-31 10:01:43 UTC (rev 4703) @@ -0,0 +1,566 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using NHibernate.Hql.Ast.ANTLR; +using NHibernate.Hql.Ast.ANTLR.Tree; + +namespace NHibernate.Hql.Ast +{ + public class HqlTreeNode + { + protected readonly IASTNode _node; + protected readonly List<HqlTreeNode> _children; + + protected HqlTreeNode(int type, string text, IASTFactory factory, params HqlTreeNode[] children) + { + _node = factory.CreateNode(type, text); + _children = new List<HqlTreeNode>(); + + foreach (var child in children) + { + _children.Add(child); + _node.AddChild(child.AstNode); + } + } + + public IEnumerable<HqlTreeNode> NodesPreOrder + { + get + { + yield return this; + + foreach (var child in _children) + { + foreach (var node in child.NodesPreOrder) + { + yield return node; + } + } + } + } + + public IEnumerable<HqlTreeNode> NodesPostOrder + { + get + { + foreach (var child in _children) + { + foreach (var node in child.NodesPostOrder) + { + yield return node; + } + } + + yield return this; + } + } + + public IEnumerable<HqlTreeNode> Children + { + get + { + foreach (var child in _children) + { + yield return child; + } + } + } + + public void ClearChildren() + { + _children.Clear(); + _node.ClearChildren(); + } + + internal IASTNode AstNode + { + get { return _node; } + } + + internal void AddChild(HqlTreeNode child) + { + _children.Add(child); + _node.AddChild(child.AstNode); + } + } + + public class HqlQuery : HqlTreeNode + { + internal HqlQuery(IASTFactory factory, params HqlTreeNode[] children) + : base(HqlSqlWalker.QUERY, "query", factory, children) + { + } + } + + + public class HqlIdent : HqlTreeNode + { + internal HqlIdent(IASTFactory factory, string ident) + : base(HqlSqlWalker.IDENT, ident, factory) + { + } + } + + public class HqlRange : HqlTreeNode + { + internal HqlRange(IASTFactory factory, params HqlTreeNode[] children) + : base(HqlSqlWalker.RANGE, "range", factory, children) + { + } + } + + public class HqlFrom : HqlTreeNode + { + internal HqlFrom(IASTFactory factory, params HqlTreeNode[] children) + : base(HqlSqlWalker.FROM, "from", factory, children) + { + } + } + + public class HqlSelectFrom : HqlTreeNode + { + internal HqlSelectFrom(IASTFactory factory, params HqlTreeNode[] children) + : base(HqlSqlWalker.SELECT_FROM, "select_from", factory, children) + { + } + } + + public class HqlAlias : HqlTreeNode + { + public HqlAlias(IASTFactory factory, string @alias) + : base(HqlSqlWalker.ALIAS, alias, factory) + { + } + } + + public class HqlDivide : HqlTreeNode + { + public HqlDivide(IASTFactory factory) + : base(HqlSqlWalker.DIV, "/", factory) + { + } + } + + public class HqlMultiplty : HqlTreeNode + { + public HqlMultiplty(IASTFactory factory) + : base(HqlSqlWalker.STAR, "*", factory) + { + } + } + + public class HqlSubtract : HqlTreeNode + { + public HqlSubtract(IASTFactory factory) + : base(HqlSqlWalker.MINUS, "-", factory) + { + } + } + + public class HqlAdd : HqlTreeNode + { + public HqlAdd(IASTFactory factory) + : base(HqlSqlWalker.PLUS, "+", factory) + { + } + } + + public class HqlBooleanOr : HqlTreeNode + { + public HqlBooleanOr(IASTFactory factory) + : base(HqlSqlWalker.OR, "or", factory) + { + } + } + + public class HqlBooleanAnd : HqlTreeNode + { + public HqlBooleanAnd(IASTFactory factory) + : base(HqlSqlWalker.AND, "/", factory) + { + } + } + + public class HqlEquality : HqlTreeNode + { + public HqlEquality(IASTFactory factory) + : base(HqlSqlWalker.EQ, "==", factory) + { + } + } + + public class HqlParameter : HqlTreeNode + { + public HqlParameter(IASTFactory factory, string name) + : base(HqlSqlWalker.PARAM, name, factory) + { + } + } + + public class HqlDot : HqlTreeNode + { + public HqlDot(IASTFactory factory) + : base(HqlSqlWalker.DOT, ".", factory) + { + } + } + + public class HqlWhere : HqlTreeNode + { + public HqlWhere(IASTFactory factory) + : base(HqlSqlWalker.WHERE, "where", factory) + { + } + + public HqlWhere(IASTFactory factory, HqlTreeNode expression) + : base(HqlSqlWalker.WHERE, "where", factory, expression) + { + } + } + + public class HqlConstant : HqlTreeNode + { + public HqlConstant(IASTFactory factory, int type, string value) + : base(type, value, factory) + { + } + } + + public class HqlStringConstant : HqlConstant + { + public HqlStringConstant(IASTFactory factory, string s) + : base(factory, HqlSqlWalker.QUOTED_String, s) + { + } + } + + public class HqlDoubleConstant : HqlConstant + { + public HqlDoubleConstant(IASTFactory factory, string s) + : base(factory, HqlSqlWalker.NUM_DOUBLE, s) + { + } + } + + public class HqlFloatConstant : HqlConstant + { + public HqlFloatConstant(IASTFactory factory, string s) + : base(factory, HqlSqlWalker.NUM_FLOAT, s) + { + } + } + + public class HqlIntegerConstant : HqlConstant + { + public HqlIntegerConstant(IASTFactory factory, string s) + : base(factory, HqlSqlWalker.NUM_INT, s) + { + } + } + + public class HqlDecimalConstant : HqlConstant + { + public HqlDecimalConstant(IASTFactory factory, string s) + : base(factory, HqlSqlWalker.NUM_DECIMAL, s) + { + } + } + + public class HqlNull : HqlConstant + { + public HqlNull(IASTFactory factory) + : base(factory, HqlSqlWalker.NULL, "null") + { + } + } + + public class HqlOrderBy : HqlTreeNode + { + public HqlOrderBy(IASTFactory factory, HqlTreeNode expression, HqlDirection hqlDirection) + : base(HqlSqlWalker.ORDER, "", factory, expression, + hqlDirection == HqlDirection.Ascending ? + (HqlTreeNode)new HqlDirectionAscending(factory) : (HqlTreeNode)new HqlDirectionDescending(factory)) + { + } + } + + public enum HqlDirection + { + Ascending, + Descending + } + + public class HqlDirectionAscending : HqlTreeNode + { + public HqlDirectionAscending(IASTFactory factory) + : base(HqlSqlWalker.ASCENDING, "asc", factory) + { + } + } + + public class HqlDirectionDescending : HqlTreeNode + { + public HqlDirectionDescending(IASTFactory factory) + : base(HqlSqlWalker.DESCENDING, "desc", factory) + { + } + } + + public class HqlSelect : HqlTreeNode + { + public HqlSelect(IASTFactory factory, params HqlTreeNode[] expression) + : base(HqlSqlWalker.SELECT, "select", factory, expression) + { + } + } + + public class HqlConstructor : HqlTreeNode + { + public HqlConstructor(IASTFactory factory, ConstructorInfo ctor) + : base(HqlSqlWalker.CONSTRUCTOR, "ctor", factory) + { + ((ASTNode)_node).Hack = ctor; + } + } + + public class HqlNill : HqlTreeNode + { + public HqlNill(IASTFactory factory) + : base(0, "nill", factory) + { + } + } + + public class HqlElse : HqlTreeNode + { + public HqlElse(IASTFactory factory) + : base(HqlSqlWalker.ELSE, "else", factory) + { + } + } + + public class HqlWhen : HqlTreeNode + { + public HqlWhen(IASTFactory factory) + : base(HqlSqlWalker.WHEN, "when", factory) + { + } + } + + public class HqlCase : HqlTreeNode + { + public HqlCase(IASTFactory factory) + : base(HqlSqlWalker.CASE, "case", factory) + { + } + } + + public class HqlGreaterThanOrEqual : HqlTreeNode + { + public HqlGreaterThanOrEqual(IASTFactory factory) + : base(HqlSqlWalker.GE, "ge", factory) + { + } + } + + public class HqlGreaterThan : HqlTreeNode + { + public HqlGreaterThan(IASTFactory factory) + : base(HqlSqlWalker.GT, "gt", factory) + { + } + } + + public class HqlLessThanOrEqual : HqlTreeNode + { + public HqlLessThanOrEqual(IASTFactory factory) + : base(HqlSqlWalker.LE, "le", factory) + { + } + } + + public class HqlLessThan : HqlTreeNode + { + public HqlLessThan(IASTFactory factory) + : base(HqlSqlWalker.LT, "lt", factory) + { + } + } + + public class HqlInequality : HqlTreeNode + { + public HqlInequality(IASTFactory factory) + : base(HqlSqlWalker.NE, "ne", factory) + { + } + } + + public class HqlRowStar : HqlTreeNode + { + public HqlRowStar(IASTFactory factory) + : base(HqlSqlWalker.ROW_STAR, "*", factory) + { + } + } + + public class HqlCount : HqlTreeNode + { + public HqlCount(IASTFactory factory, HqlTreeNode child) + : base(HqlSqlWalker.COUNT, "count", factory, child) + { + } + } + + public class HqlAs : HqlTreeNode + { + public HqlAs(IASTFactory factory, HqlTreeNode expression, System.Type type) : base(HqlSqlWalker.AS, "as", factory, expression) + { + switch (System.Type.GetTypeCode(type)) + { + case TypeCode.Int32: + AddChild(new HqlIdent(factory, "integer")); + break; + default: + throw new InvalidOperationException(); + } + } + } + + public class HqlCast : HqlTreeNode + { + public HqlCast(IASTFactory factory, HqlTreeNode expression, System.Type type) : base(HqlSqlWalker.METHOD_CALL, "method", factory) + { + HqlIdent typeIdent; + + if (IsNullableType(type)) + { + type = ExtractUnderlyingTypeFromNullable(type); + } + + switch (System.Type.GetTypeCode(type)) + { + case TypeCode.Int32: + typeIdent = new HqlIdent(factory, "integer"); + break; + case TypeCode.Decimal: + typeIdent = new HqlIdent(factory, "decimal"); + break; + case TypeCode.DateTime: + typeIdent = new HqlIdent(factory, "datetime"); + break; + default: + throw new NotSupportedException(string.Format("Don't currently support casts to {0}", type.Name)); + } + + AddChild(new HqlIdent(factory, "cast")); + AddChild(new HqlExpressionList(factory, expression, typeIdent)); + } + + private static System.Type ExtractUnderlyingTypeFromNullable(System.Type type) + { + return type.GetGenericArguments()[0]; + } + + private static bool IsNullableType(System.Type type) + { + return (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)); + } + } + + public class HqlExpressionList : HqlTreeNode + { + public HqlExpressionList(IASTFactory factory, params HqlTreeNode[] expression) : base(HqlSqlWalker.EXPR_LIST, "expr_list", factory, expression) + { + } + } + + public class HqlNot : HqlTreeNode + { + public HqlNot(IASTFactory factory) : base(HqlSqlWalker.NOT, "not", factory) + { + } + } + + public class HqlAverage : HqlTreeNode + { + public HqlAverage(IASTFactory factory) + : base(HqlSqlWalker.AGGREGATE, "avg", factory) + { + } + + public HqlAverage(IASTFactory factory, HqlTreeNode expression) : base(HqlSqlWalker.AGGREGATE, "avg", factory, expression) + { + } + } + + public class HqlBitwiseNot : HqlTreeNode + { + public HqlBitwiseNot(IASTFactory factory) : base(HqlSqlWalker.BNOT, "not", factory) + { + } + } + + public class HqlSum : HqlTreeNode + { + public HqlSum(IASTFactory factory) + : base(HqlSqlWalker.AGGREGATE, "sum", factory) + { + } + + public HqlSum(IASTFactory factory, HqlTreeNode expression) + : base(HqlSqlWalker.AGGREGATE, "sum", factory, expression) + { + } + } + + public class HqlMax : HqlTreeNode + { + public HqlMax(IASTFactory factory) : base(HqlSqlWalker.AGGREGATE, "max", factory) + { + } + } + + public class HqlMin : HqlTreeNode + { + public HqlMin(IASTFactory factory) + : base(HqlSqlWalker.AGGREGATE, "min", factory) + { + } + } + + public class HqlAnd : HqlTreeNode + { + public HqlAnd(IASTFactory factory, HqlTreeNode left, HqlTreeNode right) : base(HqlSqlWalker.AND, "and", factory, left, right) + { + } + } + + public class HqlJoin : HqlTreeNode + { + public HqlJoin(IASTFactory factory, HqlTreeNode expression, HqlAlias @alias) : base(HqlSqlWalker.JOIN, "join", factory, expression, @alias) + { + } + } + + public class HqlAny : HqlTreeNode + { + public HqlAny(IASTFactory factory) : base(HqlSqlWalker.ANY, "any", factory) + { + } + } + + public class HqlExists : HqlTreeNode + { + public HqlExists(IASTFactory factory) : base(HqlSqlWalker.EXISTS, "exists", factory) + { + } + } + + public class HqlElements : HqlTreeNode + { + public HqlElements(IASTFactory factory) : base(HqlSqlWalker.ELEMENTS, "elements", factory) + { + } + } + +} \ No newline at end of file Property changes on: trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs ___________________________________________________________________ Added: svn:executable + * Added: trunk/nhibernate/src/NHibernate/Linq/CommandData.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/CommandData.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Linq/CommandData.cs 2009-08-31 10:01:43 UTC (rev 4703) @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using NHibernate.Hql.Ast; + +namespace NHibernate.Linq +{ + public class CommandData + { + public CommandData(HqlQuery statement, NamedParameter[] namedParameters, LambdaExpression projectionExpression, List<Action<IQuery>> additionalCriteria) + { + Statement = statement; + NamedParameters = namedParameters; + ProjectionExpression = projectionExpression; + AdditionalCriteria = additionalCriteria; + } + + public HqlQuery Statement { get; private set; } + public NamedParameter[] NamedParameters { get; private set; } + public LambdaExpression ProjectionExpression { get; set; } + public List<Action<IQuery>> AdditionalCriteria { get; set; } + + public IQuery CreateQuery(ISession session, System.Type type) + { + var query = session.CreateQuery(new HqlExpression(Statement, type)); + + foreach (var parameter in NamedParameters) + query.SetParameter(parameter.Name, parameter.Value); + + if (ProjectionExpression != null) + { + query.SetResultTransformer(new ResultTransformer(ProjectionExpression)); + } + + foreach (var criteria in AdditionalCriteria) + { + criteria(query); + } + + return query; + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate/Linq/HqlNodeStack.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/HqlNodeStack.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Linq/HqlNodeStack.cs 2009-08-31 10:01:43 UTC (rev 4703) @@ -0,0 +1,78 @@ +using System; +using System.Collections.Generic; +using NHibernate.Hql.Ast; + +namespace NHibernate.Linq +{ + public class HqlNodeStack + { + private readonly Stack<HqlTreeNode> _stack = new Stack<HqlTreeNode>(); + private readonly HqlNill _root; + + public HqlNodeStack(HqlTreeBuilder builder) + { + _root = builder.Holder(); + _stack.Push(_root); + } + + public IEnumerable<HqlTreeNode> NodesPreOrder + { + get { return _root.NodesPreOrder; } + } + + public IEnumerable<HqlTreeNode> Finish() + { + var holder = (HqlNill) _stack.Pop(); + + return holder.Children; + } + + public void PushAndPop(HqlTreeNode query) + { + Push(query).Dispose(); + } + + public IDisposable Push(HqlTreeNode query) + { + _stack.Peek().AddChild(query); + + _stack.Push(query); + + var stackEntry = new HqlNodeStackEntry(this, query); + + return stackEntry; + } + + private HqlTreeNode Peek() + { + return _stack.Peek(); + } + + private void Pop() + { + _stack.Pop(); + } + + public class HqlNodeStackEntry : IDisposable + { + private readonly HqlNodeStack _parent; + private readonly HqlTreeNode _node; + + internal HqlNodeStackEntry(HqlNodeStack parent, HqlTreeNode node) + { + _parent = parent; + _node = node; + } + + public void Dispose() + { + if (_parent.Peek() != _node) + { + throw new InvalidOperationException(); + } + + _parent.Pop(); + } + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate/Linq/NamedParameter.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/NamedParameter.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Linq/NamedParameter.cs 2009-08-31 10:01:43 UTC (rev 4703) @@ -0,0 +1,14 @@ +namespace NHibernate.Linq +{ + public class NamedParameter + { + public NamedParameter(string name, object value) + { + Name = name; + Value = value; + } + + public string Name { get; set; } + public object Value { get; set; } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate/Linq/NhExpressionTreeVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/NhExpressionTreeVisitor.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Linq/NhExpressionTreeVisitor.cs 2009-08-31 10:01:43 UTC (rev 4703) @@ -0,0 +1,286 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using NHibernate.Hql.Ast; +using Remotion.Data.Linq.Clauses.Expressions; +using Remotion.Data.Linq.Clauses.ExpressionTreeVisitors; +using Remotion.Data.Linq.Parsing; + +namespace NHibernate.Linq +{ + public class NhExpressionTreeVisitor : ThrowingExpressionTreeVisitor + { + protected readonly HqlTreeBuilder _hqlTreeBuilder; + protected readonly HqlNodeStack _stack; + private readonly ParameterAggregator _parameterAggregator; + + public NhExpressionTreeVisitor(ParameterAggregator parameterAggregator) + { + _parameterAggregator = parameterAggregator; + _hqlTreeBuilder = new HqlTreeBuilder(); + _stack = new HqlNodeStack(_hqlTreeBuilder); + } + + public IEnumerable<HqlTreeNode> GetAstBuilderNode() + { + return _stack.Finish(); + } + + public virtual void Visit(Expression expression) + { + VisitExpression(expression); + } + + protected override Expression VisitQuerySourceReferenceExpression(QuerySourceReferenceExpression expression) + { + _stack.PushAndPop(_hqlTreeBuilder.Ident(expression.ReferencedQuerySource.ItemName)); + + return expression; + } + + protected override Expression VisitBinaryExpression(BinaryExpression expression) + { + HqlTreeNode operatorNode = GetHqlOperatorNodeForBinaryOperator(expression); + + using (_stack.Push(operatorNode)) + { + VisitExpression(expression.Left); + + VisitExpression(expression.Right); + } + + return expression; + } + + private HqlTreeNode GetHqlOperatorNodeForBinaryOperator(BinaryExpression expression) + { + switch (expression.NodeType) + { + case ExpressionType.Equal: + return _hqlTreeBuilder.Equality(); + + case ExpressionType.NotEqual: + return _hqlTreeBuilder.Inequality(); + + case ExpressionType.And: + case ExpressionType.AndAlso: + return _hqlTreeBuilder.BooleanAnd(); + + case ExpressionType.Or: + case ExpressionType.OrElse: + return _hqlTreeBuilder.BooleanOr(); + + case ExpressionType.Add: + return _hqlTreeBuilder.Add(); + + case ExpressionType.Subtract: + return _hqlTreeBuilder.Subtract(); + + case ExpressionType.Multiply: + return _hqlTreeBuilder.Multiply(); + + case ExpressionType.Divide: + return _hqlTreeBuilder.Divide(); + + case ExpressionType.LessThan: + return _hqlTreeBuilder.LessThan(); + + case ExpressionType.LessThanOrEqual: + return _hqlTreeBuilder.LessThanOrEqual(); + + case ExpressionType.GreaterThan: + return _hqlTreeBuilder.GreaterThan(); + + case ExpressionType.GreaterThanOrEqual: + return _hqlTreeBuilder.GreaterThanOrEqual(); + } + + throw new InvalidOperationException(); + } + + protected override Expression VisitUnaryExpression(UnaryExpression expression) + { + HqlTreeNode operatorNode = GetHqlOperatorNodeforUnaryOperator(expression); + + using (_stack.Push(operatorNode)) + { + VisitExpression(expression.Operand); + } + + return expression; + } + + private HqlTreeNode GetHqlOperatorNodeforUnaryOperator(UnaryExpression expression) + { + switch (expression.NodeType) + { + case ExpressionType.Not: + return _hqlTreeBuilder.Not(); + } + + throw new InvalidOperationException(); + } + + protected override Expression VisitMemberExpression(MemberExpression expression) + { + using (_stack.Push(_hqlTreeBuilder.Dot())) + { + Expression newExpression = VisitExpression(expression.Expression); + + _stack.PushAndPop(_hqlTreeBuilder.Ident(expression.Member.Name)); + + if (newExpression != expression.Expression) + { + return Expression.MakeMemberAccess(newExpression, expression.Member); + } + } + + return expression; + } + + protected override Expression VisitConstantExpression(ConstantExpression expression) + { + if (expression.Value != null) + { + System.Type t = expression.Value.GetType(); + + if (t.IsGenericType && t.GetGenericTypeDefinition() == typeof (NhQueryable<>)) + { + _stack.PushAndPop(_hqlTreeBuilder.Ident(t.GetGenericArguments()[0].Name)); + return expression; + } + } + + /* + var namedParameter = _parameterAggregator.AddParameter(expression.Value); + + _expression = _hqlTreeBuilder.Parameter(namedParameter.Name); + + return expression; + */ + // TODO - get parameter support in place in the HQLQueryPlan + _stack.PushAndPop(_hqlTreeBuilder.Constant(expression.Value)); + + return expression; + } + + protected override Expression VisitMethodCallExpression(MethodCallExpression expression) + { + if (expression.Method.DeclaringType == typeof(Enumerable)) + { + switch (expression.Method.Name) + { + case "Any": + // Any has one or two arguments. Arg 1 is the source and arg 2 is the optional predicate + using (_stack.Push(_hqlTreeBuilder.Exists())) + { + using (_stack.Push(_hqlTreeBuilder.Query())) + { + using (_stack.Push(_hqlTreeBuilder.SelectFrom())) + { + using (_stack.Push(_hqlTreeBuilder.From())) + { + using (_stack.Push(_hqlTreeBuilder.Range())) + { + VisitExpression(expression.Arguments[0]); + + if (expression.Arguments.Count > 1) + { + var expr = (LambdaExpression) expression.Arguments[1]; + _stack.PushAndPop(_hqlTreeBuilder.Alias(expr.Parameters[0].Name)); + } + } + } + } + if (expression.Arguments.Count > 1) + { + using (_stack.Push(_hqlTreeBuilder.Where())) + { + VisitExpression(expression.Arguments[1]); + } + } + } + } + break; + default: + throw new NotSupportedException(string.Format("The Enumerable method {0} is not supported", expression.Method.Name)); + } + + return expression; + } + else + { + return base.VisitMethodCallExpression(expression); // throws + } + } + + protected override Expression VisitLambdaExpression(LambdaExpression expression) + { + VisitExpression(expression.Body); + + return expression; + } + + protected override Expression VisitParameterExpression(ParameterExpression expression) + { + _stack.PushAndPop(_hqlTreeBuilder.Ident(expression.Name)); + + return expression; + } + + protected override Expression VisitConditionalExpression(ConditionalExpression expression) + { + using (_stack.Push(_hqlTreeBuilder.Case())) + { + using (_stack.Push(_hqlTreeBuilder.When())) + { + VisitExpression(expression.Test); + + VisitExpression(expression.IfTrue); + } + + if (expression.IfFalse != null) + { + using (_stack.Push(_hqlTreeBuilder.Else())) + { + VisitExpression(expression.IfFalse); + } + } + } + + return expression; + } + + protected override Expression VisitSubQueryExpression(SubQueryExpression expression) + { + CommandData query = QueryModelVisitor.GenerateHqlQuery(expression.QueryModel, _parameterAggregator); + + if (query.ProjectionExpression != null) + { + throw new InvalidOperationException(); + } + + // TODO - what if there was a projection expression? + + _stack.PushAndPop(query.Statement); + + return expression; + } + + + // Called when a LINQ expression type is not handled above. + protected override Exception CreateUnhandledItemException<T>(T unhandledItem, string visitMethod) + { + string itemText = FormatUnhandledItem(unhandledItem); + var message = string.Format("The expression '{0}' (type: {1}) is not supported by this LINQ provider.", itemText, typeof(T)); + return new NotSupportedException(message); + } + + private string FormatUnhandledItem<T>(T unhandledItem) + { + var itemAsExpression = unhandledItem as Expression; + return itemAsExpression != null ? FormattingExpressionTreeVisitor.Format(itemAsExpression) : unhandledItem.ToString(); + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate/Linq/NhQueryExecutor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/NhQueryExecutor.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Linq/NhQueryExecutor.cs 2009-08-31 10:01:43 UTC (rev 4703) @@ -0,0 +1,39 @@ +using System.Collections.Generic; +using System.Linq; +using Remotion.Data.Linq; + +namespace NHibernate.Linq +{ + public class NhQueryExecutor : IQueryExecutor + { + private readonly ISession _session; + + public NhQueryExecutor(ISession session) + { + _session = session; + } + + // Executes a query with a scalar result, i.e. a query that ends with a result operator such as Count, Sum, or Average. + public T ExecuteScalar<T>(QueryModel queryModel) + { + return ExecuteCollection<T>(queryModel).Single(); + } + + // Executes a query with a single result object, i.e. a query that ends with a result operator such as First, Last, Single, Min, or Max. + public T ExecuteSingle<T>(QueryModel queryModel, bool returnDefaultWhenEmpty) + { + return returnDefaultWhenEmpty ? ExecuteCollection<T>(queryModel).SingleOrDefault() : ExecuteCollection<T>(queryModel).Single(); + } + + // Executes a query with a collection result. + public IEnumerable<T> ExecuteCollection<T>(QueryModel queryModel) + { + var commandData = QueryModelVisitor.GenerateHqlQuery(queryModel); + + var query = commandData.CreateQuery(_session, typeof(T)); + + // TODO - check which call on Query makes most sense... + return (IEnumerable<T>) query.List(); + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate/Linq/NhQueryable.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/NhQueryable.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Linq/NhQueryable.cs 2009-08-31 10:01:43 UTC (rev 4703) @@ -0,0 +1,29 @@ +using System.Linq; +using System.Linq.Expressions; +using Remotion.Data.Linq; + +namespace NHibernate.Linq +{ + /// <summary> + /// Provides the main entry point to a LINQ query. + /// </summary> + public class NhQueryable<T> : QueryableBase<T> + { + private static IQueryExecutor CreateExecutor(ISession session) + { + return new NhQueryExecutor(session); + } + + // This constructor is called by our users, create a new IQueryExecutor. + public NhQueryable(ISession session) + : base(CreateExecutor(session)) + { + } + + // This constructor is called indirectly by LINQ's query methods, just pass to base. + public NhQueryable(IQueryProvider provider, Expression expression) + : base(provider, expression) + { + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate/Linq/Nominator.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Nominator.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Linq/Nominator.cs 2009-08-31 10:01:43 UTC (rev 4703) @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using Remotion.Data.Linq.Parsing; + +namespace NHibernate.Linq +{ + /// <summary> + /// Performs bottom-up analysis to determine which nodes that match a certain predicate + /// </summary> + class Nominator : ExpressionTreeVisitor + { + readonly Func<Expression, bool> _fnIsCandidate; + HashSet<Expression> _candidates; + bool _cannotBeCandidate; + + internal Nominator(Func<Expression, bool> fnIsCandidate) + { + _fnIsCandidate = fnIsCandidate; + } + + internal HashSet<Expression> Nominate(Expression expression) + { + _candidates = new HashSet<Expression>(); + VisitExpression(expression); + return _candidates; + } + + protected override Expression VisitExpression(Expression expression) + { + if (expression != null) + { + bool saveCannotBeEvaluated = _cannotBeCandidate; + _cannotBeCandidate = false; + + base.VisitExpression(expression); + + if (!_cannotBeCandidate) + { + if (_fnIsCandidate(expression)) + { + _candidates.Add(expression); + } + else + { + _cannotBeCandidate = true; + } + } + + _cannotBeCandidate |= saveCannotBeEvaluated; + } + + return expression; + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate/Linq/ParameterAggregator.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/ParameterAggregator.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Linq/ParameterAggregator.cs 2009-08-31 10:01:43 UTC (rev 4703) @@ -0,0 +1,21 @@ +using System.Collections.Generic; + +namespace NHibernate.Linq +{ + public class ParameterAggregator + { + private readonly List<NamedParameter> _parameters = new List<NamedParameter>(); + + public NamedParameter AddParameter(object value) + { + var parameter = new NamedParameter("p" + (_parameters.Count + 1), value); + _parameters.Add(parameter); + return parameter; + } + + public NamedParameter[] GetParameters() + { + return _parameters.ToArray(); + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate/Linq/ProjectionEvaluator.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/ProjectionEvaluator.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Linq/ProjectionEvaluator.cs 2009-08-31 10:01:43 UTC (rev 4703) @@ -0,0 +1,77 @@ +using System.Collections.Generic; +using System.Linq.Expressions; +using NHibernate.Hql.Ast; +using Remotion.Data.Linq.Parsing; + +namespace NHibernate.Linq +{ + public class ProjectionEvaluator : ExpressionTreeVisitor + { + protected readonly HqlTreeBuilder _hqlTreeBuilder; + protected readonly HqlNodeStack _stack; + private readonly ParameterAggregator _parameterAggregator; + private HashSet<Expression> _hqlNodes; + private readonly ParameterExpression _objectArray; + private Expression _projectionExpression; + private int _iColumn; + + public ProjectionEvaluator(ParameterAggregator parameterAggregator, ParameterExpression objectArray) + { + _parameterAggregator = parameterAggregator; + _objectArray = objectArray; + _hqlTreeBuilder = new HqlTreeBuilder(); + _stack = new HqlNodeStack(_hqlTreeBuilder); + } + + public Expression ProjectionExpression + { + get { return _projectionExpression; } + } + + public IEnumerable<HqlTreeNode> GetAstBuilderNode() + { + return _stack.Finish(); + } + + public void Visit(Expression expression) + { + // First, find the sub trees that can be expressed purely in HQL + _hqlNodes = new Nominator(CanBeEvaluatedInHql).Nominate(expression); + + // Now visit the tree + Expression projection = VisitExpression(expression); + + if ((projection != expression) && !_hqlNodes.Contains(expression)) + { + _projectionExpression = projection; + } + } + + protected override Expression VisitExpression(Expression expression) + { + if (expression == null) + { + return null; + } + + if (_hqlNodes.Contains(expression)) + { + // Pure HQL evaluation + var hqlVisitor = new NhExpressionTreeVisitor(_parameterAggregator); + hqlVisitor.Visit(expression); + hqlVisitor.GetAstBuilderNode().ForEach(n =>_stack.PushAndPop(n) ); + + return Expression.Convert(Expression.ArrayIndex(_objectArray, Expression.Constant(_iColumn++)), + expression.Type); + } + + // Can't handle this node with HQL. Just recurse down, and emit the expression + return base.VisitExpression(expression); + } + + private static bool CanBeEvaluatedInHql(Expression expression) + { + return (expression.NodeType != ExpressionType.MemberInit) && (expression.NodeType != ExpressionType.New); + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate/Linq/QueryModelVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/QueryModelVisitor.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Linq/QueryModelVisitor.cs 2009-08-31 10:01:43 UTC (rev 4703) @@ -0,0 +1,309 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using NHibernate.Hql.Ast; +using Remotion.Data.Linq; +using Remotion.Data.Linq.Clauses; +using Remotion.Data.Linq.Clauses.Expressions; +using Remotion.Data.Linq.Clauses.ResultOperators; +using Remotion.Data.Linq.Clauses.StreamedData; +using Remotion.Data.Linq.Transformations; + +namespace NHibernate.Linq +{ + public class QueryModelVisitor : QueryModelVisitorBase + { + public static CommandData GenerateHqlQuery(QueryModel queryModel) + { + return GenerateHqlQuery(queryModel, new ParameterAggregator()); + } + + public static CommandData GenerateHqlQuery(QueryModel queryModel, ParameterAggregator aggregator) + { + // SubQueryFromClauseFlattener flattener = new SubQueryFromClauseFlattener(); + // flattener.VisitQueryModel(queryModel); + + var visitor = new QueryModelVisitor(aggregator); + visitor.VisitQueryModel(queryModel); + return visitor.GetHqlCommand(); + } + + private readonly HqlTreeBuilder _hqlTreeBuilder; + private readonly ParameterAggregator _parameterAggregator; + private readonly ParameterExpression _objectArray; + private Expression _projectionExpression; + private IStreamedDataInfo _inputInfo; + readonly List<Action<IQuery>> _additionalCriteria = new List<Action<IQuery>>(); + + + private HqlWhere _whereClause; + private HqlSelect _selectClause; + private HqlFrom _fromClause; + private readonly List<HqlTreeNode> _orderByClauses = new List<HqlTreeNode>(); + + private QueryModelVisitor(ParameterAggregator parameterAggregator) + { + _hqlTreeBuilder = new HqlTreeBuilder(); + _parameterAggregator = parameterAggregator; + _objectArray = Expression.Parameter(typeof (object[]), "objectArray"); + } + + public CommandData GetHqlCommand() + { + HqlSelectFrom selectFrom = _hqlTreeBuilder.SelectFrom(); + + if (_fromClause != null) + { + selectFrom.AddChild(_fromClause); + } + + if (_selectClause != null) + { + selectFrom.AddChild(_selectClause); + } + + HqlQuery query = _hqlTreeBuilder.Query(selectFrom); + + if (_whereClause != null) + { + query.AddChild(_whereClause); + } + + foreach (var orderByClause in _orderByClauses) + { + query.AddChild(orderByClause); + } + + return new CommandData(query, + _parameterAggregator.GetParameters(), + _projectionExpression == null ? null : Expression.Lambda(_projectionExpression, _objectArray), + _additionalCriteria); + } + + public override void VisitQueryModel(QueryModel queryModel) + { + if (queryModel.MainFromClause != null) + { + queryModel.MainFromClause.Accept(this, queryModel); + } + + if (queryModel.SelectClause != null) + { + queryModel.SelectClause.Accept(this, queryModel); + } + + VisitBodyClauses(queryModel.BodyClauses, queryModel); + + VisitResultOperators(queryModel.ResultOperators, queryModel); + } + + public override void VisitMainFromClause(MainFromClause fromClause, QueryModel queryModel) + { + var visitor = new NhExpressionTreeVisitor(_parameterAggregator); + visitor.Visit(fromClause.FromExpression); + + _fromClause = _hqlTreeBuilder.From( + _hqlTreeBuilder.Range( + visitor.GetAstBuilderNode().Single(), + _hqlTreeBuilder.Alias(fromClause.ItemName))); + + base.VisitMainFromClause(fromClause, queryModel); + } + + + public override void VisitResultOperator(ResultOperatorBase resultOperator, QueryModel queryModel, int index) + { + if (IsCountOperator(resultOperator)) + { + ProcessCountOperator(resultOperator); + } + else if (IsAggregateOperator(resultOperator)) + { + ProcessAggregateOperator(resultOperator); + } + else if (IsPositionalOperator(resultOperator)) + { + ProcessPositionalOperator(resultOperator); + } + else + { + throw new NotSupportedException(string.Format("The {0} result operator is not current supported", + resultOperator.GetType().Name)); + } + + base.VisitResultOperator(resultOperator, queryModel, index); + } + + private void ProcessPositionalOperator(ResultOperatorBase resultOperator) + { + var first = (FirstResultOperator) resultOperator; + + _additionalCriteria.Add(q => q.SetMaxResults(1)); + } + + private bool IsPositionalOperator(ResultOperatorBase resultOperator) + { + return resultOperator is FirstResultOperator; + } + + private void ProcessAggregateOperator(ResultOperatorBase resultOperator) + { + HqlTreeNode aggregateNode; + + if (resultOperator is AverageResultOperator) + { + aggregateNode = _hqlTreeBuilder.Average(); + } + else if (resultOperator is SumResultOperator) + { + aggregateNode = _hqlTreeBuilder.Sum(); + } + else if (resultOperator is MinResultOperator) + { + aggregateNode = _hqlTreeBuilder.Min(); + } + else + { + aggregateNode = _hqlTreeBuilder.Max(); + } + + _inputInfo = resultOperator.GetOutputDataInfo(_inputInfo); + + HqlTreeNode child = _selectClause.Children.Single(); + + _selectClause.ClearChildren(); + + aggregateNode.AddChild(child); + + _selectClause.AddChild(_hqlTreeBuilder.Cast(aggregateNode, _inputInfo.DataType)); + } + + private void ProcessCountOperator(ResultOperatorBase resultOperator) + { + HqlTreeNode count = _hqlTreeBuilder.Count(_hqlTreeBuilder.RowStar()); + + if (resultOperator is CountResultOperator) + { + // Need to cast to an int (Hql defaults to long counts) + count = _hqlTreeB... [truncated message content] |
From: <aye...@us...> - 2009-09-16 10:53:29
|
Revision: 4718 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4718&view=rev Author: ayenderahien Date: 2009-09-16 10:53:14 +0000 (Wed, 16 Sep 2009) Log Message: ----------- Merging from 2.1.x branch r4690 - NH-1928 r4691 - NH-1927 r4696 - Minor comment removal r4697 - Log session factory that opened the sessionFactory r4711 - better error message for failure in identifier generator creation r4715 - Better support for criteria queries on composite element collections r4716 - NH-1922 - DetachedCriteria with IStatelessSession Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Criterion/DetachedCriteria.cs trunk/nhibernate/src/NHibernate/Engine/Query/ParameterParser.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/SessionFactoryHelperExtensions.cs trunk/nhibernate/src/NHibernate/Hql/Classic/QueryTranslator.cs trunk/nhibernate/src/NHibernate/Hql/Classic/SelectParser.cs trunk/nhibernate/src/NHibernate/Hql/Classic/WhereParser.cs trunk/nhibernate/src/NHibernate/Hql/QuerySplitter.cs trunk/nhibernate/src/NHibernate/Hql/Util/SessionFactoryHelper.cs trunk/nhibernate/src/NHibernate/Id/IdentifierGeneratorFactory.cs trunk/nhibernate/src/NHibernate/Impl/SessionFactoryImpl.cs trunk/nhibernate/src/NHibernate/Impl/SessionFactoryObjectFactory.cs trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs trunk/nhibernate/src/NHibernate/Loader/Criteria/CriteriaJoinWalker.cs trunk/nhibernate/src/NHibernate/Loader/Criteria/CriteriaQueryTranslator.cs trunk/nhibernate/src/NHibernate/Loader/JoinWalker.cs trunk/nhibernate/src/NHibernate/Loader/Loader.cs trunk/nhibernate/src/NHibernate/NHibernate.csproj trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH830/AutoFlushTestFixture.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate/Loader/Criteria/ComponentCollectionCriteriaInfoProvider.cs trunk/nhibernate/src/NHibernate/Loader/Criteria/EntityCriteriaInfoProvider.cs trunk/nhibernate/src/NHibernate/Loader/Criteria/ICriteriaInfoProvider.cs trunk/nhibernate/src/NHibernate/Loader/Criteria/ScalarCollectionCriteriaInfoProvider.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Employee.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Money.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1922/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1922/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1922/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1922/Model.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1927/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1927/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1927/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1927/Model.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1928/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1928/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1928/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1928/Model.cs Removed Paths: ------------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Employee.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Money.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1922/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1922/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1922/Model.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1927/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1927/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1927/Model.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1928/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1928/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1928/Model.cs Property Changed: ---------------- trunk/nhibernate/ trunk/nhibernate/src/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Customer.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1850/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1904/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1904/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1904/Model.cs trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/ Property changes on: trunk/nhibernate ___________________________________________________________________ Added: svn:mergeinfo + /branches/2.1.x/nhibernate:4690-4691,4696-4697,4711,4715-4716 Property changes on: trunk/nhibernate/src ___________________________________________________________________ Modified: svn:mergeinfo - /branches/2.1.x/nhibernate/src:4659,4671,4681 + /branches/2.1.x/nhibernate/src:4659,4671,4681,4690-4691,4696-4697,4711,4715-4716 Modified: trunk/nhibernate/src/NHibernate/Criterion/DetachedCriteria.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Criterion/DetachedCriteria.cs 2009-09-16 10:34:39 UTC (rev 4717) +++ trunk/nhibernate/src/NHibernate/Criterion/DetachedCriteria.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -1,4 +1,5 @@ using System; +using NHibernate.Engine; using NHibernate.Impl; using NHibernate.SqlCommand; using NHibernate.Transform; @@ -65,6 +66,15 @@ return impl; } + /// <summary> + /// Get an executable instance of <c>Criteria</c>, + /// to actually run the query.</summary> + public ICriteria GetExecutableCriteria(IStatelessSession session) + { + impl.Session = (ISessionImplementor)session; + return impl; + } + public static DetachedCriteria For(System.Type entityType) { return new DetachedCriteria(entityType); Modified: trunk/nhibernate/src/NHibernate/Engine/Query/ParameterParser.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Engine/Query/ParameterParser.cs 2009-09-16 10:34:39 UTC (rev 4717) +++ trunk/nhibernate/src/NHibernate/Engine/Query/ParameterParser.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -64,7 +64,17 @@ if (afterNewLine && (indx + 1 < stringLength) && sqlString.Substring(indx, 2) == "--") { var closeCommentIdx = sqlString.IndexOf(Environment.NewLine, indx + 2); - recognizer.Other(sqlString.Substring(indx, closeCommentIdx - indx)); + string comment; + if (closeCommentIdx == -1) + { + closeCommentIdx = sqlString.Length; + comment = sqlString.Substring(indx); + } + else + { + comment = sqlString.Substring(indx, closeCommentIdx - indx + Environment.NewLine.Length); + } + recognizer.Other(comment); indx = closeCommentIdx + NewLineLength - 1; continue; } Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/SessionFactoryHelperExtensions.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/SessionFactoryHelperExtensions.cs 2009-09-16 10:34:39 UTC (rev 4717) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/SessionFactoryHelperExtensions.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -17,6 +17,7 @@ { private readonly ISessionFactoryImplementor _sfi; private readonly NullableDictionary<string, IPropertyMapping> _collectionPropertyMappingByRole; + private readonly SessionFactoryHelper helper; /// <summary> /// Construct a new SessionFactoryHelperExtensions instance. @@ -25,6 +26,7 @@ public SessionFactoryHelperExtensions(ISessionFactoryImplementor sfi) { _sfi = sfi; + helper = new SessionFactoryHelper(_sfi); _collectionPropertyMappingByRole = new NullableDictionary<string, IPropertyMapping>(); } @@ -251,7 +253,7 @@ /// <returns>The defined persister for this class, or null if none found.</returns> private static IQueryable FindQueryableUsingImports(ISessionFactoryImplementor sfi, string className) { - return SessionFactoryHelper.FindQueryableUsingImports(sfi, className); + return new SessionFactoryHelper(sfi).FindQueryableUsingImports(className); } /// <summary> @@ -261,7 +263,7 @@ /// <returns>The defined persister for this entity, or null if none found.</returns> private IEntityPersister FindEntityPersisterByName(string name) { - return SessionFactoryHelper.FindEntityPersisterUsingImports(_sfi, name); + return helper.FindEntityPersisterUsingImports(name); } /// <summary> Modified: trunk/nhibernate/src/NHibernate/Hql/Classic/QueryTranslator.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Classic/QueryTranslator.cs 2009-09-16 10:34:39 UTC (rev 4717) +++ trunk/nhibernate/src/NHibernate/Hql/Classic/QueryTranslator.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -537,7 +537,7 @@ internal IQueryable GetPersisterUsingImports(string className) { - return SessionFactoryHelper.FindQueryableUsingImports(Factory, className); + return helper.FindQueryableUsingImports(className); } internal IQueryable GetPersister(string clazz) @@ -1320,7 +1320,7 @@ return result; } - public static string[] ConcreteQueries(string query, ISessionFactoryImplementor factory) + public string[] ConcreteQueries(string query, ISessionFactoryImplementor factory) { // TODO H3.2 check if the QuerySplitter can do the work (this method is not present in H3.2) @@ -1374,7 +1374,7 @@ ((last != null && beforeClassTokens.Contains(last)) && (next == null || !notAfterClassTokens.Contains(next))) || PathExpressionParser.EntityClass.Equals(last)) { - System.Type clazz = SessionFactoryHelper.GetImportedClass(factory, token); + System.Type clazz = helper.GetImportedClass(token); if (clazz != null) { string[] implementors = factory.GetImplementors(clazz.FullName); Modified: trunk/nhibernate/src/NHibernate/Hql/Classic/SelectParser.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Classic/SelectParser.cs 2009-09-16 10:34:39 UTC (rev 4717) +++ trunk/nhibernate/src/NHibernate/Hql/Classic/SelectParser.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -35,6 +35,7 @@ public void Token(string token, QueryTranslator q) { + SessionFactoryHelper helper = new SessionFactoryHelper(q.Factory); string lctoken = token.ToLowerInvariant(); if (first) @@ -55,7 +56,7 @@ if (afterNew) { afterNew = false; - holderClass = SessionFactoryHelper.GetImportedClass(q.Factory, token); + holderClass = helper.GetImportedClass(token); if (holderClass == null) { throw new QueryException("class not found: " + token); Modified: trunk/nhibernate/src/NHibernate/Hql/Classic/WhereParser.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Classic/WhereParser.cs 2009-09-16 10:34:39 UTC (rev 4717) +++ trunk/nhibernate/src/NHibernate/Hql/Classic/WhereParser.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -463,6 +463,7 @@ private void DoToken(string token, QueryTranslator q) { + SessionFactoryHelper helper = new SessionFactoryHelper(q.Factory); if (q.IsName(StringHelper.Root(token))) //path expression { DoPathExpression(q.Unalias(token), q); @@ -508,7 +509,7 @@ { fieldName = StringHelper.Unqualify(token); string typeName = StringHelper.Qualifier(token); - importedType = SessionFactoryHelper.GetImportedClass(q.Factory, typeName); + importedType = helper.GetImportedClass(typeName); } if (indexOfDot > -1 && importedType != null && Modified: trunk/nhibernate/src/NHibernate/Hql/QuerySplitter.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/QuerySplitter.cs 2009-09-16 10:34:39 UTC (rev 4717) +++ trunk/nhibernate/src/NHibernate/Hql/QuerySplitter.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -46,6 +46,8 @@ //TODO: this is one of the ugliest and most fragile pieces of code in Hibernate.... + SessionFactoryHelper helper = new SessionFactoryHelper(factory); + string[] tokens = StringHelper.Split(StringHelper.WhiteSpace + "(),", query, true); if (tokens.Length == 0) { @@ -95,7 +97,7 @@ (next == null || !notAfterClassTokens.Contains(next))) || PathExpressionParser.EntityClass.Equals(last)) { - System.Type clazz = SessionFactoryHelper.GetImportedClass(factory, token); + System.Type clazz = helper.GetImportedClass(token); if (clazz != null) { string[] implementors = factory.GetImplementors(clazz.FullName); Modified: trunk/nhibernate/src/NHibernate/Hql/Util/SessionFactoryHelper.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Util/SessionFactoryHelper.cs 2009-09-16 10:34:39 UTC (rev 4717) +++ trunk/nhibernate/src/NHibernate/Hql/Util/SessionFactoryHelper.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -1,4 +1,8 @@ +using System; +using System.Collections.Generic; using NHibernate.Engine; +using NHibernate.Hql.Ast.ANTLR; +using NHibernate.Persister.Collection; using NHibernate.Persister.Entity; using NHibernate.Util; @@ -9,13 +13,22 @@ /// </summary> public class SessionFactoryHelper { - public static IQueryable FindQueryableUsingImports(ISessionFactoryImplementor sfi, string className) + private readonly ISessionFactoryImplementor sfi; + private readonly IDictionary<string,CollectionPropertyMapping> collectionPropertyMappingByRole = + new Dictionary<string,CollectionPropertyMapping>(); + + public SessionFactoryHelper(ISessionFactoryImplementor sfi) { - return FindEntityPersisterUsingImports(sfi, className) as IQueryable; + this.sfi = sfi; } - public static IEntityPersister FindEntityPersisterUsingImports(ISessionFactoryImplementor sfi, string className) + public IQueryable FindQueryableUsingImports(string className) { + return FindEntityPersisterUsingImports(className) as IQueryable; + } + + public IEntityPersister FindEntityPersisterUsingImports(string className) + { // NH : short cut if (string.IsNullOrEmpty(className)) { @@ -61,8 +74,75 @@ return TypeNameParser.Parse(assemblyQualifiedName).Type; } - public static System.Type GetImportedClass(ISessionFactoryImplementor sfi, string className) + + + /// <summary> + /// Locate the collection persister by the collection role. + /// </summary> + /// <param name="role">The collection role name.</param> + /// <returns>The defined CollectionPersister for this collection role, or null.</returns> + public IQueryableCollection GetCollectionPersister(String role) { + try + { + return (IQueryableCollection)sfi.GetCollectionPersister(role); + } + catch (InvalidCastException cce) + { + throw new QueryException("collection is not queryable: " + role); + } + catch (Exception e) + { + throw new QueryException("collection not found: " + role); + } + } + + /// <summary> + /// Locate the persister by class or entity name, requiring that such a persister + /// exists + /// </summary> + /// <param name="name">The class or entity name</param> + /// <returns>The defined persister for this entity</returns> + public IEntityPersister RequireClassPersister(String name) + { + IEntityPersister cp = FindEntityPersisterByName(name); + if (cp == null) + { + throw new QuerySyntaxException(name + " is not mapped"); + } + + return cp; + } + + /// <summary> + /// Locate the persister by class or entity name. + /// </summary> + /// <param name="name">The class or entity name</param> + /// <returns>The defined persister for this entity, or null if none found.</returns> + private IEntityPersister FindEntityPersisterByName(String name) + { + // First, try to get the persister using the given name directly. + try + { + return sfi.GetEntityPersister(name); + } + catch (MappingException ignore) + { + // unable to locate it using this name + } + + // If that didn't work, try using the 'import' name. + String importedClassName = sfi.GetImportedClassName(name); + if (importedClassName == null) + { + return null; + } + return sfi.GetEntityPersister(importedClassName); + } + + + public System.Type GetImportedClass(string className) + { string importedName = sfi.GetImportedClassName(className); if (importedName == null) @@ -73,5 +153,49 @@ // NH Different implementation: our sessionFactory.Imports hold AssemblyQualifiedName return System.Type.GetType(importedName, false); } + + + /// <summary> + /// Retreive a PropertyMapping describing the given collection role. + /// </summary> + /// <param name="role">The collection role for whcih to retrieve the property mapping.</param> + /// <returns>The property mapping.</returns> + public IPropertyMapping GetCollectionPropertyMapping(String role) + { + return collectionPropertyMappingByRole[role]; + } + + + /* Locate the collection persister by the collection role, requiring that + * such a persister exist. + * + * @param role The collection role name. + * @return The defined CollectionPersister for this collection role. + * @throws QueryException Indicates that the collection persister could not be found. + */ + public IQueryableCollection RequireQueryableCollection(String role) + { + try + { + IQueryableCollection queryableCollection = (IQueryableCollection)sfi + .GetCollectionPersister(role); + if (queryableCollection != null) + { + collectionPropertyMappingByRole.Add(role, + new CollectionPropertyMapping(queryableCollection)); + } + return queryableCollection; + } + catch (InvalidCastException) + { + throw new QueryException( + "collection role is not queryable: " + role); + } + catch (Exception) + { + throw new QueryException("collection role not found: " + + role); + } + } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Id/IdentifierGeneratorFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Id/IdentifierGeneratorFactory.cs 2009-09-16 10:34:39 UTC (rev 4717) +++ trunk/nhibernate/src/NHibernate/Id/IdentifierGeneratorFactory.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -215,7 +215,7 @@ } catch (Exception e) { - throw new MappingException("could not instantiate id generator", e); + throw new MappingException("could not instantiate id generator: " + strategy, e); } } Modified: trunk/nhibernate/src/NHibernate/Impl/SessionFactoryImpl.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/SessionFactoryImpl.cs 2009-09-16 10:34:39 UTC (rev 4717) +++ trunk/nhibernate/src/NHibernate/Impl/SessionFactoryImpl.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -1172,6 +1172,7 @@ } #region NHibernate specific + public string TryGetGuessEntityName(System.Type implementor) { string result; @@ -1179,6 +1180,16 @@ return result; } + public string Name + { + get { return name; } + } + + public string Uuid + { + get { return uuid; } + } + #endregion } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Impl/SessionFactoryObjectFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/SessionFactoryObjectFactory.cs 2009-09-16 10:34:39 UTC (rev 4717) +++ trunk/nhibernate/src/NHibernate/Impl/SessionFactoryObjectFactory.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -17,17 +17,11 @@ /// you are serializing in the same AppDomain then there will be no problem because the uid will /// be in this object. /// </para> - /// <para> - /// TODO: verify that the AppDomain statements are correct. - /// </para> /// </remarks> public static class SessionFactoryObjectFactory { - // to stop this class from being unloaded - this is a comment - // from h2.0.3 - is this applicable to .net also??? private static readonly ILog log; - // in h2.0.3 these use a class called "FastHashMap" private static readonly IDictionary<string, ISessionFactory> Instances = new Dictionary<string, ISessionFactory>(); private static readonly IDictionary<string, ISessionFactory> NamedInstances = new Dictionary<string, ISessionFactory>(); Modified: trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs 2009-09-16 10:34:39 UTC (rev 4717) +++ trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -228,7 +228,8 @@ if (log.IsDebugEnabled) { - log.Debug(string.Format("[session-id={0}] opened session at timestamp:{1}", SessionId, timestamp)); + log.DebugFormat("[session-id={0}] opened session at timestamp: {1}, for session factory: [{2}/{3}]", + SessionId, timestamp, factory.Name, factory.Uuid); } CheckAndUpdateSessionStatus(); Copied: trunk/nhibernate/src/NHibernate/Loader/Criteria/ComponentCollectionCriteriaInfoProvider.cs (from rev 4715, branches/2.1.x/nhibernate/src/NHibernate/Loader/Criteria/ComponentCollectionCriteriaInfoProvider.cs) =================================================================== --- trunk/nhibernate/src/NHibernate/Loader/Criteria/ComponentCollectionCriteriaInfoProvider.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Loader/Criteria/ComponentCollectionCriteriaInfoProvider.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using NHibernate.Persister.Collection; +using NHibernate.Persister.Entity; +using NHibernate.Type; + +namespace NHibernate.Loader.Criteria +{ + public class ComponentCollectionCriteriaInfoProvider : ICriteriaInfoProvider + { + private readonly IQueryableCollection persister; + private readonly IDictionary<String, IType> subTypes = new Dictionary<string, IType>(); + + public ComponentCollectionCriteriaInfoProvider(IQueryableCollection persister) + { + this.persister = persister; + if (!persister.ElementType.IsComponentType) + { + throw new ArgumentException("persister for role " + persister.Role + " is not a collection-of-component"); + } + + var componentType = (ComponentType)persister.ElementType; + var names = componentType.PropertyNames; + var types = componentType.Subtypes; + + for (var i = 0; i < names.Length; i++) + { + subTypes.Add(names[i], types[i]); + } + + } + + public String Name + { + get + { + return persister.Role; + } + } + + public string[] Spaces + { + get + { + return persister.CollectionSpaces; + } + } + + public IPropertyMapping PropertyMapping + { + get + { + return persister; + } + } + + public IType GetType(String relativePath) + { + // TODO: can a component have a nested component? then we may need to do something more here... + if (relativePath.IndexOf('.') >= 0) + throw new ArgumentException("dotted paths not handled (yet?!) for collection-of-component"); + + IType type; + + if (subTypes.TryGetValue(relativePath, out type) == false) + throw new ArgumentException("property " + relativePath + " not found in component of collection " + Name); + + return type; + } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Loader/Criteria/CriteriaJoinWalker.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Loader/Criteria/CriteriaJoinWalker.cs 2009-09-16 10:34:39 UTC (rev 4717) +++ trunk/nhibernate/src/NHibernate/Loader/Criteria/CriteriaJoinWalker.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -1,6 +1,8 @@ using System.Collections.Generic; using Iesi.Collections.Generic; +using log4net; using NHibernate.Engine; +using NHibernate.Persister.Collection; using NHibernate.Persister.Entity; using NHibernate.SqlCommand; using NHibernate.Type; @@ -25,6 +27,8 @@ private readonly string[] userAliases; private readonly IList<string> userAliasList = new List<string>(); + private static readonly ILog logger = LogManager.GetLogger(typeof (CriteriaJoinWalker)); + public CriteriaJoinWalker(IOuterJoinLoadable persister, CriteriaQueryTranslator translator, ISessionFactoryImplementor factory, ICriteria criteria, string rootEntityName, IDictionary<string, IFilter> enabledFilters) @@ -126,8 +130,15 @@ protected override string GenerateTableAlias(int n, string path, IJoinable joinable) { - if (joinable.ConsumesEntityAlias()) + bool shouldCreateUserAlias = joinable.ConsumesEntityAlias(); + if(shouldCreateUserAlias == false && joinable.IsCollection) { + var elementType = ((ICollectionPersister)joinable).ElementType; + if (elementType != null) + shouldCreateUserAlias = elementType.IsComponentType; + } + if (shouldCreateUserAlias) + { ICriteria subcriteria = translator.GetCriteria(path); string sqlAlias = subcriteria == null ? null : translator.GetSQLAlias(subcriteria); if (sqlAlias != null) @@ -135,10 +146,8 @@ userAliasList.Add(subcriteria.Alias); //alias may be null return sqlAlias; //EARLY EXIT } - else - { - userAliasList.Add(null); - } + + userAliasList.Add(null); } return base.GenerateTableAlias(n + translator.SQLAliasCount, path, joinable); } Modified: trunk/nhibernate/src/NHibernate/Loader/Criteria/CriteriaQueryTranslator.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Loader/Criteria/CriteriaQueryTranslator.cs 2009-09-16 10:34:39 UTC (rev 4717) +++ trunk/nhibernate/src/NHibernate/Loader/Criteria/CriteriaQueryTranslator.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Text; using Iesi.Collections.Generic; +using log4net; using NHibernate.Criterion; using NHibernate.Engine; using NHibernate.Hql.Util; @@ -24,9 +25,14 @@ private readonly CriteriaImpl rootCriteria; private readonly string rootEntityName; private readonly string rootSQLAlias; - private readonly int aliasCount = 0; + private const int aliasCount = 0; - private readonly IDictionary<ICriteria, string> criteriaEntityNames = new LinkedHashMap<ICriteria, string>(); + private readonly IDictionary<ICriteria, ICriteriaInfoProvider> criteriaInfoMap = + new Dictionary<ICriteria, ICriteriaInfoProvider>(); + + private readonly IDictionary<String, ICriteriaInfoProvider> nameCriteriaInfoMap = + new Dictionary<string, ICriteriaInfoProvider>(); + private readonly ISet<ICollectionPersister> criteriaCollectionPersisters = new HashedSet<ICollectionPersister>(); private readonly IDictionary<ICriteria, string> criteriaSQLAliasMap = new Dictionary<ICriteria, string>(); @@ -36,23 +42,26 @@ private readonly ISessionFactoryImplementor sessionFactory; private int indexForAlias = 0; + private static readonly ILog logger = LogManager.GetLogger(typeof(CriteriaQueryTranslator)); private readonly List<TypedValue> usedTypedValues = new List<TypedValue>(); + private SessionFactoryHelper helper; public CriteriaQueryTranslator(ISessionFactoryImplementor factory, CriteriaImpl criteria, string rootEntityName, - string rootSQLAlias, ICriteriaQuery outerQuery) + string rootSQLAlias, ICriteriaQuery outerQuery) : this(factory, criteria, rootEntityName, rootSQLAlias) { outerQueryTranslator = outerQuery; } public CriteriaQueryTranslator(ISessionFactoryImplementor factory, CriteriaImpl criteria, string rootEntityName, - string rootSQLAlias) + string rootSQLAlias) { rootCriteria = criteria; this.rootEntityName = rootEntityName; sessionFactory = factory; this.rootSQLAlias = rootSQLAlias; + helper = new SessionFactoryHelper(factory); CreateAliasCriteriaMap(); CreateAssociationPathCriteriaMap(); @@ -62,7 +71,7 @@ } [CLSCompliant(false)] // TODO: Why does this cause a problem in 1.1 - public string RootSQLAlias + public string RootSQLAlias { get { return rootSQLAlias; } } @@ -71,9 +80,9 @@ { ISet<string> result = new HashedSet<string>(); - foreach (string entityName in criteriaEntityNames.Values) + foreach (ICriteriaInfoProvider info in criteriaInfoMap.Values) { - result.AddAll(Factory.GetEntityPersister(entityName).QuerySpaces); + result.AddAll(info.Spaces); } foreach (ICollectionPersister collectionPersister in criteriaCollectionPersisters) @@ -131,7 +140,7 @@ return new QueryParameters(typeArray, valueArray, lockModes, selection, rootCriteria.Cacheable, rootCriteria.CacheRegion, - rootCriteria.Comment, rootCriteria.LookupByNaturalKey, rootCriteria.ResultTransformer); + rootCriteria.Comment, rootCriteria.LookupByNaturalKey, rootCriteria.ResultTransformer); } public SqlString GetGroupBy() @@ -140,7 +149,7 @@ { return rootCriteria.Projection.ToGroupSqlString(rootCriteria.ProjectionCriteria, this, - new CollectionHelper.EmptyMapClass<string, IFilter>()); + new CollectionHelper.EmptyMapClass<string, IFilter>()); } else { @@ -245,6 +254,7 @@ { ICriteria result; associationPathCriteriaMap.TryGetValue(path, out result); + logger.DebugFormat("getCriteria for path={0} crit={1}", path, result); return result; } @@ -330,33 +340,119 @@ else { // otherwise, recurse - return GetWholeAssociationPath((CriteriaImpl.Subcriteria) parent) + '.' + path; + return GetWholeAssociationPath((CriteriaImpl.Subcriteria)parent) + '.' + path; } } private void CreateCriteriaEntityNameMap() { - criteriaEntityNames[rootCriteria] = rootEntityName; + // initialize the rootProvider first + ICriteriaInfoProvider rootProvider = new EntityCriteriaInfoProvider((IQueryable)sessionFactory.GetEntityPersister(rootEntityName)); + criteriaInfoMap.Add(rootCriteria, rootProvider); + nameCriteriaInfoMap.Add(rootProvider.Name, rootProvider); + foreach (KeyValuePair<string, ICriteria> me in associationPathCriteriaMap) { - criteriaEntityNames[me.Value] = GetPathEntityName(me.Key); + ICriteriaInfoProvider info = GetPathInfo(me.Key); + criteriaInfoMap.Add(me.Value, info); + nameCriteriaInfoMap[info.Name] = info; } } - private string GetPathEntityName(string path) + + private void CreateCriteriaCollectionPersisters() { - IQueryable persister = (IQueryable) sessionFactory.GetEntityPersister(rootEntityName); + foreach (KeyValuePair<string, ICriteria> me in associationPathCriteriaMap) + { + IJoinable joinable = GetPathJoinable(me.Key); + if (joinable != null && joinable.IsCollection) + { + criteriaCollectionPersisters.Add((ICollectionPersister)joinable); + } + } + } + + private IJoinable GetPathJoinable(string path) + { + IJoinable last = (IJoinable)Factory.GetEntityPersister(rootEntityName); + IPropertyMapping lastEntity = (IPropertyMapping)last; + + string componentPath = ""; + StringTokenizer tokens = new StringTokenizer(path, ".", false); + foreach (string token in tokens) + { + componentPath += token; + IType type = lastEntity.ToType(componentPath); + if (type.IsAssociationType) + { + if(type.IsCollectionType) + { + // ignore joinables for composite collections + var collectionType = (CollectionType)type; + var persister = Factory.GetCollectionPersister(collectionType.Role); + if(persister.ElementType.IsEntityType==false) + return null; + } + IAssociationType atype = (IAssociationType)type; + + last = atype.GetAssociatedJoinable(Factory); + lastEntity = (IPropertyMapping)Factory.GetEntityPersister(atype.GetAssociatedEntityName(Factory)); + componentPath = ""; + } + else if (type.IsComponentType) + { + componentPath += '.'; + } + else + { + throw new QueryException("not an association: " + componentPath); + } + } + return last; + } + + private ICriteriaInfoProvider GetPathInfo(string path) + { + StringTokenizer tokens = new StringTokenizer(path, ".", false); string componentPath = string.Empty; + + // start with the 'rootProvider' + ICriteriaInfoProvider provider; + if (nameCriteriaInfoMap.TryGetValue(rootEntityName, out provider) == false) + throw new ArgumentException("Could not find ICriteriaInfoProvider for: " + path); + + foreach (string token in tokens) { componentPath += token; - IType type = persister.ToType(componentPath); + logger.DebugFormat("searching for {0}", componentPath); + IType type = provider.GetType(componentPath); if (type.IsAssociationType) { - IAssociationType atype = (IAssociationType) type; - persister = (IQueryable) sessionFactory.GetEntityPersister(atype.GetAssociatedEntityName(sessionFactory)); + // CollectionTypes are always also AssociationTypes - but there's not always an associated entity... + IAssociationType atype = (IAssociationType)type; + + CollectionType ctype = type.IsCollectionType ? (CollectionType)type : null; + IType elementType = (ctype != null) ? ctype.GetElementType(sessionFactory) : null; + // is the association a collection of components or value-types? (i.e a colloction of valued types?) + if (ctype != null && elementType.IsComponentType) + { + provider = new ComponentCollectionCriteriaInfoProvider(helper.GetCollectionPersister(ctype.Role)); + } + else if (ctype != null && !elementType.IsEntityType) + { + provider = new ScalarCollectionCriteriaInfoProvider(helper, ctype.Role); + } + else + { + provider = new EntityCriteriaInfoProvider((IQueryable)sessionFactory.GetEntityPersister( + atype.GetAssociatedEntityName( + sessionFactory) + )); + } + componentPath = string.Empty; } else if (type.IsComponentType) @@ -368,22 +464,27 @@ throw new QueryException("not an association: " + componentPath); } } - return persister.EntityName; + + logger.DebugFormat("returning entity name={0} for path={1} class={2}", + provider.Name, path, provider.GetType().Name); + return provider; } private void CreateCriteriaSQLAliasMap() { int i = 0; - foreach (KeyValuePair<ICriteria, string> me in criteriaEntityNames) + foreach (KeyValuePair<ICriteria, ICriteriaInfoProvider> me in criteriaInfoMap) { ICriteria crit = me.Key; string alias = crit.Alias; if (alias == null) { - alias = me.Value; // the entity name + alias = me.Value.Name; // the entity name } criteriaSQLAliasMap[crit] = StringHelper.GenerateAlias(alias, i++); + logger.DebugFormat("put criteria={0} alias={1}", + crit, criteriaSQLAliasMap[crit]); } criteriaSQLAliasMap[rootCriteria] = rootSQLAlias; } @@ -395,14 +496,17 @@ public string GetSQLAlias(ICriteria criteria) { - return criteriaSQLAliasMap[criteria]; + String alias = criteriaSQLAliasMap[criteria]; + logger.DebugFormat("returning alias={0} for criteria={1}", alias, criteria); + return alias; } public string GetEntityName(ICriteria criteria) { - string result; - criteriaEntityNames.TryGetValue(criteria, out result); - return result; + ICriteriaInfoProvider result; + if(criteriaInfoMap.TryGetValue(criteria, out result)==false) + throw new ArgumentException("Could not find a matching criteria info provider to: " + criteria); + return result.Name; } public string GetColumn(ICriteria criteria, string propertyName) @@ -442,18 +546,18 @@ public string[] GetIdentifierColumns(ICriteria subcriteria) { - string[] idcols = ((ILoadable) GetPropertyMapping(GetEntityName(subcriteria))).IdentifierColumnNames; + string[] idcols = ((ILoadable)GetPropertyMapping(GetEntityName(subcriteria))).IdentifierColumnNames; return StringHelper.Qualify(GetSQLAlias(subcriteria), idcols); } public IType GetIdentifierType(ICriteria subcriteria) { - return ((ILoadable) GetPropertyMapping(GetEntityName(subcriteria))).IdentifierType; + return ((ILoadable)GetPropertyMapping(GetEntityName(subcriteria))).IdentifierType; } public TypedValue GetTypedIdentifierValue(ICriteria subcriteria, object value) { - ILoadable loadable = (ILoadable) GetPropertyMapping(GetEntityName(subcriteria)); + ILoadable loadable = (ILoadable)GetPropertyMapping(GetEntityName(subcriteria)); return new TypedValue(loadable.IdentifierType, value, EntityMode.Poco); } @@ -518,8 +622,8 @@ // Detect discriminator values... if (value is System.Type) { - System.Type entityClass = (System.Type) value; - IQueryable q = SessionFactoryHelper.FindQueryableUsingImports(sessionFactory, entityClass.FullName); + System.Type entityClass = (System.Type)value; + IQueryable q = helper.FindQueryableUsingImports(entityClass.FullName); if (q != null) { @@ -533,7 +637,10 @@ private IPropertyMapping GetPropertyMapping(string entityName) { - return (IPropertyMapping) sessionFactory.GetEntityPersister(entityName); + ICriteriaInfoProvider info ; + if (nameCriteriaInfoMap.TryGetValue(entityName, out info)==false) + throw new InvalidOperationException("Could not find criteria info provider for: " + entityName); + return info.PropertyMapping; } public string GetEntityName(ICriteria subcriteria, string propertyName) @@ -600,49 +707,7 @@ } } - private void CreateCriteriaCollectionPersisters() - { - foreach (KeyValuePair<string, ICriteria> me in associationPathCriteriaMap) - { - IJoinable joinable = GetPathJoinable(me.Key); - if (joinable.IsCollection) - { - criteriaCollectionPersisters.Add((ICollectionPersister) joinable); - } - } - } - private IJoinable GetPathJoinable(string path) - { - IJoinable last = (IJoinable) Factory.GetEntityPersister(rootEntityName); - IPropertyMapping lastEntity = (IPropertyMapping) last; - - string componentPath = ""; - - StringTokenizer tokens = new StringTokenizer(path, ".", false); - foreach (string token in tokens) - { - componentPath += token; - IType type = lastEntity.ToType(componentPath); - if (type.IsAssociationType) - { - IAssociationType atype = (IAssociationType) type; - last = atype.GetAssociatedJoinable(Factory); - lastEntity = (IPropertyMapping) Factory.GetEntityPersister(atype.GetAssociatedEntityName(Factory)); - componentPath = ""; - } - else if (type.IsComponentType) - { - componentPath += '.'; - } - else - { - throw new QueryException("not an association: " + componentPath); - } - } - return last; - } - public SqlString GetHavingCondition(IDictionary<string, IFilter> enabledFilters) { SqlStringBuilder condition = new SqlStringBuilder(30); Copied: trunk/nhibernate/src/NHibernate/Loader/Criteria/EntityCriteriaInfoProvider.cs (from rev 4715, branches/2.1.x/nhibernate/src/NHibernate/Loader/Criteria/EntityCriteriaInfoProvider.cs) =================================================================== --- trunk/nhibernate/src/NHibernate/Loader/Criteria/EntityCriteriaInfoProvider.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Loader/Criteria/EntityCriteriaInfoProvider.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -0,0 +1,45 @@ +using System; +using NHibernate.Persister.Entity; +using NHibernate.Type; + +namespace NHibernate.Loader.Criteria +{ + public class EntityCriteriaInfoProvider : ICriteriaInfoProvider + { + readonly IQueryable persister; + + public EntityCriteriaInfoProvider(IQueryable persister) + { + this.persister = persister; + } + + public String Name + { + get + { + return persister.EntityName; + } + } + + public string[] Spaces + { + get + { + return persister.QuerySpaces; + } + } + + public IPropertyMapping PropertyMapping + { + get + { + return persister; + } + } + + public IType GetType(String relativePath) + { + return persister.ToType(relativePath); + } + } +} \ No newline at end of file Copied: trunk/nhibernate/src/NHibernate/Loader/Criteria/ICriteriaInfoProvider.cs (from rev 4715, branches/2.1.x/nhibernate/src/NHibernate/Loader/Criteria/ICriteriaInfoProvider.cs) =================================================================== --- trunk/nhibernate/src/NHibernate/Loader/Criteria/ICriteriaInfoProvider.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Loader/Criteria/ICriteriaInfoProvider.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -0,0 +1,14 @@ +using System; +using NHibernate.Persister.Entity; +using NHibernate.Type; + +namespace NHibernate.Loader.Criteria +{ + public interface ICriteriaInfoProvider + { + string Name { get; } + string[] Spaces { get; } + IPropertyMapping PropertyMapping { get; } + IType GetType(String relativePath); + } +} \ No newline at end of file Copied: trunk/nhibernate/src/NHibernate/Loader/Criteria/ScalarCollectionCriteriaInfoProvider.cs (from rev 4715, branches/2.1.x/nhibernate/src/NHibernate/Loader/Criteria/ScalarCollectionCriteriaInfoProvider.cs) =================================================================== --- trunk/nhibernate/src/NHibernate/Loader/Criteria/ScalarCollectionCriteriaInfoProvider.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Loader/Criteria/ScalarCollectionCriteriaInfoProvider.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -0,0 +1,52 @@ +using System; +using NHibernate.Hql.Util; +using NHibernate.Persister.Collection; +using NHibernate.Persister.Entity; +using NHibernate.Type; + +namespace NHibernate.Loader.Criteria +{ + public class ScalarCollectionCriteriaInfoProvider : ICriteriaInfoProvider + { + private readonly String role; + private readonly IQueryableCollection persister; + private readonly SessionFactoryHelper helper; + public ScalarCollectionCriteriaInfoProvider(SessionFactoryHelper helper, String role) + { + this.role = role; + this.helper = helper; + this.persister = helper.RequireQueryableCollection(role); + } + + public String Name + { + get + { + return role; + } + } + + public string[] Spaces + { + get + { + return persister.CollectionSpaces; + } + } + + public IPropertyMapping PropertyMapping + { + get + { + return helper.GetCollectionPropertyMapping(role); + } + } + + public IType GetType(String relativePath) + { + //not sure what things are going to be passed here, how about 'id', maybe 'index' or 'key' or 'elements' ??? + return PropertyMapping.ToType(relativePath); + } + + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Loader/JoinWalker.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Loader/JoinWalker.cs 2009-09-16 10:34:39 UTC (rev 4717) +++ trunk/nhibernate/src/NHibernate/Loader/JoinWalker.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -575,7 +575,9 @@ if (enabledFilters.Count > 0) { var manyToOneFilterFragment = oj.Joinable.FilterFragment(oj.RHSAlias, enabledFilters); - outerjoin.AddCondition(manyToOneFilterFragment); + var joinClauseDoesNotContainsFilterAlready = outerjoin.ToFromFragmentString.IndexOfCaseInsensitive(manyToOneFilterFragment) == -1; + if(joinClauseDoesNotContainsFilterAlready) + outerjoin.AddCondition(manyToOneFilterFragment); } } last = oj; @@ -781,7 +783,6 @@ else { SqlStringBuilder buf = new SqlStringBuilder(associations.Count * 3); - buf.Add(StringHelper.CommaSpace); int entityAliasCount = 0; int collectionAliasCount = 0; @@ -802,16 +803,16 @@ joinable.SelectFragment(next == null ? null : next.Joinable, next == null ? null : next.RHSAlias, join.RHSAlias, entitySuffix, collectionSuffix, join.JoinType == JoinType.LeftOuterJoin); - buf.Add(selectFragment); - + if (selectFragment.Trim().Length > 0) + { + buf.Add(StringHelper.CommaSpace) + .Add(selectFragment); + } if (joinable.ConsumesEntityAlias()) entityAliasCount++; if (joinable.ConsumesCollectionAlias() && join.JoinType == JoinType.LeftOuterJoin) collectionAliasCount++; - - if (i < associations.Count - 1 && selectFragment.Trim().Length > 0) - buf.Add(StringHelper.CommaSpace); } return buf.ToSqlString().ToString(); Modified: trunk/nhibernate/src/NHibernate/Loader/Loader.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Loader/Loader.cs 2009-09-16 10:34:39 UTC (rev 4717) +++ trunk/nhibernate/src/NHibernate/Loader/Loader.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -13,6 +13,7 @@ using NHibernate.Engine; using NHibernate.Event; using NHibernate.Exceptions; +using NHibernate.Hql.Util; using NHibernate.Impl; using NHibernate.Persister.Collection; using NHibernate.Persister.Entity; @@ -48,10 +49,12 @@ private readonly ISessionFactoryImplementor factory; private ColumnNameCache columnNameCache; + protected SessionFactoryHelper helper; public Loader(ISessionFactoryImplementor factory) { this.factory = factory; + helper = new SessionFactoryHelper(factory); } /// <summary> Modified: trunk/nhibernate/src/NHibernate/NHibernate.csproj =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-09-16 10:34:39 UTC (rev 4717) +++ trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-09-16 10:53:14 UTC (rev 4718) @@ -587,6 +587,10 @@ <Compile Include="Linq\ProjectionEvaluator.cs" /> <Compile Include="Linq\QueryModelVisitor.cs" /> <Compile Include="Linq\ResultTransformer.cs" /> + <Compile Include="Loader\Criteria\ComponentCollectionCriteriaInfoProvider.cs" /> + <Compile Include="Loader\Criteria\EntityCriteriaInfoProvider.cs" /> + <Compile Include="Loader\Criteria\ICriteriaInfoProvider.cs" /> + <Compile Include="Loader\Criteria\ScalarCollectionCriteriaInfoProvider.cs" /> <Compile Include="Param\AbstractExplicitParameterSpecification.cs" /> <Compile Include="Param\AggregatedIndexCollectionSelectorParameterSpecifications.cs" /> <Compile Include="Param\CollectionFilterKeyParameterSpecification.cs" /> Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: bugtraq:logregex + NH-\d+ Deleted: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Employee.cs =================================================================== --- branches/2.1.x/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Employee.cs 2009-09-16 01:57:36 UTC (rev 4715) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Employee.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NHibernate.Test.NHSpecificTest.CriteriaQueryOnComponentCollection -{ - public class Employee - { - public virtual int Id { get; set; } - public virtual ICollection<Money> Amounts { get; set; } - public virtual ICollection<ManagedEmployee> ManagedEmployees { get; set; } - } - - public class ManagedEmployee - { - public virtual Employee Employee { get; set; } - public virtual string Position { get; set; } - } -} Copied: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Employee.cs (from rev 4715, branches/2.1.x/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Employee.cs) =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Employee.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Employee.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace NHibernate.Test.NHSpecificTest.CriteriaQueryOnComponentCollection +{ + public class Employee + { + public virtual int Id { get; set; } + public virtual ICollection<Money> Amounts { get; set; } + public virtual ICollection<ManagedEmployee> ManagedEmployees { get; set; } + } + + public class ManagedEmployee + { + public virtual Employee Employee { get; set; } + public virtual string Position { get; set; } + } +} Deleted: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Fixture.cs =================================================================== --- branches/2.1.x/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Fixture.cs 2009-09-16 01:57:36 UTC (rev 4715) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Fixture.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -1,118 +0,0 @@ -using System.Collections; -using Iesi.Collections.Generic; -using NHibernate.Cfg; -using NHibernate.Criterion; -using NHibernate.Transform; -using NUnit.Framework; - -namespace NHibernate.Test.NHSpecificTest.CriteriaQueryOnComponentCollection -{ - [TestFixture] - public class Fixture : TestCase - { - protected override void Configure(Configuration configuration) - { - configuration.SetProperty(Environment.FormatSql, "false"); - } - - protected override void OnSetUp() - { - using (var s = sessions.OpenSession()) - using (s.BeginTransaction()) - { - var parent = new Employee - { - Id = 2, - }; - var emp = new Employee - { - Id = 1, - Amounts = new HashedSet<Money> - { - new Money {Amount = 9, Currency = "USD"}, - new Money {Amount = 3, Currency = "EUR"}, - }, - ManagedEmployees = new HashedSet<ManagedEmployee> - { - new ManagedEmployee - { - Position = "parent", - Employee = parent - } - } - }; - s.Save(parent); - s.Save(emp); - - s.Transaction.Commit(); - } - } - - protected override void OnTearDown() - { - using (var s = sessions.OpenSession()) - using(s.BeginTransaction()) - { - s.Delete("from System.Object"); - - s.Transaction.Commit(); - } - } - - [Test] - public void CanQueryByCriteriaOnSetOfCompositeElement() - { - using(var s = sessions.OpenSession()) - { - var list = s.CreateCriteria<Employee>() - .CreateCriteria("ManagedEmployees") - .Add(Restrictions.Eq("Position", "parent")) - .SetResultTransformer(new RootEntityResultTransformer()) - .List(); - Assert.IsNotEmpty(list); - } - } - - [Test] - public void CanQueryByCriteriaOnSetOfElement() - { - using (var s = sessions.OpenSession()) - { - var list = s.CreateCriteria<Employee>() - .CreateCriteria("Amounts") - .Add(Restrictions.Gt("Amount", 5m)) - .SetResultTransformer(new RootEntityResultTransformer()) - .List(); - Assert.IsNotEmpty(list); - } - } - - [Test] - public void CanQueryByCriteriaOnSetOfCompositeElement_UsingDetachedCriteria() - { - using (var s = sessions.OpenSession()) - { - var list = s.CreateCriteria<Employee>() - .Add(Subqueries.PropertyIn("id", - DetachedCriteria.For<Employee>() - .SetProjection(Projections.Id()) - .CreateCriteria("Amounts") - .Add(Restrictions.Gt("Amount", 5m)))) - .List(); - Assert.IsNotEmpty(list); - } - } - - - protected override IList Mappings - { - get { return new [] { "NHSpecificTest.CriteriaQueryOnComponentCollection.Mappings.hbm.xml" }; } - } - - protected override string MappingsAssembly - { - get { return "NHibernate.Test"; } - } - - } -} Copied: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Fixture.cs (from rev 4715, branches/2.1.x/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Fixture.cs) =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Fixture.cs 2009-09-16 10:53:14 UTC (rev 4718) @@ -0,0 +1,118 @@ +using System.Collections; +using Iesi.Collections.Generic; +using NHibernate.Cfg; +using NHibernate.Criterion; +using NHibernate.Transform; +using NUnit.Framework; + +namespace NHibernate.Test.NHSpecificTest.CriteriaQueryOnComponentCollection +{ + [TestFixture] + public class Fixture : TestCase + { + protected override void Configure(Configuration configuration) + { + configuration.SetProperty(Environment.FormatSql, "false"); + } + + protected override void OnSetUp() + { + using (var s = sessions.OpenSession()) + using (s.BeginTransaction()) + { + var parent = new Employee + { + Id = 2, + }; + var emp = new Employee + { + Id = 1, + Amounts = new HashedSet<Money> + { + new Money {Amount = 9, Currency = "USD"}, + new Money {Amount = 3, Currency = "EUR"}, + }, + ManagedEmployees = new HashedSet<ManagedEmployee> + { + new ManagedEmployee + { + Position = "parent", + Employee = parent + } + } + }; + s.Save(parent); + s.Save(emp); + + s.Transaction.Commit(); + } + } + + protected override void OnTearDown() + { + using (var s = sessions.OpenSession()) + using(s.BeginTransaction()) + { + s.Delete("from System.Object"); + + s.Transaction.Commit(); + } + } + + [Test] + public void CanQueryByCriteriaOnSetOfCompositeElement() + { + using(var s = sessions.OpenSession()) + { + var list = s.CreateCriteria<Employee>() + .CreateCriteria("ManagedEmployees") + .Add(Restrictions.Eq("Position", "parent")) + .SetResultTransformer(new RootEntityResultTransformer()) + .List(); + Assert.IsNotEmpty(list); + } + } + + [Test] + public void CanQueryByCriteriaOnSetOfElement() + { + using (var s = sessions.OpenSession()) + { + var list = s.CreateCriteria<Employee>() + .CreateCriteria("Amounts") + .Add(Restrictions.Gt("Amount", 5m)) + .SetResultTransformer(new RootEntityResultTransformer()) + .List(); + Assert.IsNotEmpty(list); + } + } + + [Test] + public void CanQueryByCriteriaOnSetOfCompositeElement_UsingDetachedCriteria() + { + using (var s = sessions.OpenSession()) + { + var list = s.CreateCriteria<Employee>() + .Add(Subqueries.PropertyIn("id", + DetachedCriteria.For<Employee>() + .SetProjection(Projections.Id()) + .CreateCriteria("Amounts") + .Add(Restrictions.Gt("Amount", 5m)))) + .List(); + Assert.IsNotEmpty(list); + } + } + + + protected override IList Mappings + { + get { return new [] { "NHSpecificTest.CriteriaQueryOnComponentCollection.Mappings.hbm.xml" }; } + } + + protected override string MappingsAssembly + { + get { return "NHibernate.Test"; } + } + + } +} Deleted: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Mappings.hbm.xml =================================================================== --- branches/2.1.x/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Mappings.hbm.xml 2009-09-16 01:57:36 UTC (rev 4715) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Mappings.hbm.xml 2009-09-16 10:53:14 UTC (rev 4718) @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" - namespace="NHibernate.Test.NHSpecificTest.CriteriaQueryOnComponentCollection" - assembly="NHibernate.Test"> - - <class name="Employee" table="Employees" lazy="false"> - <id name="Id" type="Int32"> - <generator class="assigned" /> - </id> - - <set name="Amounts" table="Amounts"> - <key column="EmployeeId"/> - <composite-element class="Money"> - <property name="Amount" type="Decimal" not-null="true"/> - <property name="Currency" type="String" not-null="true"/> - </composite-element> - </set> - - <set name="ManagedEmployees" table="ManagedEmployees"> - <key column="EmployeeId"/> - <composite-element class="ManagedEmployee"> - <property name="Position" type="string" not-null="true"/> - <many-to-one name="Employee" class="Employee"/> - </composite-element> - </set> - - </class> -</hibernate-mapping> Copied: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Mappings.hbm.xml (from rev 4715, branches/2.1.x/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Mappings.hbm.xml) =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/CriteriaQueryOnComponentCollection/Mappings.hbm.xml 2009-09-16 10:53:14 UTC (rev 4718) @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + namespace="NHibernate.Test.NHSpecificTest.CriteriaQueryOnComponentCollection" + assembly="NHibernate.Test"> + + <class name="Employee" table="Employees" lazy="false"> + <id name="Id" type="Int32"> + <generator class="assigned" /> + </id> + + <set name="Amounts" table="Amounts"> + <key column="EmployeeId"/> + <composite-element class="Money"> + <property name="Amount" type="Decimal" not-null="true"/> + <property name="Currency" type="String" not-null="true"/> + </composite-element> + </set> + + <set name="ManagedEmployees" table="ManagedEmployees"> + <key column="EmployeeId"/> + <composite-element class="ManagedEmployee"> + <property name="Position" type="string" not-null="true"/> + <many-to-one name="Employee" class="Employee"/> + </composite-element> + </set> + + </class> +</hibernate-mapping> Deleted: trunk/nhibernat... [truncated message content] |
From: <ste...@us...> - 2009-11-13 15:44:48
|
Revision: 4829 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4829&view=rev Author: steverstrong Date: 2009-11-13 15:44:38 +0000 (Fri, 13 Nov 2009) Log Message: ----------- More Linq test cases added Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs trunk/nhibernate/src/NHibernate/Linq/Functions/FunctionRegistry.cs trunk/nhibernate/src/NHibernate/Linq/Functions/StringGenerator.cs trunk/nhibernate/src/NHibernate/Linq/NhLinqExpression.cs trunk/nhibernate/src/NHibernate/Linq/NhQueryProvider.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Northwind.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/lib/net/3.5/System.Linq.Dynamic.dll trunk/nhibernate/src/NHibernate.Test/Linq/BinaryExpressionOrdererTests.cs trunk/nhibernate/src/NHibernate.Test/Linq/DynamicQueryTests.cs trunk/nhibernate/src/NHibernate.Test/Linq/EnumTests.cs trunk/nhibernate/src/NHibernate.Test/Linq/ExtensionMethods.cs trunk/nhibernate/src/NHibernate.Test/Linq/FunctionTests.cs Added: trunk/nhibernate/lib/net/3.5/System.Linq.Dynamic.dll =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/lib/net/3.5/System.Linq.Dynamic.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs 2009-11-11 13:37:38 UTC (rev 4828) +++ trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs 2009-11-13 15:44:38 UTC (rev 4829) @@ -106,7 +106,9 @@ RegisterFunction("left", new SQLFunctionTemplate(NHibernateUtil.String, "left(?1, ?2)")); RegisterFunction("right", new SQLFunctionTemplate(NHibernateUtil.String, "right(?1, ?2)")); + RegisterFunction("locate", new StandardSQLFunction("charindex", NHibernateUtil.Int32)); + RegisterFunction("current_timestamp", new NoArgSQLFunction("getdate", NHibernateUtil.DateTime, true)); RegisterFunction("second", new SQLFunctionTemplate(NHibernateUtil.Int32, "datepart(second, ?1)")); RegisterFunction("minute", new SQLFunctionTemplate(NHibernateUtil.Int32, "datepart(minute, ?1)")); Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs 2009-11-11 13:37:38 UTC (rev 4828) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs 2009-11-13 15:44:38 UTC (rev 4829) @@ -146,30 +146,28 @@ { return new HqlNull(_factory); } - else + + switch (System.Type.GetTypeCode(value.GetType())) { - switch (System.Type.GetTypeCode(value.GetType())) - { - case TypeCode.Int16: - case TypeCode.Int32: - case TypeCode.Int64: - return new HqlIntegerConstant(_factory, value.ToString()); - case TypeCode.Single: - return new HqlFloatConstant(_factory, value.ToString()); - case TypeCode.Double: - return new HqlDoubleConstant(_factory, value.ToString()); - case TypeCode.Decimal: - return new HqlDecimalConstant(_factory, value.ToString()); - case TypeCode.String: - case TypeCode.Char: - return new HqlStringConstant(_factory, "\'" + value + "\'"); - case TypeCode.DateTime: - return new HqlStringConstant(_factory, "\'" + ((DateTime)value).ToString() + "\'"); - case TypeCode.Boolean: - return new HqlStringConstant(_factory, "\'" + (((bool)value) ? "true" : "false") + "\'"); - default: - throw new NotSupportedException(string.Format("The constant for '{0}' is not supported", value)); - } + case TypeCode.Int16: + case TypeCode.Int32: + case TypeCode.Int64: + return new HqlIntegerConstant(_factory, value.ToString()); + case TypeCode.Single: + return new HqlFloatConstant(_factory, value.ToString()); + case TypeCode.Double: + return new HqlDoubleConstant(_factory, value.ToString()); + case TypeCode.Decimal: + return new HqlDecimalConstant(_factory, value.ToString()); + case TypeCode.String: + case TypeCode.Char: + return new HqlStringConstant(_factory, "\'" + value + "\'"); + case TypeCode.DateTime: + return new HqlStringConstant(_factory, "\'" + (DateTime)value + "\'"); + case TypeCode.Boolean: + return new HqlStringConstant(_factory, "\'" + ((bool)value ? "true" : "false") + "\'"); + default: + throw new NotSupportedException(string.Format("The constant for '{0}' is not supported", value)); } } @@ -348,11 +346,16 @@ return new HqlExpressionList(_factory); } - public HqlMethodCall MethodCall(string methodName, HqlExpression parameter) + public HqlMethodCall MethodCall(string methodName, IEnumerable<HqlExpression> parameters) { - return new HqlMethodCall(_factory, methodName, parameter); + return new HqlMethodCall(_factory, methodName, parameters); } + public HqlMethodCall MethodCall(string methodName, params HqlExpression[] parameters) + { + return new HqlMethodCall(_factory, methodName, parameters); + } + public HqlDistinctHolder DistinctHolder(params HqlTreeNode[] children) { return new HqlDistinctHolder(_factory, children); Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs 2009-11-11 13:37:38 UTC (rev 4828) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs 2009-11-13 15:44:38 UTC (rev 4829) @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using NHibernate.Hql.Ast.ANTLR; using NHibernate.Hql.Ast.ANTLR.Tree; @@ -126,6 +127,11 @@ : base(type, text, factory, children) { } + + protected HqlStatement(int type, string text, IASTFactory factory, IEnumerable<HqlTreeNode> children) + : base(type, text, factory, children) + { + } } public abstract class HqlExpression : HqlTreeNode @@ -407,7 +413,7 @@ public class HqlOrderBy : HqlStatement { public HqlOrderBy(IASTFactory factory) - : base(HqlSqlWalker.ORDER, "", factory) + : base(HqlSqlWalker.ORDER, "order by", factory) { } } @@ -559,9 +565,15 @@ public class HqlExpressionList : HqlStatement { - public HqlExpressionList(IASTFactory factory, params HqlTreeNode[] expression) : base(HqlSqlWalker.EXPR_LIST, "expr_list", factory, expression) + public HqlExpressionList(IASTFactory factory, params HqlExpression[] expressions) + : base(HqlSqlWalker.EXPR_LIST, "expr_list", factory, expressions) { } + + public HqlExpressionList(IASTFactory factory, IEnumerable<HqlExpression> expressions) + : base(HqlSqlWalker.EXPR_LIST, "expr_list", factory, expressions.Cast<HqlTreeNode>()) + { + } } public class HqlNot : HqlBooleanExpression @@ -686,11 +698,11 @@ public class HqlMethodCall : HqlExpression { - public HqlMethodCall(IASTFactory factory, string methodName, HqlExpression parameter) + public HqlMethodCall(IASTFactory factory, string methodName, IEnumerable<HqlExpression> parameters) : base(HqlSqlWalker.METHOD_CALL, "method", factory) { AddChild(new HqlIdent(factory, methodName)); - AddChild(new HqlExpressionList(factory, parameter)); + AddChild(new HqlExpressionList(factory, parameters)); } } Modified: trunk/nhibernate/src/NHibernate/Linq/Functions/FunctionRegistry.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Functions/FunctionRegistry.cs 2009-11-11 13:37:38 UTC (rev 4828) +++ trunk/nhibernate/src/NHibernate/Linq/Functions/FunctionRegistry.cs 2009-11-13 15:44:38 UTC (rev 4829) @@ -1,7 +1,29 @@ using System; using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Linq.Expressions; using System.Reflection; +using NHibernate.Hql.Ast; +using NHibernate.Linq.Visitors; +namespace NHibernate.Linq +{ + public class LinqExtensionMethodAttribute : Attribute + { + public string Name { get; private set; } + + public LinqExtensionMethodAttribute() + { + } + + public LinqExtensionMethodAttribute(string name) + { + Name = name; + } + } +} + namespace NHibernate.Linq.Functions { public class FunctionRegistry @@ -35,6 +57,15 @@ return methodGenerator; } + // No method generator registered. Look to see if it's a standard LinqExtensionMethod + var attr = (LinqExtensionMethodAttribute) method.GetCustomAttributes(typeof (LinqExtensionMethodAttribute), false)[0]; + if (attr != null) + { + // It is + // TODO - cache this? Is it worth it? + return new HqlGeneratorForExtensionMethod(attr, method); + } + throw new NotSupportedException(method.ToString()); } @@ -66,4 +97,36 @@ typeMethodGenerator.Register(this); } } + + public class HqlGeneratorForExtensionMethod : BaseHqlGeneratorForMethod + { + private readonly string _name; + + public HqlGeneratorForExtensionMethod(LinqExtensionMethodAttribute attribute, MethodInfo method) + { + _name = string.IsNullOrEmpty(attribute.Name) ? method.Name : attribute.Name; + } + + public override HqlTreeNode BuildHql(MethodInfo method, Expression targetObject, ReadOnlyCollection<Expression> arguments, HqlTreeBuilder treeBuilder, IHqlExpressionVisitor visitor) + { + var args = visitor.Visit(targetObject) + .Union(arguments.Select(a => visitor.Visit(a))) + .Cast<HqlExpression>(); + + return treeBuilder.MethodCall(_name, args); + } + } + + static class UnionExtension + { + public static IEnumerable<HqlTreeNode> Union(this HqlTreeNode first, IEnumerable<HqlTreeNode> rest) + { + yield return first; + + foreach (var x in rest) + { + yield return x; + } + } + } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Linq/Functions/StringGenerator.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Functions/StringGenerator.cs 2009-11-11 13:37:38 UTC (rev 4828) +++ trunk/nhibernate/src/NHibernate/Linq/Functions/StringGenerator.cs 2009-11-13 15:44:38 UTC (rev 4829) @@ -16,6 +16,9 @@ MethodRegistry.Add(new ContainsGenerator()); MethodRegistry.Add(new EqualsGenerator()); MethodRegistry.Add(new ToUpperLowerGenerator()); + MethodRegistry.Add(new SubStringGenerator()); + MethodRegistry.Add(new IndexOfGenerator()); + MethodRegistry.Add(new ReplaceGenerator()); PropertyRegistry.Add(new LengthGenerator()); } @@ -129,5 +132,78 @@ return treeBuilder.MethodCall(methodName, visitor.Visit(targetObject).AsExpression()); } } + + class SubStringGenerator : BaseHqlGeneratorForMethod + { + public SubStringGenerator() + { + SupportedMethods = new[] + { + ReflectionHelper.GetMethod<string>(s => s.Substring(0)), + ReflectionHelper.GetMethod<string>(s => s.Substring(0, 0)) + }; + } + public override HqlTreeNode BuildHql(MethodInfo method, Expression targetObject, ReadOnlyCollection<Expression> arguments, HqlTreeBuilder treeBuilder, IHqlExpressionVisitor visitor) + { + if (arguments.Count == 1) + { + return treeBuilder.MethodCall("substring", visitor.Visit(targetObject).AsExpression(), + treeBuilder.Constant(0), + visitor.Visit(arguments[0]).AsExpression()); + } + + return treeBuilder.MethodCall("substring", visitor.Visit(targetObject).AsExpression(), + visitor.Visit(arguments[0]).AsExpression(), + visitor.Visit(arguments[1]).AsExpression()); + } + } + + class IndexOfGenerator : BaseHqlGeneratorForMethod + { + public IndexOfGenerator() + { + SupportedMethods = new[] + { + ReflectionHelper.GetMethod<string>(s => s.IndexOf(' ')), + ReflectionHelper.GetMethod<string>(s => s.IndexOf(" ")), + ReflectionHelper.GetMethod<string>(s => s.IndexOf(' ', 0)), + ReflectionHelper.GetMethod<string>(s => s.IndexOf(" ", 0)) + }; + } + public override HqlTreeNode BuildHql(MethodInfo method, Expression targetObject, ReadOnlyCollection<Expression> arguments, HqlTreeBuilder treeBuilder, IHqlExpressionVisitor visitor) + { + if (arguments.Count == 1) + { + return treeBuilder.MethodCall("locate", + visitor.Visit(arguments[0]).AsExpression(), + visitor.Visit(targetObject).AsExpression(), + treeBuilder.Constant(0)); + } + return treeBuilder.MethodCall("locate", + visitor.Visit(arguments[0]).AsExpression(), + visitor.Visit(targetObject).AsExpression(), + visitor.Visit(arguments[1]).AsExpression()); + } + } + + class ReplaceGenerator : BaseHqlGeneratorForMethod + { + public ReplaceGenerator() + { + SupportedMethods = new[] + { + ReflectionHelper.GetMethod<string>(s => s.Replace(' ', ' ')), + ReflectionHelper.GetMethod<string>(s => s.Replace("", "")) + }; + } + + public override HqlTreeNode BuildHql(MethodInfo method, Expression targetObject, ReadOnlyCollection<Expression> arguments, HqlTreeBuilder treeBuilder, IHqlExpressionVisitor visitor) + { + return treeBuilder.MethodCall("replace", + visitor.Visit(targetObject).AsExpression(), + visitor.Visit(arguments[0]).AsExpression(), + visitor.Visit(arguments[1]).AsExpression()); + } + } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Linq/NhLinqExpression.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/NhLinqExpression.cs 2009-11-11 13:37:38 UTC (rev 4828) +++ trunk/nhibernate/src/NHibernate/Linq/NhLinqExpression.cs 2009-11-13 15:44:38 UTC (rev 4829) @@ -39,6 +39,8 @@ { _expression = PartialEvaluatingExpressionTreeVisitor.EvaluateIndependentSubtrees(expression); + _expression = NameUnNamedParameters.Visit(_expression); + _queryParameters = ExpressionParameterVisitor.Visit(_expression); ParameterValuesByName = _queryParameters.Values.ToDictionary(p => p.Name, p => p.Value); @@ -57,9 +59,10 @@ } } - public IASTNode Translate(ISessionFactory sessionFactory) + public IASTNode Translate(ISessionFactory sessionFactory) { var requiredHqlParameters = new List<NamedParameterDescriptor>(); + // TODO - can we cache any of this? var queryModel = new QueryParser(new ExpressionTreeParser(MethodCallRegistry)).GetParsedQuery(_expression); @@ -89,6 +92,39 @@ } } + public class NameUnNamedParameters : NhExpressionTreeVisitor + { + public static Expression Visit(Expression expression) + { + var visitor = new NameUnNamedParameters(); + + return visitor.VisitExpression(expression); + } + + private readonly Dictionary<ParameterExpression, ParameterExpression> _renamedParameters = new Dictionary<ParameterExpression, ParameterExpression>(); + + protected override Expression VisitParameterExpression(ParameterExpression expression) + { + if (string.IsNullOrEmpty(expression.Name)) + { + ParameterExpression renamed; + + if (_renamedParameters.TryGetValue(expression, out renamed)) + { + return renamed; + } + + renamed = Expression.Parameter(expression.Type, Guid.NewGuid().ToString()); + + _renamedParameters.Add(expression, renamed); + + return renamed; + } + + return base.VisitParameterExpression(expression); + } + } + public class AggregateExpressionNode : ResultOperatorExpressionNodeBase { public MethodCallExpressionParseInfo ParseInfo { get; set; } Modified: trunk/nhibernate/src/NHibernate/Linq/NhQueryProvider.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/NhQueryProvider.cs 2009-11-11 13:37:38 UTC (rev 4828) +++ trunk/nhibernate/src/NHibernate/Linq/NhQueryProvider.cs 2009-11-13 15:44:38 UTC (rev 4829) @@ -39,7 +39,9 @@ public IQueryable CreateQuery(Expression expression) { - throw new NotImplementedException(); + var m = ReflectionHelper.GetMethod((NhQueryProvider p) => p.CreateQuery<object>(null)).MakeGenericMethod(expression.Type.GetGenericArguments()[0]); + + return (IQueryable) m.Invoke(this, new[] {expression}); } public IQueryable<T> CreateQuery<T>(Expression expression) Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs 2009-11-11 13:37:38 UTC (rev 4828) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs 2009-11-13 15:44:38 UTC (rev 4829) @@ -264,9 +264,11 @@ { case ExpressionType.Not: return _hqlTreeBuilder.Not(VisitExpression(expression.Operand).AsBooleanExpression()); + case ExpressionType.Convert: + return VisitExpression(expression.Operand); } - - throw new InvalidOperationException(); + + throw new NotSupportedException(expression.ToString()); } protected HqlTreeNode VisitMemberExpression(MemberExpression expression) @@ -313,7 +315,7 @@ _hqlTreeBuilder.Constant(1)); } - return _hqlTreeBuilder.Cast(_hqlTreeBuilder.Parameter(namedParameter.Name).AsExpression(), namedParameter.Value.GetType()); + return _hqlTreeBuilder.Parameter(namedParameter.Name).AsExpression(); } return _hqlTreeBuilder.Constant(expression.Value); @@ -346,7 +348,7 @@ ifFalse = VisitExpression(expression.IfFalse).AsExpression(); } - return _hqlTreeBuilder.Case(new []{when}, ifFalse); + return _hqlTreeBuilder.Cast(_hqlTreeBuilder.Case(new []{when}, ifFalse), expression.Type); } protected HqlTreeNode VisitSubQueryExpression(SubQueryExpression expression) Modified: trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs 2009-11-11 13:37:38 UTC (rev 4828) +++ trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs 2009-11-13 15:44:38 UTC (rev 4829) @@ -18,7 +18,7 @@ static HQLFunctions() { notSupportedStandardFunction.Add("locate", - new[] { typeof(MsSql2000Dialect), typeof(MsSql2005Dialect), typeof(MsSql2008Dialect) ,typeof(FirebirdDialect), typeof(PostgreSQLDialect) }); + new[] { typeof(FirebirdDialect), typeof(PostgreSQLDialect) }); notSupportedStandardFunction.Add("bit_length", new[] { typeof(MsSql2000Dialect), typeof(MsSql2005Dialect), typeof(MsSql2008Dialect), typeof(Oracle8iDialect), typeof(Oracle9iDialect), typeof(Oracle10gDialect) }); notSupportedStandardFunction.Add("extract", Added: trunk/nhibernate/src/NHibernate.Test/Linq/BinaryExpressionOrdererTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/BinaryExpressionOrdererTests.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/Linq/BinaryExpressionOrdererTests.cs 2009-11-13 15:44:38 UTC (rev 4829) @@ -0,0 +1,90 @@ +using System.Linq; +using NUnit.Framework; + +namespace NHibernate.Test.Linq +{ + [TestFixture] + public class BinaryExpressionOrdererTests : LinqTestCase + { + [Test] + public void ValuePropertySwapsToPropertyValue() + { + var query = (from user in db.Users + where ("ayende" == user.Name) + select user).ToList(); + Assert.AreEqual(1, query.Count); + } + + [Test] + public void PropertyValueDoesntSwaps() + { + var query = (from user in db.Users + where (user.Name == "ayende") + select user).ToList(); + Assert.AreEqual(1, query.Count); + } + + [Test] + public void PropertyPropertyDoesntSwap() + { + var query = (from user in db.Users + where (user.Name == user.Name) + select user).ToList(); + Assert.AreEqual(3, query.Count); + } + + [Test] + public void EqualsSwapsToEquals() + { + var query = (from user in db.Users + where ("ayende" == user.Name) + select user).ToList(); + Assert.AreEqual(1, query.Count); + } + + [Test] + public void NotEqualsSwapsToNotEquals() + { + var query = (from user in db.Users + where ("ayende" != user.Name) + select user).ToList(); + Assert.AreEqual(2, query.Count); + } + + [Test] + public void GreaterThanSwapsToLessThan() + { + var query = (from user in db.Users + where (3 > user.Id) + select user).ToList(); + Assert.AreEqual(2, query.Count); + } + + [Test] + public void GreaterThanOrEqualToSwapsToLessThanOrEqualTo() + { + var query = (from user in db.Users + where (2 >= user.Id) + select user).ToList(); + Assert.AreEqual(2, query.Count); + } + + [Test] + public void LessThanSwapsToGreaterThan() + { + var query = (from user in db.Users + where (1 < user.Id) + select user).ToList(); + Assert.AreEqual(2, query.Count); + } + + [Test] + public void LessThanOrEqualToSwapsToGreaterThanOrEqualTo() + { + var query = (from user in db.Users + where (2 <= user.Id) + select user).ToList(); + Assert.AreEqual(2, query.Count); + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/Linq/DynamicQueryTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/DynamicQueryTests.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/Linq/DynamicQueryTests.cs 2009-11-13 15:44:38 UTC (rev 4829) @@ -0,0 +1,32 @@ +using System; +using System.Linq; +using System.Linq.Dynamic; +using NHibernate.Test.Linq.Entities; +using NUnit.Framework; + +namespace NHibernate.Test.Linq +{ + [TestFixture] + public class DynamicQueryTests : LinqTestCase + { + [Test] + public void CanQueryWithDynamicOrderBy() + { + var query = from user in db.Users + select user; + + //dynamic orderby clause + query = query.OrderBy("RegisteredAt"); + + var list = query.ToList(); + + //assert list was returned in order + DateTime previousDate = DateTime.MinValue; + list.Each(delegate(User user) + { + Assert.IsTrue(previousDate <= user.RegisteredAt); + previousDate = user.RegisteredAt; + }); + } + } +} Modified: trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Northwind.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Northwind.cs 2009-11-11 13:37:38 UTC (rev 4828) +++ trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Northwind.cs 2009-11-13 15:44:38 UTC (rev 4829) @@ -56,5 +56,10 @@ { get { return _session.Query<Mammal>(); } } + + public IQueryable<User> Users + { + get { return _session.Query<User>(); } + } } } \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/Linq/EnumTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/EnumTests.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/Linq/EnumTests.cs 2009-11-13 15:44:38 UTC (rev 4829) @@ -0,0 +1,55 @@ +using System.Linq; +using NHibernate.Test.Linq.Entities; +using NUnit.Framework; + +namespace NHibernate.Test.Linq +{ + [TestFixture] + public class EnumTests : LinqTestCase + { + [Test] + public void CanQueryOnEnumStoredAsInt32_High_1() + { + CanQueryOnEnumStoredAsInt32(EnumStoredAsInt32.High, 1); + } + + [Test] + public void CanQueryOnEnumStoredAsInt32_Unspecified_2() + { + CanQueryOnEnumStoredAsInt32(EnumStoredAsInt32.Unspecified, 2); + } + + + public void CanQueryOnEnumStoredAsInt32(EnumStoredAsInt32 type, int expectedCount) + { + var query = (from user in db.Users + where user.Enum2 == type + select user).ToList(); + + Assert.AreEqual(expectedCount, query.Count); + } + + [Test] + public void CanQueryOnEnumStoredAsString_Meduim_2() + { + CanQueryOnEnumStoredAsString(EnumStoredAsString.Medium, 2); + + } + + [Test] + public void CanQueryOnEnumStoredAsString_Small_1() + { + CanQueryOnEnumStoredAsString(EnumStoredAsString.Small, 1); + + } + + public void CanQueryOnEnumStoredAsString(EnumStoredAsString type, int expectedCount) + { + var query = (from user in db.Users + where user.Enum1 == type + select user).ToList(); + + Assert.AreEqual(expectedCount, query.Count); + } + } +} Added: trunk/nhibernate/src/NHibernate.Test/Linq/ExtensionMethods.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/ExtensionMethods.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/Linq/ExtensionMethods.cs 2009-11-13 15:44:38 UTC (rev 4829) @@ -0,0 +1,19 @@ +using NHibernate.Linq; + +namespace NHibernate.Test.Linq +{ + static class ExtensionMethods + { + [LinqExtensionMethod("Replace")] + public static string ReplaceExtension(this string subject, string search, string replaceWith) + { + return null; + } + + [LinqExtensionMethod] + public static string Replace(this string subject, string search, string replaceWith) + { + return null; + } + } +} Added: trunk/nhibernate/src/NHibernate.Test/Linq/FunctionTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/FunctionTests.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/Linq/FunctionTests.cs 2009-11-13 15:44:38 UTC (rev 4829) @@ -0,0 +1,85 @@ +using System.Linq; +using NUnit.Framework; + +namespace NHibernate.Test.Linq +{ + [TestFixture] + public class FunctionTests : LinqTestCase + { + [Test] + public void SubstringFunction() + { + var query = from e in db.Employees + where e.FirstName.Substring(1, 2) == "An" + select e; + + ObjectDumper.Write(query); + } + + [Test] + public void LeftFunction() + { + var query = from e in db.Employees + where e.FirstName.Substring(1, 2) == "An" + select e.FirstName.Substring(3); + + ObjectDumper.Write(query); + } + + [Test] + public void ReplaceFunction() + { + var query = from e in db.Employees + where e.FirstName.StartsWith("An") + select new + { + Before = e.FirstName, + AfterMethod = e.FirstName.Replace("An", "Zan"), + AfterExtension = ExtensionMethods.Replace(e.FirstName, "An", "Zan"), + AfterExtension2 = e.FirstName.ReplaceExtension("An", "Zan") + }; + + string s = ObjectDumper.Write(query); + } + + [Test] + public void CharIndexFunction() + { + var query = from e in db.Employees + where e.FirstName.IndexOf('A') == 1 + select e.FirstName; + + ObjectDumper.Write(query); + } + + [Test] + public void IndexOfFunctionExpression() + { + var query = from e in db.Employees + where e.FirstName.IndexOf("An") == 1 + select e.FirstName; + + ObjectDumper.Write(query); + } + + [Test] + public void IndexOfFunctionProjection() + { + var query = from e in db.Employees + where e.FirstName.Contains("a") + select e.FirstName.IndexOf('A', 3); + + ObjectDumper.Write(query); + } + + [Test] + public void TwoFunctionExpression() + { + var query = from e in db.Employees + where e.FirstName.IndexOf("A") == e.BirthDate.Value.Month + select e.FirstName; + + ObjectDumper.Write(query); + } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-11-11 13:37:38 UTC (rev 4828) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-11-13 15:44:38 UTC (rev 4829) @@ -73,6 +73,10 @@ </Reference> <Reference Include="System.Data" /> <Reference Include="System.Data.OracleClient" /> + <Reference Include="System.Linq.Dynamic, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\lib\net\3.5\System.Linq.Dynamic.dll</HintPath> + </Reference> <Reference Include="System.Transactions" /> <Reference Include="System.Xml" /> </ItemGroup> @@ -377,6 +381,8 @@ <Compile Include="LazyProperty\LazyPropertyFixture.cs" /> <Compile Include="Linq\AggregateTests.cs" /> <Compile Include="Linq\BinaryBooleanExpressionTests.cs" /> + <Compile Include="Linq\BinaryExpressionOrdererTests.cs" /> + <Compile Include="Linq\DynamicQueryTests.cs" /> <Compile Include="Linq\Entities\Address.cs" /> <Compile Include="Linq\Entities\Animal.cs" /> <Compile Include="Linq\Entities\AnotherEntity.cs" /> @@ -396,6 +402,9 @@ <Compile Include="Linq\Entities\Timesheet.cs" /> <Compile Include="Linq\Entities\User.cs" /> <Compile Include="Linq\Entities\UserComponent.cs" /> + <Compile Include="Linq\EnumTests.cs" /> + <Compile Include="Linq\ExtensionMethods.cs" /> + <Compile Include="Linq\FunctionTests.cs" /> <Compile Include="Linq\LinqQuerySamples.cs" /> <Compile Include="Linq\LinqTestCase.cs" /> <Compile Include="Linq\MiscellaneousTextFixture.cs" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2009-11-25 20:17:08
|
Revision: 4858 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4858&view=rev Author: steverstrong Date: 2009-11-25 20:16:50 +0000 (Wed, 25 Nov 2009) Log Message: ----------- Added additional Linq tests and upgraded to latest re-linq trunk Modified Paths: -------------- trunk/nhibernate/lib/net/3.5/Remotion.Data.Linq.dll trunk/nhibernate/lib/net/3.5/Remotion.Interfaces.dll trunk/nhibernate/lib/net/3.5/Remotion.dll trunk/nhibernate/src/NHibernate/IQueryExpression.cs trunk/nhibernate/src/NHibernate/Impl/AbstractSessionImpl.cs trunk/nhibernate/src/NHibernate/Impl/QueryImpl.cs trunk/nhibernate/src/NHibernate/Linq/NhLinqExpression.cs trunk/nhibernate/src/NHibernate/Linq/NhQueryProvider.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ExpressionKeyVisitor.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/QueryModelVisitor.cs trunk/nhibernate/src/NHibernate/NHibernate.csproj trunk/nhibernate/src/NHibernate.Test/Linq/MethodCallTests.cs trunk/nhibernate/src/NHibernate.Test/Linq/MiscellaneousTextFixture.cs trunk/nhibernate/src/NHibernate.Test/Linq/ParameterisedQueries.cs Added Paths: ----------- trunk/nhibernate/src/NHibernate/Impl/ExpressionQueryImpl.cs trunk/nhibernate/src/NHibernate/Linq/ExpressionToHqlTranslationResults.cs trunk/nhibernate/src/NHibernate/Linq/ReWriters/RemoveUnnecessaryBodyOperators.cs Modified: trunk/nhibernate/lib/net/3.5/Remotion.Data.Linq.dll =================================================================== (Binary files differ) Modified: trunk/nhibernate/lib/net/3.5/Remotion.Interfaces.dll =================================================================== (Binary files differ) Modified: trunk/nhibernate/lib/net/3.5/Remotion.dll =================================================================== (Binary files differ) Modified: trunk/nhibernate/src/NHibernate/IQueryExpression.cs =================================================================== --- trunk/nhibernate/src/NHibernate/IQueryExpression.cs 2009-11-25 18:36:07 UTC (rev 4857) +++ trunk/nhibernate/src/NHibernate/IQueryExpression.cs 2009-11-25 20:16:50 UTC (rev 4858) @@ -11,6 +11,5 @@ string Key { get; } System.Type Type { get; } IList<NamedParameterDescriptor> ParameterDescriptors { get; } - void SetQueryPropertiesPriorToExecute(IQuery impl); } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Impl/AbstractSessionImpl.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/AbstractSessionImpl.cs 2009-11-25 18:36:07 UTC (rev 4857) +++ trunk/nhibernate/src/NHibernate/Impl/AbstractSessionImpl.cs 2009-11-25 20:16:50 UTC (rev 4858) @@ -258,8 +258,8 @@ using (new SessionIdLoggingContext(SessionId)) { CheckAndUpdateSessionStatus(); - HQLQueryPlan queryPlan = GetHQLQueryPlan(queryExpression, false); - QueryImpl query = new QueryImpl(queryPlan.QueryExpression, + var queryPlan = GetHQLQueryPlan(queryExpression, false); + var query = new ExpressionQueryImpl(queryPlan.QueryExpression, this, queryPlan.ParameterMetadata ); Added: trunk/nhibernate/src/NHibernate/Impl/ExpressionQueryImpl.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/ExpressionQueryImpl.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Impl/ExpressionQueryImpl.cs 2009-11-25 20:16:50 UTC (rev 4858) @@ -0,0 +1,72 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using NHibernate.Engine; +using NHibernate.Engine.Query; + +namespace NHibernate.Impl +{ + class ExpressionQueryImpl : AbstractQueryImpl + { + private readonly Dictionary<string, LockMode> _lockModes = new Dictionary<string, LockMode>(2); + + public IQueryExpression QueryExpression { get; private set; } + + public ExpressionQueryImpl(IQueryExpression queryExpression, ISessionImplementor session, ParameterMetadata parameterMetadata) + : base(queryExpression.Key, FlushMode.Unspecified, session, parameterMetadata) + { + QueryExpression = queryExpression; + } + + public override IQuery SetLockMode(string alias, LockMode lockMode) + { + _lockModes[alias] = lockMode; + return this; + } + + protected internal override IDictionary<string, LockMode> LockModes + { + get { return _lockModes; } + } + + public override int ExecuteUpdate() + { + throw new NotImplementedException(); + } + + public override IEnumerable Enumerable() + { + throw new NotImplementedException(); + } + + public override IEnumerable<T> Enumerable<T>() + { + throw new NotImplementedException(); + } + + public override IList List() + { + VerifyParameters(); + IDictionary<string, TypedValue> namedParams = NamedParams; + Before(); + try + { + return Session.List(QueryExpression, GetQueryParameters(namedParams)); + } + finally + { + After(); + } + } + + public override void List(IList results) + { + throw new NotImplementedException(); + } + + public override IList<T> List<T>() + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Impl/QueryImpl.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/QueryImpl.cs 2009-11-25 18:36:07 UTC (rev 4857) +++ trunk/nhibernate/src/NHibernate/Impl/QueryImpl.cs 2009-11-25 20:16:50 UTC (rev 4858) @@ -13,7 +13,6 @@ public class QueryImpl : AbstractQueryImpl { private readonly Dictionary<string, LockMode> lockModes = new Dictionary<string, LockMode>(2); - private readonly IQueryExpression _queryExpression; public QueryImpl(string queryString, FlushMode flushMode, ISessionImplementor session, ParameterMetadata parameterMetadata) : base(queryString, flushMode, session, parameterMetadata) @@ -25,12 +24,6 @@ { } - public QueryImpl(IQueryExpression queryExpression, ISessionImplementor session, ParameterMetadata parameterMetadata) - : base(queryExpression.Key, FlushMode.Unspecified, session, parameterMetadata) - { - _queryExpression = queryExpression; - } - public override IEnumerable Enumerable() { VerifyParameters(); @@ -68,15 +61,7 @@ Before(); try { - if (_queryExpression == null) - { - return Session.List(ExpandParameterLists(namedParams), GetQueryParameters(namedParams)); - } - else - { - _queryExpression.SetQueryPropertiesPriorToExecute(this); - return Session.List(_queryExpression, GetQueryParameters(namedParams)); - } + return Session.List(ExpandParameterLists(namedParams), GetQueryParameters(namedParams)); } finally { Added: trunk/nhibernate/src/NHibernate/Linq/ExpressionToHqlTranslationResults.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/ExpressionToHqlTranslationResults.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Linq/ExpressionToHqlTranslationResults.cs 2009-11-25 20:16:50 UTC (rev 4858) @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using NHibernate.Hql.Ast; + +namespace NHibernate.Linq +{ + public class ExpressionToHqlTranslationResults + { + public HqlQuery Statement { get; private set; } + public ResultTransformer ResultTransformer { get; private set; } + public List<Action<IQuery, IDictionary<string, object>>> AdditionalCriteria { get; private set; } + + public ExpressionToHqlTranslationResults(HqlQuery statement, IList<LambdaExpression> itemTransformers, IList<LambdaExpression> listTransformers, List<Action<IQuery, IDictionary<string, object>>> additionalCriteria) + { + Statement = statement; + + var itemTransformer = MergeLambdas(itemTransformers); + var listTransformer = MergeLambdas(listTransformers); + + if (itemTransformer != null || listTransformer != null) + { + ResultTransformer = new ResultTransformer(itemTransformer, listTransformer); + } + + AdditionalCriteria = additionalCriteria; + } + + private static LambdaExpression MergeLambdas(IList<LambdaExpression> transformations) + { + if (transformations == null || transformations.Count == 0) + { + return null; + } + + var listTransformLambda = transformations[0]; + + for (int i = 1; i < transformations.Count; i++) + { + var invoked = Expression.Invoke(transformations[i], listTransformLambda.Body); + + listTransformLambda = Expression.Lambda(invoked, listTransformLambda.Parameters.ToArray()); + } + + return listTransformLambda; + } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Linq/NhLinqExpression.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/NhLinqExpression.cs 2009-11-25 18:36:07 UTC (rev 4857) +++ trunk/nhibernate/src/NHibernate/Linq/NhLinqExpression.cs 2009-11-25 20:16:50 UTC (rev 4858) @@ -6,6 +6,7 @@ using NHibernate.Hql.Ast.ANTLR.Tree; using NHibernate.Linq.ResultOperators; using NHibernate.Linq.Visitors; +using Remotion.Data.Linq; using Remotion.Data.Linq.Clauses; using Remotion.Data.Linq.Clauses.StreamedData; using Remotion.Data.Linq.Parsing.ExpressionTreeVisitors; @@ -16,24 +17,20 @@ { public class NhLinqExpression : IQueryExpression { - private static readonly MethodCallExpressionNodeTypeRegistry MethodCallRegistry = - MethodCallExpressionNodeTypeRegistry.CreateDefault(); + public string Key { get; private set; } - static NhLinqExpression() - { - MethodCallRegistry.Register( - new[] - { - MethodCallExpressionNodeTypeRegistry.GetRegisterableMethodDefinition(ReflectionHelper.GetMethod(() => Queryable.Aggregate<object>(null, null))), - MethodCallExpressionNodeTypeRegistry.GetRegisterableMethodDefinition(ReflectionHelper.GetMethod(() => Queryable.Aggregate<object, object>(null, null, null))) - }, - typeof (AggregateExpressionNode)); - } + public System.Type Type { get; private set; } + public IList<NamedParameterDescriptor> ParameterDescriptors { get; private set; } + public NhLinqExpressionReturnType ReturnType { get; private set; } + + public IDictionary<string, object> ParameterValuesByName { get; private set; } + + public ExpressionToHqlTranslationResults ExpressionToHqlTranslationResults { get; private set; } + private readonly Expression _expression; - private CommandData _commandData; - private readonly IDictionary<ConstantExpression, NamedParameter> _queryParameters; + private readonly IDictionary<ConstantExpression, NamedParameter> _constantToParameterMap; public NhLinqExpression(Expression expression) { @@ -41,13 +38,13 @@ _expression = NameUnNamedParameters.Visit(_expression); - _queryParameters = ExpressionParameterVisitor.Visit(_expression); - ParameterValuesByName = _queryParameters.Values.ToDictionary(p => p.Name, p => p.Value); + _constantToParameterMap = ExpressionParameterVisitor.Visit(_expression); - Key = ExpressionKeyVisitor.Visit(_expression, _queryParameters); - Type = _expression.Type; + ParameterValuesByName = _constantToParameterMap.Values.ToDictionary(p => p.Name, p => p.Value); - ParameterValues = _queryParameters.Values; + Key = ExpressionKeyVisitor.Visit(_expression, _constantToParameterMap); + + Type = _expression.Type; // Note - re-linq handles return types via the GetOutputDataInfo method, and allows for SingleOrDefault here for the ChoiceResultOperator... ReturnType = NhLinqExpressionReturnType.Scalar; @@ -64,34 +61,38 @@ var requiredHqlParameters = new List<NamedParameterDescriptor>(); // TODO - can we cache any of this? - var queryModel = new QueryParser(new ExpressionTreeParser(MethodCallRegistry)).GetParsedQuery(_expression); + var queryModel = NhRelinqQueryParser.Parse(_expression); - _commandData = QueryModelVisitor.GenerateHqlQuery(queryModel, _queryParameters, requiredHqlParameters); + ExpressionToHqlTranslationResults = QueryModelVisitor.GenerateHqlQuery(queryModel, _constantToParameterMap, requiredHqlParameters); ParameterDescriptors = requiredHqlParameters.AsReadOnly(); - return _commandData.Statement.AstNode; + return ExpressionToHqlTranslationResults.Statement.AstNode; } + } - public string Key { get; private set; } + public static class NhRelinqQueryParser + { + public static readonly MethodCallExpressionNodeTypeRegistry MethodCallRegistry = + MethodCallExpressionNodeTypeRegistry.CreateDefault(); - public IList<NamedParameterDescriptor> ParameterDescriptors { get; private set; } + static NhRelinqQueryParser() + { + MethodCallRegistry.Register( + new[] + { + MethodCallExpressionNodeTypeRegistry.GetRegisterableMethodDefinition(ReflectionHelper.GetMethod(() => Queryable.Aggregate<object>(null, null))), + MethodCallExpressionNodeTypeRegistry.GetRegisterableMethodDefinition(ReflectionHelper.GetMethod(() => Queryable.Aggregate<object, object>(null, null, null))) + }, + typeof (AggregateExpressionNode)); + } - public ICollection<NamedParameter> ParameterValues { get; private set; } + public static QueryModel Parse(Expression expression) + { + return new QueryParser(new ExpressionTreeParser(MethodCallRegistry)).GetParsedQuery(expression); + } + } - public NhLinqExpressionReturnType ReturnType { get; private set; } - - public System.Type Type { get; private set; } - - public IDictionary<string, object> ParameterValuesByName { get; private set; } - - public void SetQueryPropertiesPriorToExecute(IQuery impl) - { - _commandData.SetResultTransformer(impl); - _commandData.AddAdditionalCriteria(impl); - } - } - public class NameUnNamedParameters : NhExpressionTreeVisitor { public static Expression Visit(Expression expression) Modified: trunk/nhibernate/src/NHibernate/Linq/NhQueryProvider.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/NhQueryProvider.cs 2009-11-25 18:36:07 UTC (rev 4857) +++ trunk/nhibernate/src/NHibernate/Linq/NhQueryProvider.cs 2009-11-25 20:16:50 UTC (rev 4858) @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; +using NHibernate.Impl; namespace NHibernate.Linq { @@ -21,6 +22,7 @@ var query = _session.CreateQuery(nhLinqExpression); SetParameters(query, nhLinqExpression.ParameterValuesByName); + SetResultTransformerAndAdditionalCriteria(query, nhLinqExpression.ParameterValuesByName); var results = query.List(); @@ -56,5 +58,19 @@ query.SetParameter(parameterName, parameters[parameterName]); } } + + public void SetResultTransformerAndAdditionalCriteria(IQuery query, IDictionary<string, object> parameters) + { + var queryImpl = (ExpressionQueryImpl) query; + + var nhExpression = (NhLinqExpression) queryImpl.QueryExpression; + + query.SetResultTransformer(nhExpression.ExpressionToHqlTranslationResults.ResultTransformer); + + foreach (var criteria in nhExpression.ExpressionToHqlTranslationResults.AdditionalCriteria) + { + criteria(query, parameters); + } + } } } \ No newline at end of file Added: trunk/nhibernate/src/NHibernate/Linq/ReWriters/RemoveUnnecessaryBodyOperators.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/ReWriters/RemoveUnnecessaryBodyOperators.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Linq/ReWriters/RemoveUnnecessaryBodyOperators.cs 2009-11-25 20:16:50 UTC (rev 4858) @@ -0,0 +1,36 @@ +using System; +using System.Linq; +using Remotion.Data.Linq; +using Remotion.Data.Linq.Clauses; +using Remotion.Data.Linq.Clauses.ResultOperators; + +namespace NHibernate.Linq.ReWriters +{ + public class RemoveUnnecessaryBodyOperators : QueryModelVisitorBase + { + private RemoveUnnecessaryBodyOperators() + { + } + + public static void ReWrite(QueryModel queryModel) + { + var rewriter = new RemoveUnnecessaryBodyOperators(); + + rewriter.VisitQueryModel(queryModel); + } + + public override void VisitResultOperator(ResultOperatorBase resultOperator, QueryModel queryModel, int index) + { + if (resultOperator is CountResultOperator) + { + // For count operators, we can remove any order-by result operators + foreach (var orderby in queryModel.BodyClauses.Where(bc => bc is OrderByClause).ToList()) + { + queryModel.BodyClauses.Remove(orderby); + } + } + + base.VisitResultOperator(resultOperator, queryModel, index); + } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/ExpressionKeyVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/ExpressionKeyVisitor.cs 2009-11-25 18:36:07 UTC (rev 4857) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/ExpressionKeyVisitor.cs 2009-11-25 20:16:50 UTC (rev 4858) @@ -15,12 +15,12 @@ /// </summary> public class ExpressionKeyVisitor : ExpressionTreeVisitor { - private readonly IDictionary<ConstantExpression, NamedParameter> _parameters; + private readonly IDictionary<ConstantExpression, NamedParameter> _constantToParameterMap; readonly StringBuilder _string = new StringBuilder(); - private ExpressionKeyVisitor(IDictionary<ConstantExpression, NamedParameter> parameters) + private ExpressionKeyVisitor(IDictionary<ConstantExpression, NamedParameter> constantToParameterMap) { - _parameters = parameters; + _constantToParameterMap = constantToParameterMap; } public static string Visit(Expression expression, IDictionary<ConstantExpression, NamedParameter> parameters) @@ -76,7 +76,7 @@ { NamedParameter param; - if (_parameters.TryGetValue(expression, out param)) + if (_constantToParameterMap.TryGetValue(expression, out param)) { _string.Append(param.Name); } Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs 2009-11-25 18:36:07 UTC (rev 4857) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs 2009-11-25 20:16:50 UTC (rev 4858) @@ -353,7 +353,7 @@ protected HqlTreeNode VisitSubQueryExpression(SubQueryExpression expression) { - CommandData query = QueryModelVisitor.GenerateHqlQuery(expression.QueryModel, _parameters, _requiredHqlParameters); + ExpressionToHqlTranslationResults query = QueryModelVisitor.GenerateHqlQuery(expression.QueryModel, _parameters, _requiredHqlParameters); return query.Statement; } Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/QueryModelVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/QueryModelVisitor.cs 2009-11-25 18:36:07 UTC (rev 4857) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/QueryModelVisitor.cs 2009-11-25 20:16:50 UTC (rev 4858) @@ -18,8 +18,11 @@ { public class QueryModelVisitor : QueryModelVisitorBase { - public static CommandData GenerateHqlQuery(QueryModel queryModel, IDictionary<ConstantExpression, NamedParameter> parameters, IList<NamedParameterDescriptor> requiredHqlParameters) + public static ExpressionToHqlTranslationResults GenerateHqlQuery(QueryModel queryModel, IDictionary<ConstantExpression, NamedParameter> parameters, IList<NamedParameterDescriptor> requiredHqlParameters) { + // Remove unnecessary body operators + RemoveUnnecessaryBodyOperators.ReWrite(queryModel); + // Merge aggregating result operators (distinct, count, sum etc) into the select clause MergeAggregatingResultsRewriter.ReWrite(queryModel); @@ -41,12 +44,12 @@ var visitor = new QueryModelVisitor(parameters, requiredHqlParameters); visitor.VisitQueryModel(queryModel); - return visitor.GetHqlCommand(); + return visitor.GetTranslation(); } private readonly HqlTreeBuilder _hqlTreeBuilder; - private readonly List<Action<IQuery>> _additionalCriteria = new List<Action<IQuery>>(); + private readonly List<Action<IQuery, IDictionary<string, object>>> _additionalCriteria = new List<Action<IQuery, IDictionary<string, object>>>(); private readonly List<LambdaExpression> _listTransformers = new List<LambdaExpression>(); private readonly List<LambdaExpression> _itemTransformers = new List<LambdaExpression>(); @@ -66,7 +69,8 @@ _requiredHqlParameters = requiredHqlParameters; _hqlTreeBuilder = new HqlTreeBuilder(); } - public CommandData GetHqlCommand() + + public ExpressionToHqlTranslationResults GetTranslation() { HqlSelectFrom selectFrom = _hqlTreeBuilder.SelectFrom(); @@ -104,10 +108,10 @@ query.AddChild(_orderByClause); } - return new CommandData(query, - _itemTransformers, - _listTransformers, - _additionalCriteria); + return new ExpressionToHqlTranslationResults(query, + _itemTransformers, + _listTransformers, + _additionalCriteria); } private HqlBooleanExpression MergeWhereClauses() @@ -297,14 +301,34 @@ private void ProcessTakeOperator(TakeResultOperator resultOperator) { - _additionalCriteria.Add(q => q.SetMaxResults(resultOperator.GetConstantCount())); + NamedParameter parameterName; + + // TODO - very similar to ProcessSkip, plus want to investigate the scenario in the "else" + // clause to see if it is valid + if (_parameters.TryGetValue(resultOperator.Count as ConstantExpression, out parameterName)) + { + _additionalCriteria.Add((q, p) => q.SetMaxResults((int) p[parameterName.Name])); + } + else + { + _additionalCriteria.Add((q, p) => q.SetMaxResults(resultOperator.GetConstantCount())); + } } private void ProcessSkipOperator(SkipResultOperator resultOperator) { - _additionalCriteria.Add(q => q.SetFirstResult(resultOperator.GetConstantCount())); - } + NamedParameter parameterName; + if (_parameters.TryGetValue(resultOperator.Count as ConstantExpression, out parameterName)) + { + _additionalCriteria.Add((q, p) => q.SetFirstResult((int)p[parameterName.Name])); + } + else + { + _additionalCriteria.Add((q, p) => q.SetFirstResult(resultOperator.GetConstantCount())); + } + } + private void ProcessNonAggregatingGroupBy(NonAggregatingGroupBy resultOperator, QueryModel model) { var tSource = model.SelectClause.Selector.Type; @@ -394,7 +418,7 @@ private void ProcessFirstOperator() { - _additionalCriteria.Add(q => q.SetMaxResults(1)); + _additionalCriteria.Add((q, p) => q.SetMaxResults(1)); } private static bool CanBeEvaluatedInHqlSelectStatement(Expression expression) Modified: trunk/nhibernate/src/NHibernate/NHibernate.csproj =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-11-25 18:36:07 UTC (rev 4857) +++ trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-11-25 20:16:50 UTC (rev 4858) @@ -586,6 +586,7 @@ <Compile Include="Linq\Expressions\NhMaxExpression.cs" /> <Compile Include="Linq\Expressions\NhMinExpression.cs" /> <Compile Include="Linq\Expressions\NhSumExpression.cs" /> + <Compile Include="Impl\ExpressionQueryImpl.cs" /> <Compile Include="Linq\Visitors\IHqlExpressionVisitor.cs" /> <Compile Include="Linq\GroupJoin\IsAggregatingResults.cs" /> <Compile Include="Linq\GroupJoin\GroupJoinAggregateDetectionVisitor.cs" /> @@ -602,6 +603,7 @@ <Compile Include="Linq\Functions\DateTimeGenerator.cs" /> <Compile Include="Linq\Functions\StringGenerator.cs" /> <Compile Include="Linq\Functions\QueryableGenerator.cs" /> + <Compile Include="Linq\ReWriters\RemoveUnnecessaryBodyOperators.cs" /> <Compile Include="Linq\Visitors\SwapQuerySourceVisitor.cs" /> <Compile Include="Linq\Visitors\EqualityHqlGenerator.cs" /> <Compile Include="Linq\Visitors\ExpressionParameterVisitor.cs" /> @@ -613,7 +615,7 @@ <Compile Include="Linq\GroupBy\AggregatingGroupByRewriter.cs" /> <Compile Include="Linq\GroupJoin\AggregatingGroupJoinRewriter.cs" /> <Compile Include="Linq\ResultOperators\ClientSideTransformOperator.cs" /> - <Compile Include="Linq\CommandData.cs" /> + <Compile Include="Linq\ExpressionToHqlTranslationResults.cs" /> <Compile Include="Linq\EnumerableHelper.cs" /> <Compile Include="Linq\GroupBy\GroupBySelectClauseRewriter.cs" /> <Compile Include="Linq\Visitors\GroupByKeySelectorVisitor.cs" /> Modified: trunk/nhibernate/src/NHibernate.Test/Linq/MethodCallTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/MethodCallTests.cs 2009-11-25 18:36:07 UTC (rev 4857) +++ trunk/nhibernate/src/NHibernate.Test/Linq/MethodCallTests.cs 2009-11-25 20:16:50 UTC (rev 4858) @@ -4,10 +4,10 @@ namespace NHibernate.Test.Linq { [TestFixture] - [Ignore] public class MethodCallTests : LinqTestCase { [Test] + [Ignore("Waiting for re-linq support")] public void CanExecuteAny() { bool result = db.Users.Any(); @@ -15,7 +15,8 @@ } [Test] - public void CanExecuteAnyWithArguments() + [Ignore("Waiting for re-linq support")] + public void CanExecuteAnyWithArguments() { bool result = db.Users.Any(u => u.Name == "user-does-not-exist"); Assert.IsFalse(result); Modified: trunk/nhibernate/src/NHibernate.Test/Linq/MiscellaneousTextFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/MiscellaneousTextFixture.cs 2009-11-25 18:36:07 UTC (rev 4857) +++ trunk/nhibernate/src/NHibernate.Test/Linq/MiscellaneousTextFixture.cs 2009-11-25 20:16:50 UTC (rev 4858) @@ -1,5 +1,7 @@ using System; using System.Linq; +using System.Linq.Expressions; +using NHibernate.Test.Linq.Entities; using NUnit.Framework; namespace NHibernate.Test.Linq @@ -29,5 +31,71 @@ Console.WriteLine(count); } + + [Category("From NHUser list")] + [Test(Description = "Telerik grid example, http://www.telerik.com/community/forums/aspnet-mvc/grid/grid-and-nhibernate-linq.aspx")] + public void TelerikGridWhereClause() + { + Expression<Func<Customer, bool>> filter = c => c.ContactName.ToLower().StartsWith("a"); + IQueryable<Customer> value = db.Customers; + + var results = value.Where(filter).ToList(); + + Assert.IsFalse(results.Where(c => !c.ContactName.ToLower().StartsWith("a")).Any()); + } + + [Category("From NHUser list")] + [Test(Description = "Predicated count on a child list")] + public void PredicatedCountOnChildList() + { + var results = (from c in db.Customers + select new + { + c.ContactName, + Count = c.Orders.Count(o => o.Employee.EmployeeId == 4) + }).ToList(); + + Assert.AreEqual(91, results.Count()); + Assert.AreEqual(2, results.Where(c => c.ContactName == "Maria Anders").Single().Count); + Assert.AreEqual(4, results.Where(c => c.ContactName == "Thomas Hardy").Single().Count); + Assert.AreEqual(0, results.Where(c => c.ContactName == "Elizabeth Brown").Single().Count); + } + + [Category("From NHUser list")] + [Test(Description = "Reference an outer object in a predicate")] + public void ReferenceToOuter() + { + var results = from c in db.Customers + where + c.Orders.Any(o => o.ShippedTo == c.CompanyName) + select c; + + Assert.AreEqual(85, results.Count()); + } + + [Category("Paging")] + [Test(Description = "This sample uses a where clause and the Skip and Take operators to select " + + "the second, third and fourth pages of products")] + public void TriplePageSelection() + { + IQueryable<Product> q = ( + from p in db.Products + where p.ProductId > 1 + orderby p.ProductId + select p + ); + + IQueryable<Product> page2 = q.Skip(5).Take(5); + IQueryable<Product> page3 = q.Skip(10).Take(5); + IQueryable<Product> page4 = q.Skip(15).Take(5); + + var firstResultOnPage2 = page2.First(); + var firstResultOnPage3 = page3.First(); + var firstResultOnPage4 = page4.First(); + + Assert.AreNotEqual(firstResultOnPage2.ProductId, firstResultOnPage3.ProductId); + Assert.AreNotEqual(firstResultOnPage3.ProductId, firstResultOnPage4.ProductId); + Assert.AreNotEqual(firstResultOnPage2.ProductId, firstResultOnPage4.ProductId); + } } } Modified: trunk/nhibernate/src/NHibernate.Test/Linq/ParameterisedQueries.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/ParameterisedQueries.cs 2009-11-25 18:36:07 UTC (rev 4857) +++ trunk/nhibernate/src/NHibernate.Test/Linq/ParameterisedQueries.cs 2009-11-25 20:16:50 UTC (rev 4858) @@ -48,10 +48,10 @@ var nhNewYork = new NhLinqExpression(newYork.Body); Assert.AreEqual(nhLondon.Key, nhNewYork.Key); - Assert.AreEqual(1, nhLondon.ParameterValues.Count); - Assert.AreEqual(1, nhNewYork.ParameterValues.Count); - Assert.AreEqual("London", nhLondon.ParameterValues.First().Value); - Assert.AreEqual("New York", nhNewYork.ParameterValues.First().Value); + Assert.AreEqual(1, nhLondon.ParameterValuesByName.Count); + Assert.AreEqual(1, nhNewYork.ParameterValuesByName.Count); + Assert.AreEqual("London", nhLondon.ParameterValuesByName.First().Value); + Assert.AreEqual("New York", nhNewYork.ParameterValuesByName.First().Value); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aye...@us...> - 2010-01-08 06:57:38
|
Revision: 4914 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4914&view=rev Author: ayenderahien Date: 2010-01-08 06:57:28 +0000 (Fri, 08 Jan 2010) Log Message: ----------- Adding parameter type information for SQL log, that allow to detect issues with parameter types and length Modified Paths: -------------- trunk/nhibernate/src/NHibernate/AdoNet/Util/SqlStatementLogger.cs trunk/nhibernate/src/NHibernate.Test/SqlTest/Identity/MsSQL/MSSQLIdentityInsertWithStoredProcsTest.cs Property Changed: ---------------- trunk/nhibernate/ Property changes on: trunk/nhibernate ___________________________________________________________________ Modified: svn:mergeinfo - /branches/2.1.x/nhibernate:4690-4691,4696-4697,4711,4715-4716 + /branches/2.1.x/nhibernate:4690-4691,4696-4697,4711,4715-4716,4905-4908 Modified: trunk/nhibernate/src/NHibernate/AdoNet/Util/SqlStatementLogger.cs =================================================================== --- trunk/nhibernate/src/NHibernate/AdoNet/Util/SqlStatementLogger.cs 2010-01-06 22:32:59 UTC (rev 4913) +++ trunk/nhibernate/src/NHibernate/AdoNet/Util/SqlStatementLogger.cs 2010-01-08 06:57:28 UTC (rev 4914) @@ -93,14 +93,23 @@ } appendComma = true; p = (IDataParameter)command.Parameters[i]; - output.Append(string.Format("{0} = {1}", p.ParameterName, GetParameterLogableValue(p))); + output.Append(string.Format("{0} = {1} [Type: {2}]", p.ParameterName, GetParameterLogableValue(p), GetParameterLogableType(p))); } outputText = output.ToString(); } return outputText; } - public string GetParameterLogableValue(IDataParameter parameter) + private static string GetParameterLogableType(IDataParameter dataParameter) + { + var p = dataParameter as IDbDataParameter; + if (p != null) + return p.DbType + " (" + p.Size + ")"; + return p.DbType.ToString(); + + } + + public string GetParameterLogableValue(IDataParameter parameter) { if (parameter.Value == null || DBNull.Value.Equals(parameter.Value)) { Modified: trunk/nhibernate/src/NHibernate.Test/SqlTest/Identity/MsSQL/MSSQLIdentityInsertWithStoredProcsTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/SqlTest/Identity/MsSQL/MSSQLIdentityInsertWithStoredProcsTest.cs 2010-01-06 22:32:59 UTC (rev 4913) +++ trunk/nhibernate/src/NHibernate.Test/SqlTest/Identity/MsSQL/MSSQLIdentityInsertWithStoredProcsTest.cs 2010-01-08 06:57:28 UTC (rev 4914) @@ -14,7 +14,7 @@ protected override string GetExpectedInsertOrgLogStatement(string orgName) { - return string.Format("exec nh_organization_native_id_insert @p0;@p0 = '{0}'", orgName); + return string.Format("exec nh_organization_native_id_insert @p0;@p0 = '{0}' [Type: String ({1})]", orgName, orgName.Length); } protected override IList Mappings This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2010-01-19 10:31:27
|
Revision: 4920 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4920&view=rev Author: steverstrong Date: 2010-01-19 10:31:20 +0000 (Tue, 19 Jan 2010) Log Message: ----------- Upgraded to latest re-linq version Modified Paths: -------------- trunk/nhibernate/lib/net/3.5/Remotion.Data.Linq.dll trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs trunk/nhibernate/src/NHibernate/Linq/Functions/QueryableGenerator.cs trunk/nhibernate/src/NHibernate/Linq/NhLinqExpression.cs trunk/nhibernate/src/NHibernate/Linq/ResultOperators/ClientSideTransformOperator.cs trunk/nhibernate/src/NHibernate/Linq/ResultTransformer.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/QueryModelVisitor.cs trunk/nhibernate/src/NHibernate/NHibernate.csproj trunk/nhibernate/src/NHibernate.Test/Linq/MethodCallTests.cs Removed Paths: ------------- trunk/nhibernate/lib/net/3.5/Remotion.Interfaces.dll trunk/nhibernate/lib/net/3.5/Remotion.dll Modified: trunk/nhibernate/lib/net/3.5/Remotion.Data.Linq.dll =================================================================== (Binary files differ) Deleted: trunk/nhibernate/lib/net/3.5/Remotion.Interfaces.dll =================================================================== (Binary files differ) Deleted: trunk/nhibernate/lib/net/3.5/Remotion.dll =================================================================== (Binary files differ) Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs 2010-01-17 19:31:11 UTC (rev 4919) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs 2010-01-19 10:31:20 UTC (rev 4920) @@ -261,7 +261,7 @@ return new HqlBitwiseNot(_factory); } - public HqlBooleanNot Not(HqlBooleanExpression operand) + public HqlBooleanNot BooleanNot(HqlBooleanExpression operand) { return new HqlBooleanNot(_factory, operand); } Modified: trunk/nhibernate/src/NHibernate/Linq/Functions/QueryableGenerator.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Functions/QueryableGenerator.cs 2010-01-17 19:31:11 UTC (rev 4919) +++ trunk/nhibernate/src/NHibernate/Linq/Functions/QueryableGenerator.cs 2010-01-19 10:31:20 UTC (rev 4920) @@ -75,7 +75,7 @@ // All has two arguments. Arg 1 is the source and arg 2 is the predicate var predicate = (LambdaExpression)arguments[1]; - return treeBuilder.Not( + return treeBuilder.BooleanNot( treeBuilder.Exists( treeBuilder.Query( treeBuilder.SelectFrom( @@ -86,7 +86,7 @@ ) ), treeBuilder.Where( - treeBuilder.Not(visitor.Visit(arguments[1]).AsBooleanExpression()) + treeBuilder.BooleanNot(visitor.Visit(arguments[1]).AsBooleanExpression()) ) ) ) Modified: trunk/nhibernate/src/NHibernate/Linq/NhLinqExpression.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/NhLinqExpression.cs 2010-01-17 19:31:11 UTC (rev 4919) +++ trunk/nhibernate/src/NHibernate/Linq/NhLinqExpression.cs 2010-01-19 10:31:20 UTC (rev 4920) @@ -3,6 +3,7 @@ using System.Linq; using System.Linq.Expressions; using NHibernate.Engine.Query; +using NHibernate.Hql.Ast; using NHibernate.Hql.Ast.ANTLR.Tree; using NHibernate.Linq.ResultOperators; using NHibernate.Linq.Visitors; @@ -71,7 +72,7 @@ ExpressionToHqlTranslationResults = QueryModelVisitor.GenerateHqlQuery(queryModel, _constantToParameterMap, - requiredHqlParameters); + requiredHqlParameters, true); ParameterDescriptors = requiredHqlParameters.AsReadOnly(); _astNode = ExpressionToHqlTranslationResults.Statement.AstNode; Modified: trunk/nhibernate/src/NHibernate/Linq/ResultOperators/ClientSideTransformOperator.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/ResultOperators/ClientSideTransformOperator.cs 2010-01-17 19:31:11 UTC (rev 4919) +++ trunk/nhibernate/src/NHibernate/Linq/ResultOperators/ClientSideTransformOperator.cs 2010-01-19 10:31:20 UTC (rev 4920) @@ -1,4 +1,5 @@ using System; +using System.Linq.Expressions; using Remotion.Data.Linq.Clauses; using Remotion.Data.Linq.Clauses.StreamedData; @@ -20,5 +21,9 @@ { throw new NotImplementedException(); } + + public override void TransformExpressions(Func<Expression, Expression> transformation) + { + } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Linq/ResultTransformer.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/ResultTransformer.cs 2010-01-17 19:31:11 UTC (rev 4919) +++ trunk/nhibernate/src/NHibernate/Linq/ResultTransformer.cs 2010-01-19 10:31:20 UTC (rev 4920) @@ -3,7 +3,6 @@ using System.Linq; using System.Linq.Expressions; using NHibernate.Transform; -using Remotion.Collections; namespace NHibernate.Linq { Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs 2010-01-17 19:31:11 UTC (rev 4919) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs 2010-01-19 10:31:20 UTC (rev 4920) @@ -325,7 +325,7 @@ switch (expression.NodeType) { case ExpressionType.Not: - return _hqlTreeBuilder.Not(VisitExpression(expression.Operand).AsBooleanExpression()); + return _hqlTreeBuilder.BooleanNot(VisitExpression(expression.Operand).AsBooleanExpression()); case ExpressionType.Convert: return VisitExpression(expression.Operand); } @@ -415,7 +415,7 @@ protected HqlTreeNode VisitSubQueryExpression(SubQueryExpression expression) { - ExpressionToHqlTranslationResults query = QueryModelVisitor.GenerateHqlQuery(expression.QueryModel, _parameters, _requiredHqlParameters); + ExpressionToHqlTranslationResults query = QueryModelVisitor.GenerateHqlQuery(expression.QueryModel, _parameters, _requiredHqlParameters, false); return query.Statement; } Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/QueryModelVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/QueryModelVisitor.cs 2010-01-17 19:31:11 UTC (rev 4919) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/QueryModelVisitor.cs 2010-01-19 10:31:20 UTC (rev 4920) @@ -21,7 +21,7 @@ { public class QueryModelVisitor : QueryModelVisitorBase { - public static ExpressionToHqlTranslationResults GenerateHqlQuery(QueryModel queryModel, IDictionary<ConstantExpression, NamedParameter> parameters, IList<NamedParameterDescriptor> requiredHqlParameters) + public static ExpressionToHqlTranslationResults GenerateHqlQuery(QueryModel queryModel, IDictionary<ConstantExpression, NamedParameter> parameters, IList<NamedParameterDescriptor> requiredHqlParameters, bool root) { // Remove unnecessary body operators RemoveUnnecessaryBodyOperators.ReWrite(queryModel); @@ -44,7 +44,7 @@ // Flatten pointless subqueries QueryReferenceExpressionFlattener.ReWrite(queryModel); - var visitor = new QueryModelVisitor(parameters, requiredHqlParameters); + var visitor = new QueryModelVisitor(parameters, requiredHqlParameters, root); visitor.VisitQueryModel(queryModel); return visitor.GetTranslation(); @@ -62,20 +62,28 @@ private readonly IDictionary<ConstantExpression, NamedParameter> _parameters; private readonly IList<NamedParameterDescriptor> _requiredHqlParameters; + private readonly bool _root; private bool _serverSide = true; private HqlTreeNode _treeNode; + private System.Type _resultType; - private QueryModelVisitor(IDictionary<ConstantExpression, NamedParameter> parameters, IList<NamedParameterDescriptor> requiredHqlParameters) + private QueryModelVisitor(IDictionary<ConstantExpression, NamedParameter> parameters, IList<NamedParameterDescriptor> requiredHqlParameters, bool root) { _parameters = parameters; _requiredHqlParameters = requiredHqlParameters; - _hqlTreeBuilder = new HqlTreeBuilder(); + _root = root; + _hqlTreeBuilder = new HqlTreeBuilder(); _treeNode = _hqlTreeBuilder.Query(_hqlTreeBuilder.SelectFrom(_hqlTreeBuilder.From())); } public ExpressionToHqlTranslationResults GetTranslation() { + if (_root) + { + DetectOuterExists(); + } + return new ExpressionToHqlTranslationResults(_treeNode, _itemTransformers, _listTransformers, @@ -83,6 +91,20 @@ _additionalCriteria); } + private void DetectOuterExists() + { + if (_treeNode is HqlExists) + { + _treeNode = _treeNode.Children.First(); + + _additionalCriteria.Add((q, p) => q.SetMaxResults(1)); + + Expression<Func<IEnumerable<object>, bool>> x = l => l.Any(); + + _listTransformers.Add(x); + } + } + public override void VisitMainFromClause(MainFromClause fromClause, QueryModel queryModel) { AddFromClause(_hqlTreeBuilder.Range( @@ -194,6 +216,14 @@ { ProcessAggregateOperator((AggregateResultOperator)resultOperator); } + else if (resultOperator is AnyResultOperator) + { + ProcessAnyOperator((AnyResultOperator) resultOperator); + } + else if (resultOperator is AllResultOperator) + { + ProcessAllOperator((AllResultOperator) resultOperator); + } else { throw new NotSupportedException(string.Format("The {0} result operator is not current supported", @@ -201,6 +231,20 @@ } } + private void ProcessAllOperator(AllResultOperator resultOperator) + { + AddWhereClause(_hqlTreeBuilder.BooleanNot( + HqlGeneratorExpressionTreeVisitor.Visit(resultOperator.Predicate, _parameters, + _requiredHqlParameters).AsBooleanExpression())); + + _treeNode = _hqlTreeBuilder.BooleanNot(_hqlTreeBuilder.Exists((HqlQuery)_treeNode)); + } + + private void ProcessAnyOperator(AnyResultOperator anyOperator) + { + _treeNode = _hqlTreeBuilder.Exists((HqlQuery) _treeNode); + } + private void ProcessContainsOperator(ContainsResultOperator resultOperator) { var itemExpression = Modified: trunk/nhibernate/src/NHibernate/NHibernate.csproj =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.csproj 2010-01-17 19:31:11 UTC (rev 4919) +++ trunk/nhibernate/src/NHibernate/NHibernate.csproj 2010-01-19 10:31:20 UTC (rev 4920) @@ -55,10 +55,6 @@ <SpecificVersion>False</SpecificVersion> <HintPath>..\..\lib\net\3.5\log4net.dll</HintPath> </Reference> - <Reference Include="Remotion, Version=1.13.9.2, Culture=neutral, PublicKeyToken=cab60358ab4081ea, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\lib\net\3.5\Remotion.dll</HintPath> - </Reference> <Reference Include="Remotion.Data.Linq, Version=1.13.9.2, Culture=neutral, PublicKeyToken=cab60358ab4081ea, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\lib\net\3.5\Remotion.Data.Linq.dll</HintPath> Modified: trunk/nhibernate/src/NHibernate.Test/Linq/MethodCallTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/MethodCallTests.cs 2010-01-17 19:31:11 UTC (rev 4919) +++ trunk/nhibernate/src/NHibernate.Test/Linq/MethodCallTests.cs 2010-01-19 10:31:20 UTC (rev 4920) @@ -7,7 +7,6 @@ public class MethodCallTests : LinqTestCase { [Test] - [Ignore("Waiting for re-linq support")] public void CanExecuteAny() { bool result = db.Users.Any(); @@ -15,7 +14,6 @@ } [Test] - [Ignore("Waiting for re-linq support")] public void CanExecuteAnyWithArguments() { bool result = db.Users.Any(u => u.Name == "user-does-not-exist"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2010-02-26 20:47:16
|
Revision: 4948 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4948&view=rev Author: steverstrong Date: 2010-02-26 20:47:09 +0000 (Fri, 26 Feb 2010) Log Message: ----------- Eager loading support in Linq provider Modified Paths: -------------- trunk/nhibernate/lib/net/3.5/Remotion.Data.Linq.dll trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs trunk/nhibernate/src/NHibernate/Linq/LinqExtensionMethods.cs trunk/nhibernate/src/NHibernate/Linq/NhLinqExpression.cs trunk/nhibernate/src/NHibernate/Linq/NhQueryProvider.cs trunk/nhibernate/src/NHibernate/Linq/ReWriters/AddLeftJoinsReWriter.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ExpressionKeyVisitor.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ExpressionParameterVisitor.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/NhExpressionTreeVisitor.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/NhThrowingExpressionTreeVisitor.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/Nominator.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/QueryModelVisitor.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/IResultOperatorProcessor.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessAggregate.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessAll.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessAny.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessClientSideSelect.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessContains.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessFirst.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessFirstOrSingleBase.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessGroupBy.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessNonAggregatingGroupBy.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessResultOperatorReturn.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessSingle.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessSkip.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessTake.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ResultOperatorMap.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ResultOperatorProcessor.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ResultOperatorProcessorBase.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/SelectClauseVisitor.cs trunk/nhibernate/src/NHibernate/NHibernate.csproj trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Customer.cs trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Employee.cs trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Order.cs trunk/nhibernate/src/NHibernate.Test/Linq/LinqTestCase.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate/Linq/EagerFetchingExtensionMethods.cs trunk/nhibernate/src/NHibernate/Linq/Expressions/AggregateExpressionNode.cs trunk/nhibernate/src/NHibernate/Linq/IntermediateHqlTree.cs trunk/nhibernate/src/NHibernate/Linq/NhRelinqQueryParser.cs trunk/nhibernate/src/NHibernate/Linq/ResultOperators/AggregateResultOperator.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/NameUnNamedParameters.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/QuerySourceLocator.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessFetch.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessFetchMany.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessFetchOne.cs trunk/nhibernate/src/NHibernate.Test/Linq/EagerLoadTests.cs Property Changed: ---------------- trunk/nhibernate/src/ trunk/nhibernate/src/NHibernate/ Modified: trunk/nhibernate/lib/net/3.5/Remotion.Data.Linq.dll =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/src ___________________________________________________________________ Modified: svn:ignore - *.suo CloverSrc _ReSharper* *.resharperoptions *.resharper.user CloverBuild Ankh.Load *.resharper ConsoleTest _UpgradeReport_Files NHibernate.userprefs NHibernate.usertasks UpgradeLog.XML UpgradeLog2.XML UpgradeLog3.XML UpgradeLog4.XML UpgradeLog5.XML UpgradeLog6.XML UpgradeLog7.XML UpgradeLog8.XML UpgradeLog9.XML NHibernate.sln.proj NHibernate.sln.AssemblySurfaceCache.user NHibernate.sln.cache .git + *.suo CloverSrc _ReSharper* *.resharperoptions *.resharper.user CloverBuild Ankh.Load *.resharper ConsoleTest _UpgradeReport_Files NHibernate.userprefs NHibernate.usertasks UpgradeLog.XML UpgradeLog2.XML UpgradeLog3.XML UpgradeLog4.XML UpgradeLog5.XML UpgradeLog6.XML UpgradeLog7.XML UpgradeLog8.XML UpgradeLog9.XML NHibernate.sln.proj NHibernate.sln.AssemblySurfaceCache.user NHibernate.sln.cache .git .gitignore NHibernate.5.0.ReSharper.user Property changes on: trunk/nhibernate/src/NHibernate ___________________________________________________________________ Modified: svn:ignore - obj .#* *.user *.xsx AssemblyInfo.cs *.aps *.eto [Bb]in [Dd]ebug [Rr]elease *resharper* _ReSharper.NHibernate NHibernate.pidb + obj .#* *.user *.xsx AssemblyInfo.cs *.aps *.eto [Bb]in [Dd]ebug [Rr]elease *resharper* _ReSharper.NHibernate NHibernate.pidb NHibernate.suo Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs 2010-02-24 21:23:13 UTC (rev 4947) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -391,9 +391,19 @@ return new HqlIn(_factory, itemExpression, source); } - public HqlTreeNode LeftJoin(HqlExpression expression, HqlAlias @alias) + public HqlLeftJoin LeftJoin(HqlExpression expression, HqlAlias @alias) { return new HqlLeftJoin(_factory, expression, @alias); } + + public HqlFetchJoin FetchJoin(HqlExpression expression, HqlAlias @alias) + { + return new HqlFetchJoin(_factory, expression, @alias); + } + + public HqlLeftFetchJoin LeftFetchJoin(HqlExpression expression, HqlAlias @alias) + { + return new HqlLeftFetchJoin(_factory, expression, @alias); + } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs 2010-02-24 21:23:13 UTC (rev 4947) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -674,6 +674,22 @@ } } + public class HqlFetchJoin : HqlTreeNode + { + public HqlFetchJoin(IASTFactory factory, HqlExpression expression, HqlAlias @alias) + : base(HqlSqlWalker.JOIN, "join", factory, new HqlFetch(factory), expression, @alias) + { + } + } + + public class HqlLeftFetchJoin : HqlTreeNode + { + public HqlLeftFetchJoin(IASTFactory factory, HqlExpression expression, HqlAlias @alias) + : base(HqlSqlWalker.JOIN, "join", factory, new HqlLeft(factory), new HqlFetch(factory), expression, @alias) + { + } + } + public class HqlFetch : HqlTreeNode { public HqlFetch(IASTFactory factory) : base(HqlSqlWalker.FETCH, "fetch", factory) Added: trunk/nhibernate/src/NHibernate/Linq/EagerFetchingExtensionMethods.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/EagerFetchingExtensionMethods.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Linq/EagerFetchingExtensionMethods.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Reflection; +using Remotion.Data.Linq.EagerFetching; +using Remotion.Data.Linq.Utilities; + +namespace NHibernate.Linq +{ + public static class EagerFetchingExtensionMethods + { + public static FluentFetchRequest<TOriginating, TRelated> Fetch<TOriginating, TRelated>( + this IQueryable<TOriginating> query, Expression<Func<TOriginating, TRelated>> relatedObjectSelector) + { + ArgumentUtility.CheckNotNull("query", query); + ArgumentUtility.CheckNotNull("relatedObjectSelector", relatedObjectSelector); + + var methodInfo = ((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TOriginating), typeof(TRelated)); + return CreateFluentFetchRequest<TOriginating, TRelated>(methodInfo, query, relatedObjectSelector); + } + + public static FluentFetchRequest<TOriginating, TRelated> FetchMany<TOriginating, TRelated>( + this IQueryable<TOriginating> query, Expression<Func<TOriginating, IEnumerable<TRelated>>> relatedObjectSelector) + { + ArgumentUtility.CheckNotNull("query", query); + ArgumentUtility.CheckNotNull("relatedObjectSelector", relatedObjectSelector); + + var methodInfo = ((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TOriginating), typeof(TRelated)); + return CreateFluentFetchRequest<TOriginating, TRelated>(methodInfo, query, relatedObjectSelector); + } + + public static FluentFetchRequest<TQueried, TRelated> ThenFetch<TQueried, TFetch, TRelated>( + this FluentFetchRequest<TQueried, TFetch> query, Expression<Func<TFetch, TRelated>> relatedObjectSelector) + { + ArgumentUtility.CheckNotNull("query", query); + ArgumentUtility.CheckNotNull("relatedObjectSelector", relatedObjectSelector); + + var methodInfo = ((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TQueried), typeof(TFetch), typeof(TRelated)); + return CreateFluentFetchRequest<TQueried, TRelated>(methodInfo, query, relatedObjectSelector); + } + + public static FluentFetchRequest<TQueried, TRelated> ThenFetchMany<TQueried, TFetch, TRelated>( + this FluentFetchRequest<TQueried, TFetch> query, Expression<Func<TFetch, IEnumerable<TRelated>>> relatedObjectSelector) + { + ArgumentUtility.CheckNotNull("query", query); + ArgumentUtility.CheckNotNull("relatedObjectSelector", relatedObjectSelector); + + var methodInfo = ((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TQueried), typeof(TFetch), typeof(TRelated)); + return CreateFluentFetchRequest<TQueried, TRelated>(methodInfo, query, relatedObjectSelector); + } + + private static FluentFetchRequest<TOriginating, TRelated> CreateFluentFetchRequest<TOriginating, TRelated>( + MethodInfo currentFetchMethod, + IQueryable<TOriginating> query, + LambdaExpression relatedObjectSelector) + { + var queryProvider = query.Provider; // ArgumentUtility.CheckNotNullAndType<QueryProviderBase>("query.Provider", query.Provider); + var callExpression = Expression.Call(currentFetchMethod, query.Expression, relatedObjectSelector); + return new FluentFetchRequest<TOriginating, TRelated>(queryProvider, callExpression); + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate/Linq/Expressions/AggregateExpressionNode.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Expressions/AggregateExpressionNode.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Linq/Expressions/AggregateExpressionNode.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -0,0 +1,43 @@ +using System; +using System.Linq.Expressions; +using NHibernate.Linq.ResultOperators; +using Remotion.Data.Linq.Clauses; +using Remotion.Data.Linq.Parsing.Structure.IntermediateModel; + +namespace NHibernate.Linq.Expressions +{ + public class AggregateExpressionNode : ResultOperatorExpressionNodeBase + { + public MethodCallExpressionParseInfo ParseInfo { get; set; } + public Expression OptionalSeed { get; set; } + public LambdaExpression Accumulator { get; set; } + public LambdaExpression OptionalSelector { get; set; } + + public AggregateExpressionNode(MethodCallExpressionParseInfo parseInfo, Expression arg1, Expression arg2, LambdaExpression optionalSelector) : base(parseInfo, null, optionalSelector) + { + ParseInfo = parseInfo; + + if (arg2 != null) + { + OptionalSeed = arg1; + Accumulator = (LambdaExpression) arg2; + } + else + { + Accumulator = (LambdaExpression) arg1; + } + + OptionalSelector = optionalSelector; + } + + public override Expression Resolve(ParameterExpression inputParameter, Expression expressionToBeResolved, ClauseGenerationContext clauseGenerationContext) + { + throw new NotImplementedException(); + } + + protected override ResultOperatorBase CreateResultOperator(ClauseGenerationContext clauseGenerationContext) + { + return new AggregateResultOperator(ParseInfo, OptionalSeed, Accumulator, OptionalSelector); + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate/Linq/IntermediateHqlTree.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/IntermediateHqlTree.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Linq/IntermediateHqlTree.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -0,0 +1,145 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using NHibernate.Hql.Ast; +using NHibernate.Transform; +using NHibernate.Type; + +namespace NHibernate.Linq +{ + public class IntermediateHqlTree + { + private readonly bool _root; + private readonly List<Action<IQuery, IDictionary<string, Tuple<object, IType>>>> _additionalCriteria = new List<Action<IQuery, IDictionary<string, Tuple<object, IType>>>>(); + private readonly List<LambdaExpression> _listTransformers = new List<LambdaExpression>(); + private readonly List<LambdaExpression> _itemTransformers = new List<LambdaExpression>(); + private readonly List<LambdaExpression> _postExecuteTransformers = new List<LambdaExpression>(); + private bool _hasDistinctRootOperator; + + public HqlTreeNode Root { get; private set; } + public HqlTreeBuilder TreeBuilder { get; private set; } + + public IntermediateHqlTree(bool root) + { + _root = root; + TreeBuilder = new HqlTreeBuilder(); + Root = TreeBuilder.Query(TreeBuilder.SelectFrom(TreeBuilder.From())); + } + + public ExpressionToHqlTranslationResults GetTranslation() + { + if (_root) + { + DetectOuterExists(); + } + + return new ExpressionToHqlTranslationResults(Root, + _itemTransformers, + _listTransformers, + _postExecuteTransformers, + _additionalCriteria); + } + + public void AddDistinctRootOperator() + { + if (!_hasDistinctRootOperator) + { + Expression<Func<IEnumerable<object>, IList>> x = + l => new DistinctRootEntityResultTransformer().TransformList(l.ToList()); + + _listTransformers.Add(x); + _hasDistinctRootOperator = true; + } + } + + + public void AddItemTransformer(LambdaExpression transformer) + { + _itemTransformers.Add(transformer); + } + + public void AddFromClause(HqlTreeNode from) + { + Root.NodesPreOrder.Where(n => n is HqlFrom).First().AddChild(from); + } + + public void AddSelectClause(HqlTreeNode select) + { + Root.NodesPreOrder.Where(n => n is HqlSelectFrom).First().AddChild(select); + } + + public void AddGroupByClause(HqlGroupBy groupBy) + { + Root.As<HqlQuery>().AddChild(groupBy); + } + + public void AddOrderByClause(HqlExpression orderBy, HqlDirectionStatement direction) + { + var orderByRoot = Root.NodesPreOrder.Where(n => n is HqlOrderBy).FirstOrDefault(); + + if (orderByRoot == null) + { + orderByRoot = TreeBuilder.OrderBy(); + Root.As<HqlQuery>().AddChild(orderByRoot); + } + + orderByRoot.AddChild(orderBy); + orderByRoot.AddChild(direction); + } + + public void AddWhereClause(HqlBooleanExpression where) + { + var currentWhere = Root.NodesPreOrder.Where(n => n is HqlWhere).FirstOrDefault(); + + if (currentWhere == null) + { + currentWhere = TreeBuilder.Where(where); + Root.As<HqlQuery>().AddChild(currentWhere); + } + else + { + var currentClause = (HqlBooleanExpression)currentWhere.Children.Single(); + + currentWhere.ClearChildren(); + currentWhere.AddChild(TreeBuilder.BooleanAnd(currentClause, where)); + } + } + + private void DetectOuterExists() + { + if (Root is HqlExists) + { + Root = Root.Children.First(); + + _additionalCriteria.Add((q, p) => q.SetMaxResults(1)); + + Expression<Func<IEnumerable<object>, bool>> x = l => l.Any(); + + _listTransformers.Add(x); + } + } + + + public void AddAdditionalCriteria(Action<IQuery, IDictionary<string, Tuple<object, IType>>> criteria) + { + _additionalCriteria.Add(criteria); + } + + public void AddPostExecuteTransformer(LambdaExpression lambda) + { + _postExecuteTransformers.Add(lambda); + } + + public void AddListTransformer(LambdaExpression lambda) + { + _listTransformers.Add(lambda); + } + + public void SetRoot(HqlTreeNode newRoot) + { + Root = newRoot; + } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Linq/LinqExtensionMethods.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/LinqExtensionMethods.cs 2010-02-24 21:23:13 UTC (rev 4947) +++ trunk/nhibernate/src/NHibernate/Linq/LinqExtensionMethods.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -19,6 +19,11 @@ } } + public static bool IsEnumerableOfT(this System.Type type) + { + return type.IsGenericType && type.GetGenericTypeDefinition() == typeof (IEnumerable<>); + } + public static bool IsNullable(this System.Type type) { return (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)); Modified: trunk/nhibernate/src/NHibernate/Linq/NhLinqExpression.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/NhLinqExpression.cs 2010-02-24 21:23:13 UTC (rev 4947) +++ trunk/nhibernate/src/NHibernate/Linq/NhLinqExpression.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -1,17 +1,11 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using NHibernate.Engine.Query; using NHibernate.Hql.Ast.ANTLR.Tree; -using NHibernate.Linq.ResultOperators; using NHibernate.Linq.Visitors; using NHibernate.Type; -using Remotion.Data.Linq; -using Remotion.Data.Linq.Clauses; using Remotion.Data.Linq.Parsing.ExpressionTreeVisitors; -using Remotion.Data.Linq.Parsing.Structure; -using Remotion.Data.Linq.Parsing.Structure.IntermediateModel; namespace NHibernate.Linq { @@ -83,118 +77,4 @@ return _astNode; } } - - public static class NhRelinqQueryParser - { - public static readonly MethodCallExpressionNodeTypeRegistry MethodCallRegistry = - MethodCallExpressionNodeTypeRegistry.CreateDefault(); - - static NhRelinqQueryParser() - { - MethodCallRegistry.Register( - new[] - { - MethodCallExpressionNodeTypeRegistry.GetRegisterableMethodDefinition(ReflectionHelper.GetMethod(() => Queryable.Aggregate<object>(null, null))), - MethodCallExpressionNodeTypeRegistry.GetRegisterableMethodDefinition(ReflectionHelper.GetMethod(() => Queryable.Aggregate<object, object>(null, null, null))) - }, - typeof (AggregateExpressionNode)); - - MethodCallRegistry.Register( - new [] - { - MethodCallExpressionNodeTypeRegistry.GetRegisterableMethodDefinition(ReflectionHelper.GetMethod((List<object> l) => l.Contains(null))), - - }, - typeof(ContainsExpressionNode)); - } - - public static QueryModel Parse(Expression expression) - { - return new QueryParser(new ExpressionTreeParser(MethodCallRegistry)).GetParsedQuery(expression); - } - } - - public class NameUnNamedParameters : NhExpressionTreeVisitor - { - public static Expression Visit(Expression expression) - { - var visitor = new NameUnNamedParameters(); - - return visitor.VisitExpression(expression); - } - - private readonly Dictionary<ParameterExpression, ParameterExpression> _renamedParameters = new Dictionary<ParameterExpression, ParameterExpression>(); - - protected override Expression VisitParameterExpression(ParameterExpression expression) - { - if (string.IsNullOrEmpty(expression.Name)) - { - ParameterExpression renamed; - - if (_renamedParameters.TryGetValue(expression, out renamed)) - { - return renamed; - } - - renamed = Expression.Parameter(expression.Type, Guid.NewGuid().ToString()); - - _renamedParameters.Add(expression, renamed); - - return renamed; - } - - return base.VisitParameterExpression(expression); - } - } - - public class AggregateExpressionNode : ResultOperatorExpressionNodeBase - { - public MethodCallExpressionParseInfo ParseInfo { get; set; } - public Expression OptionalSeed { get; set; } - public LambdaExpression Accumulator { get; set; } - public LambdaExpression OptionalSelector { get; set; } - - public AggregateExpressionNode(MethodCallExpressionParseInfo parseInfo, Expression arg1, Expression arg2, LambdaExpression optionalSelector) : base(parseInfo, null, optionalSelector) - { - ParseInfo = parseInfo; - - if (arg2 != null) - { - OptionalSeed = arg1; - Accumulator = (LambdaExpression) arg2; - } - else - { - Accumulator = (LambdaExpression) arg1; - } - - OptionalSelector = optionalSelector; - } - - public override Expression Resolve(ParameterExpression inputParameter, Expression expressionToBeResolved, ClauseGenerationContext clauseGenerationContext) - { - throw new NotImplementedException(); - } - - protected override ResultOperatorBase CreateResultOperator(ClauseGenerationContext clauseGenerationContext) - { - return new AggregateResultOperator(ParseInfo, OptionalSeed, Accumulator, OptionalSelector); - } - } - - public class AggregateResultOperator : ClientSideTransformOperator - { - public MethodCallExpressionParseInfo ParseInfo { get; set; } - public Expression OptionalSeed { get; set; } - public LambdaExpression Accumulator { get; set; } - public LambdaExpression OptionalSelector { get; set; } - - public AggregateResultOperator(MethodCallExpressionParseInfo parseInfo, Expression optionalSeed, LambdaExpression accumulator, LambdaExpression optionalSelector) - { - ParseInfo = parseInfo; - OptionalSeed = optionalSeed; - Accumulator = accumulator; - OptionalSelector = optionalSelector; - } - } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Linq/NhQueryProvider.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/NhQueryProvider.cs 2010-02-24 21:23:13 UTC (rev 4947) +++ trunk/nhibernate/src/NHibernate/Linq/NhQueryProvider.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -1,5 +1,4 @@ -using System; -using System.Collections; +using System.Collections; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; Added: trunk/nhibernate/src/NHibernate/Linq/NhRelinqQueryParser.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/NhRelinqQueryParser.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Linq/NhRelinqQueryParser.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -0,0 +1,50 @@ +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using Remotion.Data.Linq; +using Remotion.Data.Linq.EagerFetching.Parsing; +using Remotion.Data.Linq.Parsing.Structure; +using Remotion.Data.Linq.Parsing.Structure.IntermediateModel; +using AggregateExpressionNode = NHibernate.Linq.Expressions.AggregateExpressionNode; + +namespace NHibernate.Linq +{ + public static class NhRelinqQueryParser + { + public static readonly MethodCallExpressionNodeTypeRegistry MethodCallRegistry = + MethodCallExpressionNodeTypeRegistry.CreateDefault(); + + static NhRelinqQueryParser() + { + MethodCallRegistry.Register( + new[] + { + MethodCallExpressionNodeTypeRegistry.GetRegisterableMethodDefinition( + ReflectionHelper.GetMethod(() => Queryable.Aggregate<object>(null, null))), + MethodCallExpressionNodeTypeRegistry.GetRegisterableMethodDefinition( + ReflectionHelper.GetMethod(() => Queryable.Aggregate<object, object>(null, null, null))) + }, + typeof (AggregateExpressionNode)); + + MethodCallRegistry.Register( + new[] + { + MethodCallExpressionNodeTypeRegistry.GetRegisterableMethodDefinition( + ReflectionHelper.GetMethod((List<object> l) => l.Contains(null))), + + }, + typeof (ContainsExpressionNode)); + + MethodCallRegistry.Register(new[] { typeof(EagerFetchingExtensionMethods).GetMethod("Fetch") }, typeof(FetchOneExpressionNode)); + MethodCallRegistry.Register(new[] { typeof(EagerFetchingExtensionMethods).GetMethod("FetchMany") }, typeof(FetchManyExpressionNode)); + MethodCallRegistry.Register(new[] { typeof(EagerFetchingExtensionMethods).GetMethod("ThenFetch") }, typeof(ThenFetchOneExpressionNode)); + MethodCallRegistry.Register(new[] { typeof(EagerFetchingExtensionMethods).GetMethod("ThenFetchMany") }, typeof(ThenFetchManyExpressionNode)); + + } + + public static QueryModel Parse(Expression expression) + { + return new QueryParser(new ExpressionTreeParser(MethodCallRegistry)).GetParsedQuery(expression); + } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Linq/ReWriters/AddLeftJoinsReWriter.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/ReWriters/AddLeftJoinsReWriter.cs 2010-02-24 21:23:13 UTC (rev 4947) +++ trunk/nhibernate/src/NHibernate/Linq/ReWriters/AddLeftJoinsReWriter.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -56,7 +56,7 @@ return swapper.VisitExpression(expression); } - protected override Expression VisitExpression(Expression expression) + public override Expression VisitExpression(Expression expression) { if (expression == null) { Added: trunk/nhibernate/src/NHibernate/Linq/ResultOperators/AggregateResultOperator.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/ResultOperators/AggregateResultOperator.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Linq/ResultOperators/AggregateResultOperator.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -0,0 +1,21 @@ +using System.Linq.Expressions; +using Remotion.Data.Linq.Parsing.Structure.IntermediateModel; + +namespace NHibernate.Linq.ResultOperators +{ + public class AggregateResultOperator : ClientSideTransformOperator + { + public MethodCallExpressionParseInfo ParseInfo { get; set; } + public Expression OptionalSeed { get; set; } + public LambdaExpression Accumulator { get; set; } + public LambdaExpression OptionalSelector { get; set; } + + public AggregateResultOperator(MethodCallExpressionParseInfo parseInfo, Expression optionalSeed, LambdaExpression accumulator, LambdaExpression optionalSelector) + { + ParseInfo = parseInfo; + OptionalSeed = optionalSeed; + Accumulator = accumulator; + OptionalSelector = optionalSelector; + } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/ExpressionKeyVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/ExpressionKeyVisitor.cs 2010-02-24 21:23:13 UTC (rev 4947) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/ExpressionKeyVisitor.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -2,7 +2,6 @@ using System.Collections.ObjectModel; using System.Linq.Expressions; using System.Text; -using Remotion.Data.Linq.Parsing; namespace NHibernate.Linq.Visitors { @@ -13,7 +12,7 @@ /// generate the same key as /// from c in Customers where c.City = "Madrid" /// </summary> - public class ExpressionKeyVisitor : ExpressionTreeVisitor + public class ExpressionKeyVisitor : NhExpressionTreeVisitor { private readonly IDictionary<ConstantExpression, NamedParameter> _constantToParameterMap; readonly StringBuilder _string = new StringBuilder(); @@ -93,22 +92,14 @@ return base.VisitElementInit(elementInit); } - protected override ReadOnlyCollection<T> VisitExpressionList<T>(ReadOnlyCollection<T> expressions) - { - if (expressions.Count > 0) - { - VisitExpression(expressions[0]); + private T AppendCommas<T>(T expression) where T : Expression + { + VisitExpression(expression); + _string.Append(", "); - for (var i = 1; i < expressions.Count; i++) - { - _string.Append(", "); - VisitExpression(expressions[i]); - } - } + return expression; + } - return expressions; - } - protected override Expression VisitInvocationExpression(InvocationExpression expression) { return base.VisitInvocationExpression(expression); @@ -117,7 +108,8 @@ protected override Expression VisitLambdaExpression(LambdaExpression expression) { _string.Append('('); - VisitExpressionList(expression.Parameters); + + VisitList(expression.Parameters, AppendCommas); _string.Append(") => ("); VisitExpression(expression.Body); _string.Append(')'); @@ -171,7 +163,7 @@ _string.Append('.'); _string.Append(expression.Method.Name); _string.Append('('); - VisitExpressionList(expression.Arguments); + VisitList(expression.Arguments, AppendCommas); _string.Append(')'); return expression; @@ -187,7 +179,7 @@ _string.Append("new "); _string.Append(expression.Constructor.DeclaringType.Name); _string.Append('('); - VisitExpressionList(expression.Arguments); + VisitList(expression.Arguments, AppendCommas); _string.Append(')'); return expression; Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/ExpressionParameterVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/ExpressionParameterVisitor.cs 2010-02-24 21:23:13 UTC (rev 4947) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/ExpressionParameterVisitor.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -2,14 +2,13 @@ using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; -using Remotion.Data.Linq.Parsing; namespace NHibernate.Linq.Visitors { /// <summary> /// Locates constants in the expression tree and generates parameters for each one /// </summary> - public class ExpressionParameterVisitor : ExpressionTreeVisitor + public class ExpressionParameterVisitor : NhExpressionTreeVisitor { private readonly Dictionary<ConstantExpression, NamedParameter> _parameters = new Dictionary<ConstantExpression, NamedParameter>(); Added: trunk/nhibernate/src/NHibernate/Linq/Visitors/NameUnNamedParameters.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/NameUnNamedParameters.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/NameUnNamedParameters.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq.Expressions; + +namespace NHibernate.Linq.Visitors +{ + public class NameUnNamedParameters : NhExpressionTreeVisitor + { + public static Expression Visit(Expression expression) + { + var visitor = new NameUnNamedParameters(); + + return visitor.VisitExpression(expression); + } + + private readonly Dictionary<ParameterExpression, ParameterExpression> _renamedParameters = new Dictionary<ParameterExpression, ParameterExpression>(); + + protected override Expression VisitParameterExpression(ParameterExpression expression) + { + if (string.IsNullOrEmpty(expression.Name)) + { + ParameterExpression renamed; + + if (_renamedParameters.TryGetValue(expression, out renamed)) + { + return renamed; + } + + renamed = Expression.Parameter(expression.Type, Guid.NewGuid().ToString()); + + _renamedParameters.Add(expression, renamed); + + return renamed; + } + + return base.VisitParameterExpression(expression); + } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/NhExpressionTreeVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/NhExpressionTreeVisitor.cs 2010-02-24 21:23:13 UTC (rev 4947) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/NhExpressionTreeVisitor.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -7,7 +7,7 @@ { public class NhExpressionTreeVisitor : ExpressionTreeVisitor { - protected override Expression VisitExpression(Expression expression) + public override Expression VisitExpression(Expression expression) { if (expression == null) { @@ -27,7 +27,6 @@ return VisitNhNew((NhNewExpression) expression); case NhExpressionType.Star: return VisitNhStar((NhStarExpression) expression); - } return base.VisitExpression(expression); @@ -42,7 +41,7 @@ protected virtual Expression VisitNhNew(NhNewExpression expression) { - var arguments = VisitExpressionList(expression.Arguments); + var arguments = VisitAndConvert(expression.Arguments, "VisitNhNew"); return arguments != expression.Arguments ? new NhNewExpression(expression.Members, arguments) : expression; } Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/NhThrowingExpressionTreeVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/NhThrowingExpressionTreeVisitor.cs 2010-02-24 21:23:13 UTC (rev 4947) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/NhThrowingExpressionTreeVisitor.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -7,7 +7,7 @@ { public abstract class NhThrowingExpressionTreeVisitor : ThrowingExpressionTreeVisitor { - protected override Expression VisitExpression(Expression expression) + public override Expression VisitExpression(Expression expression) { switch ((NhExpressionType)expression.NodeType) { @@ -125,7 +125,7 @@ protected Expression BaseVisitNhNew(NhNewExpression expression) { - var arguments = base.VisitExpressionList(expression.Arguments); + var arguments = base.VisitAndConvert(expression.Arguments, "BaseVisitNhNew"); return arguments != expression.Arguments ? new NhNewExpression(expression.Members, arguments) : expression; } Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/Nominator.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/Nominator.cs 2010-02-24 21:23:13 UTC (rev 4947) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/Nominator.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -28,7 +28,7 @@ return _candidates; } - protected override Expression VisitExpression(Expression expression) + public override Expression VisitExpression(Expression expression) { if (expression != null) { Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/QueryModelVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/QueryModelVisitor.cs 2010-02-24 21:23:13 UTC (rev 4947) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/QueryModelVisitor.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using NHibernate.Hql.Ast; @@ -8,12 +7,13 @@ using NHibernate.Linq.ResultOperators; using NHibernate.Linq.ReWriters; using NHibernate.Linq.Visitors.ResultOperatorProcessors; -using NHibernate.Type; using Remotion.Data.Linq; using Remotion.Data.Linq.Clauses; using Remotion.Data.Linq.Clauses.Expressions; using Remotion.Data.Linq.Clauses.ResultOperators; using Remotion.Data.Linq.Clauses.StreamedData; +using Remotion.Data.Linq.EagerFetching; +using AggregateResultOperator = NHibernate.Linq.ResultOperators.AggregateResultOperator; namespace NHibernate.Linq.Visitors { @@ -48,23 +48,16 @@ var visitor = new QueryModelVisitor(parameters, root, queryModel); visitor.Visit(); - return visitor.GetTranslation(); + return visitor._hqlTree.GetTranslation(); } + private readonly IntermediateHqlTree _hqlTree; private static readonly ResultOperatorMap ResultOperatorMap; - - private readonly List<Action<IQuery, IDictionary<string, Tuple<object, IType>>>> _additionalCriteria = new List<Action<IQuery, IDictionary<string, Tuple<object, IType>>>>(); - private readonly List<LambdaExpression> _listTransformers = new List<LambdaExpression>(); - private readonly List<LambdaExpression> _itemTransformers = new List<LambdaExpression>(); - private readonly List<LambdaExpression> _postExecuteTransformers = new List<LambdaExpression>(); - private readonly bool _root; private bool _serverSide = true; - public HqlTreeNode Root { get; private set; } public VisitorParameters VisitorParameters { get; private set; } public IStreamedDataInfo CurrentEvaluationType { get; private set; } public IStreamedDataInfo PreviousEvaluationType { get; private set; } - public HqlTreeBuilder TreeBuilder { get; private set; } public QueryModel Model { get; private set; } static QueryModelVisitor() @@ -82,15 +75,16 @@ ResultOperatorMap.Add<ClientSideSelect, ProcessClientSideSelect>(); ResultOperatorMap.Add<AnyResultOperator, ProcessAny>(); ResultOperatorMap.Add<AllResultOperator, ProcessAll>(); + ResultOperatorMap.Add<FetchOneRequest, ProcessFetchOne>(); + ResultOperatorMap.Add<FetchManyRequest, ProcessFetchMany>(); } private QueryModelVisitor(VisitorParameters visitorParameters, bool root, QueryModel queryModel) { VisitorParameters = visitorParameters; Model = queryModel; - _root = root; - TreeBuilder = new HqlTreeBuilder(); - Root = TreeBuilder.Query(TreeBuilder.SelectFrom(TreeBuilder.From())); + + _hqlTree = new IntermediateHqlTree(root); } private void Visit() @@ -98,92 +92,15 @@ VisitQueryModel(Model); } - - private ExpressionToHqlTranslationResults GetTranslation() - { - if (_root) - { - DetectOuterExists(); - } - - return new ExpressionToHqlTranslationResults(Root, - _itemTransformers, - _listTransformers, - _postExecuteTransformers, - _additionalCriteria); - } - - private void DetectOuterExists() - { - if (Root is HqlExists) - { - Root = Root.Children.First(); - - _additionalCriteria.Add((q, p) => q.SetMaxResults(1)); - - Expression<Func<IEnumerable<object>, bool>> x = l => l.Any(); - - _listTransformers.Add(x); - } - } - public override void VisitMainFromClause(MainFromClause fromClause, QueryModel queryModel) { - AddFromClause(TreeBuilder.Range( - HqlGeneratorExpressionTreeVisitor.Visit(fromClause.FromExpression, VisitorParameters), - TreeBuilder.Alias(fromClause.ItemName))); + _hqlTree.AddFromClause(_hqlTree.TreeBuilder.Range( + HqlGeneratorExpressionTreeVisitor.Visit(fromClause.FromExpression, VisitorParameters), + _hqlTree.TreeBuilder.Alias(fromClause.ItemName))); base.VisitMainFromClause(fromClause, queryModel); } - - private void AddWhereClause(HqlBooleanExpression where) - { - var currentWhere = Root.NodesPreOrder.Where(n => n is HqlWhere).FirstOrDefault(); - - if (currentWhere == null) - { - currentWhere = TreeBuilder.Where(where); - Root.As<HqlQuery>().AddChild(currentWhere); - } - else - { - var currentClause = (HqlBooleanExpression)currentWhere.Children.Single(); - - currentWhere.ClearChildren(); - currentWhere.AddChild(TreeBuilder.BooleanAnd(currentClause, where)); - } - } - - private void AddFromClause(HqlTreeNode from) - { - Root.NodesPreOrder.Where(n => n is HqlFrom).First().AddChild(from); - } - - private void AddSelectClause(HqlTreeNode select) - { - Root.NodesPreOrder.Where(n => n is HqlSelectFrom).First().AddChild(select); - } - - private void AddGroupByClause(HqlGroupBy groupBy) - { - Root.As<HqlQuery>().AddChild(groupBy); - } - - private void AddOrderByClause(HqlExpression orderBy, HqlDirectionStatement direction) - { - var orderByRoot = Root.NodesPreOrder.Where(n => n is HqlOrderBy).FirstOrDefault(); - - if (orderByRoot == null) - { - orderByRoot = TreeBuilder.OrderBy(); - Root.As<HqlQuery>().AddChild(orderByRoot); - } - - orderByRoot.AddChild(orderBy); - orderByRoot.AddChild(direction); - } - public override void VisitResultOperator(ResultOperatorBase resultOperator, QueryModel queryModel, int index) { PreviousEvaluationType = CurrentEvaluationType; @@ -201,32 +118,7 @@ } } - var results = ResultOperatorMap.Process(resultOperator, this); - - if (results.AdditionalCriteria != null) - { - _additionalCriteria.Add(results.AdditionalCriteria); - } - if (results.GroupBy != null) - { - AddGroupByClause(results.GroupBy); - } - if (results.ListTransformer != null) - { - _listTransformers.Add(results.ListTransformer); - } - if (results.PostExecuteTransformer != null) - { - _postExecuteTransformers.Add(results.PostExecuteTransformer); - } - if (results.WhereClause != null) - { - AddWhereClause(results.WhereClause); - } - if (results.TreeNode != null) - { - Root = results.TreeNode; - } + ResultOperatorMap.Process(resultOperator, this, _hqlTree); } private void GroupBy<TSource, TKey, TResult>(Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TResult>> elementSelector) @@ -246,10 +138,10 @@ if (visitor.ProjectionExpression != null) { - _itemTransformers.Add(visitor.ProjectionExpression); + _hqlTree.AddItemTransformer(visitor.ProjectionExpression); } - AddSelectClause(TreeBuilder.Select(visitor.GetHqlNodes())); + _hqlTree.AddSelectClause(_hqlTree.TreeBuilder.Select(visitor.GetHqlNodes())); base.VisitSelectClause(selectClause, queryModel); } @@ -257,17 +149,17 @@ public override void VisitWhereClause(WhereClause whereClause, QueryModel queryModel, int index) { // Visit the predicate to build the query - AddWhereClause(HqlGeneratorExpressionTreeVisitor.Visit(whereClause.Predicate, VisitorParameters).AsBooleanExpression()); + _hqlTree.AddWhereClause(HqlGeneratorExpressionTreeVisitor.Visit(whereClause.Predicate, VisitorParameters).AsBooleanExpression()); } public override void VisitOrderByClause(OrderByClause orderByClause, QueryModel queryModel, int index) { foreach (Ordering clause in orderByClause.Orderings) { - AddOrderByClause(HqlGeneratorExpressionTreeVisitor.Visit(clause.Expression, VisitorParameters).AsExpression(), + _hqlTree.AddOrderByClause(HqlGeneratorExpressionTreeVisitor.Visit(clause.Expression, VisitorParameters).AsExpression(), clause.OrderingDirection == OrderingDirection.Asc - ? TreeBuilder.Ascending() - : (HqlDirectionStatement) TreeBuilder.Descending()); + ? _hqlTree.TreeBuilder.Ascending() + : (HqlDirectionStatement) _hqlTree.TreeBuilder.Descending()); } } @@ -276,10 +168,10 @@ var equalityVisitor = new EqualityHqlGenerator(VisitorParameters); var whereClause = equalityVisitor.Visit(joinClause.InnerKeySelector, joinClause.OuterKeySelector); - AddWhereClause(whereClause); + _hqlTree.AddWhereClause(whereClause); - AddFromClause(TreeBuilder.Range(HqlGeneratorExpressionTreeVisitor.Visit(joinClause.InnerSequence, VisitorParameters), - TreeBuilder.Alias(joinClause.ItemName))); + _hqlTree.AddFromClause(_hqlTree.TreeBuilder.Range(HqlGeneratorExpressionTreeVisitor.Visit(joinClause.InnerSequence, VisitorParameters), + _hqlTree.TreeBuilder.Alias(joinClause.ItemName))); } public override void VisitAdditionalFromClause(AdditionalFromClause fromClause, QueryModel queryModel, int index) @@ -287,9 +179,9 @@ if (fromClause is LeftJoinClause) { // It's a left join - AddFromClause(TreeBuilder.LeftJoin( + _hqlTree.AddFromClause(_hqlTree.TreeBuilder.LeftJoin( HqlGeneratorExpressionTreeVisitor.Visit(fromClause.FromExpression, VisitorParameters).AsExpression(), - TreeBuilder.Alias(fromClause.ItemName))); + _hqlTree.TreeBuilder.Alias(fromClause.ItemName))); } else if (fromClause.FromExpression is MemberExpression) { @@ -298,9 +190,9 @@ if (member.Expression is QuerySourceReferenceExpression) { // It's a join - AddFromClause(TreeBuilder.Join( + _hqlTree.AddFromClause(_hqlTree.TreeBuilder.Join( HqlGeneratorExpressionTreeVisitor.Visit(fromClause.FromExpression, VisitorParameters).AsExpression(), - TreeBuilder.Alias(fromClause.ItemName))); + _hqlTree.TreeBuilder.Alias(fromClause.ItemName))); } else { @@ -311,9 +203,9 @@ else { // TODO - exact same code as in MainFromClause; refactor this out - AddFromClause(TreeBuilder.Range( + _hqlTree.AddFromClause(_hqlTree.TreeBuilder.Range( HqlGeneratorExpressionTreeVisitor.Visit(fromClause.FromExpression, VisitorParameters), - TreeBuilder.Alias(fromClause.ItemName))); + _hqlTree.TreeBuilder.Alias(fromClause.ItemName))); } Added: trunk/nhibernate/src/NHibernate/Linq/Visitors/QuerySourceLocator.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/QuerySourceLocator.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/QuerySourceLocator.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -0,0 +1,37 @@ +using Remotion.Data.Linq; +using Remotion.Data.Linq.Clauses; + +namespace NHibernate.Linq.Visitors +{ + public class QuerySourceLocator : QueryModelVisitorBase + { + private readonly System.Type _type; + private IQuerySource _querySource; + + private QuerySourceLocator(System.Type type) + { + _type = type; + } + + public static IQuerySource FindQuerySource(QueryModel queryModel, System.Type type) + { + var finder = new QuerySourceLocator(type); + + finder.VisitQueryModel(queryModel); + + return finder._querySource; + } + + public override void VisitMainFromClause(MainFromClause fromClause, QueryModel queryModel) + { + if (_type == fromClause.ItemType) + { + _querySource = fromClause; + } + else + { + base.VisitMainFromClause(fromClause, queryModel); + } + } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/IResultOperatorProcessor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/IResultOperatorProcessor.cs 2010-02-24 21:23:13 UTC (rev 4947) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/IResultOperatorProcessor.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -2,6 +2,6 @@ { public interface IResultOperatorProcessor<T> { - ProcessResultOperatorReturn Process(T resultOperator, QueryModelVisitor queryModelVisitor); + void Process(T resultOperator, QueryModelVisitor queryModelVisitor, IntermediateHqlTree tree); } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessAggregate.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessAggregate.cs 2010-02-24 21:23:13 UTC (rev 4947) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessAggregate.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -2,12 +2,13 @@ using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; +using NHibernate.Linq.ResultOperators; namespace NHibernate.Linq.Visitors.ResultOperatorProcessors { public class ProcessAggregate : IResultOperatorProcessor<AggregateResultOperator> { - public ProcessResultOperatorReturn Process(AggregateResultOperator resultOperator, QueryModelVisitor queryModelVisitor) + public void Process(AggregateResultOperator resultOperator, QueryModelVisitor queryModelVisitor, IntermediateHqlTree tree) { var inputType = resultOperator.Accumulator.Parameters[1].Type; var accumulatorType = resultOperator.Accumulator.Parameters[0].Type; @@ -57,7 +58,7 @@ ); } - return new ProcessResultOperatorReturn { ListTransformer = Expression.Lambda(call, inputList) }; + tree.AddListTransformer(Expression.Lambda(call, inputList)); } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessAll.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessAll.cs 2010-02-24 21:23:13 UTC (rev 4947) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessAll.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -5,15 +5,13 @@ { public class ProcessAll : IResultOperatorProcessor<AllResultOperator> { - public ProcessResultOperatorReturn Process(AllResultOperator resultOperator, QueryModelVisitor queryModelVisitor) + public void Process(AllResultOperator resultOperator, QueryModelVisitor queryModelVisitor, IntermediateHqlTree tree) { - return new ProcessResultOperatorReturn - { - WhereClause = queryModelVisitor.TreeBuilder.BooleanNot( + tree.AddWhereClause(tree.TreeBuilder.BooleanNot( HqlGeneratorExpressionTreeVisitor.Visit(resultOperator.Predicate, queryModelVisitor.VisitorParameters). - AsBooleanExpression()), - TreeNode = queryModelVisitor.TreeBuilder.BooleanNot(queryModelVisitor.TreeBuilder.Exists((HqlQuery)queryModelVisitor.Root)) - }; + AsBooleanExpression())); + + tree.SetRoot(tree.TreeBuilder.BooleanNot(tree.TreeBuilder.Exists((HqlQuery) tree.Root))); } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessAny.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessAny.cs 2010-02-24 21:23:13 UTC (rev 4947) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessAny.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -5,12 +5,9 @@ { public class ProcessAny : IResultOperatorProcessor<AnyResultOperator> { - public ProcessResultOperatorReturn Process(AnyResultOperator anyOperator, QueryModelVisitor queryModelVisitor) + public void Process(AnyResultOperator anyOperator, QueryModelVisitor queryModelVisitor, IntermediateHqlTree tree) { - return new ProcessResultOperatorReturn - { - TreeNode = queryModelVisitor.TreeBuilder.Exists((HqlQuery) queryModelVisitor.Root) - }; + tree.SetRoot(tree.TreeBuilder.Exists((HqlQuery) tree.Root)); } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessClientSideSelect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessClientSideSelect.cs 2010-02-24 21:23:13 UTC (rev 4947) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessClientSideSelect.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -7,7 +7,7 @@ { public class ProcessClientSideSelect : IResultOperatorProcessor<ClientSideSelect> { - public ProcessResultOperatorReturn Process(ClientSideSelect resultOperator, QueryModelVisitor queryModelVisitor) + public void Process(ClientSideSelect resultOperator, QueryModelVisitor queryModelVisitor, IntermediateHqlTree tree) { var inputType = resultOperator.SelectClause.Parameters[0].Type; var outputType = resultOperator.SelectClause.Type.GetGenericArguments()[1]; @@ -22,7 +22,7 @@ Expression.Call(selectMethod, inputList, resultOperator.SelectClause)), inputList); - return new ProcessResultOperatorReturn {ListTransformer = lambda}; + tree.AddListTransformer(lambda); } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessContains.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessContains.cs 2010-02-24 21:23:13 UTC (rev 4947) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/ResultOperatorProcessors/ProcessContains.cs 2010-02-26 20:47:09 UTC (rev 4948) @@ -6,30 +6,27 @@ { public class ProcessContains : IResultOperatorProcessor<ContainsResultOperator> { - public ProcessResultOperatorReturn Process(ContainsResultOperator resultOperator, QueryModelVisitor queryModelVisitor) + public void Process(ContainsResultOperator resultOperator, QueryModelVisitor queryModelVisitor, IntermediateHqlTree tree) { var itemExpression = HqlGeneratorExpressionTreeVisitor.Visit(resultOperator.Item, queryModelVisitor.VisitorParameters) .AsExpression(); - var from = GetFromRangeClause(queryModelVisitor.Root); + var from = GetFromRangeClause(tree.Root); var source = from.Children.First(); if (source is HqlParameter) { // This is an "in" style statement - return new ProcessResultOperatorReturn {TreeNode = queryModelVisitor.TreeBuilder.In(itemExpression, source)}; + tree.SetRoot(tree.TreeBuilder.In(itemExpression, source)); } else { // This is an "exists" style statement - return new ProcessResultOperatorReturn - { - ... [truncated message content] |
From: <ste...@us...> - 2010-03-17 15:35:40
|
Revision: 4959 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4959&view=rev Author: steverstrong Date: 2010-03-17 15:35:33 +0000 (Wed, 17 Mar 2010) Log Message: ----------- Added test to drop & recreate nhibernate database Modified Paths: -------------- trunk/nhibernate/default.build trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/TestCase.cs trunk/nhibernate/src/NHibernate.sln Added Paths: ----------- trunk/nhibernate/src/NHibernate.TestDatabaseSetup/ trunk/nhibernate/src/NHibernate.TestDatabaseSetup/App.config trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.build trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2010-03-17 14:18:03 UTC (rev 4958) +++ trunk/nhibernate/default.build 2010-03-17 15:35:33 UTC (rev 4959) @@ -23,6 +23,7 @@ <include name="Iesi.Collections/Iesi.Collections.build" /> <include name="Iesi.Collections.Test/Iesi.Collections.Test.build" /> <include name="NHibernate/NHibernate.build" /> + <include name="NHibernate.TestDatabaseSetup/TestDatabaseSetup.build" /> <include name="NHibernate.ByteCode.LinFu/ByteCode.build" /> <include name="NHibernate.ByteCode.LinFu.Tests/ByteCode.Test.build" /> <include name="NHibernate.ByteCode.Castle/ByteCode.build" /> @@ -35,6 +36,7 @@ </fileset> <fileset id="buildfiles.tests" basedir="src"> + <include name="NHibernate.TestDatabaseSetup/TestDatabaseSetup.build" /> <include name="Iesi.Collections.Test/Iesi.Collections.Test.build" /> <include name="NHibernate.ByteCode.LinFu.Tests/ByteCode.Test.build" /> <include name="NHibernate.ByteCode.Castle.Tests/ByteCode.Test.build" /> Modified: trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/TestCase.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/TestCase.cs 2010-03-17 14:18:03 UTC (rev 4958) +++ trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/TestCase.cs 2010-03-17 15:35:33 UTC (rev 4959) @@ -197,7 +197,6 @@ private void CreateSchema() { - new SchemaExport(cfg).Drop(OutputDdl, true); new SchemaExport(cfg).Create(OutputDdl, true); } Property changes on: trunk/nhibernate/src/NHibernate.TestDatabaseSetup ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: bugtraq:logregex + NH-\d+ Added: trunk/nhibernate/src/NHibernate.TestDatabaseSetup/App.config =================================================================== --- trunk/nhibernate/src/NHibernate.TestDatabaseSetup/App.config (rev 0) +++ trunk/nhibernate/src/NHibernate.TestDatabaseSetup/App.config 2010-03-17 15:35:33 UTC (rev 4959) @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8" ?> +<configuration> + <configSections> + <section name="hibernate-configuration" + type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" /> + </configSections> + + <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> + <session-factory name="NHibernate.TestDatabaseSetup"> + <property name="connection.connection_string"> + Server=(local);initial catalog=nhibernate;Integrated Security=SSPI + </property> + </session-factory> + </hibernate-configuration> +</configuration> \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.build =================================================================== --- trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.build (rev 0) +++ trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.build 2010-03-17 15:35:33 UTC (rev 4959) @@ -0,0 +1,31 @@ +<?xml version="1.0" ?> +<project name="NHibernate.Test" default="build" xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd"> + <property name="root.dir" value="../.." /> + <property name="config.FileName" value="hibernate.cfg.xml" /> + <include buildfile="${root.dir}/build-common/common-project.xml" /> + <target name="init" depends="common.init"> + <property name="assembly.description" value="Test Database Setup for NHibernate." /> + <property name="assembly.is-cls-compliant" value="true" /> + <property name="clover.instrument" value="false" /> + <assemblyfileset id="project.references" basedir="${bin.dir}"> + <include name="System.dll" /> + <include name="System.Core.dll" /> + <include name="System.Data.dll" /> + <include name="NHibernate.dll" /> + <include name="nunit.framework.dll" /> + </assemblyfileset> + <resourcefileset id="project.resources" prefix="NHibernate.Test" dynamicprefix="true"> + <include name="**/*.xml" /> + <exclude name="bin/**/*.xml" /> + </resourcefileset> + </target> + <target name="generate-assemblyinfo" depends="init common.generate-assemblyinfo" /> + <target name="build" depends="init generate-assemblyinfo common.compile-tests"> + + + <if test="${file::exists(config.FileName)}"> + <copy file="hibernate.cfg.xml" tofile="${bin.dir}/hibernate.cfg.xml" /> + </if> + </target> + <target name="test" depends="init build common.run-database-tests" /> +</project> Added: trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs =================================================================== --- trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs 2010-03-17 15:35:33 UTC (rev 4959) @@ -0,0 +1,39 @@ +using System; +using NUnit.Framework; +using Sql=System.Data.SqlClient; + +namespace NHibernate.TeamCity.TestDatabaseSetup +{ + [TestFixture] + public class DatabaseSetup + { + [Test] + public void SetupDatabase() + { + var cfg = new Cfg.Configuration(); + + using (var conn = new Sql.SqlConnection(cfg.Properties["connection.connection_string"])) + { + conn.Open(); + + using (var cmd = new Sql.SqlCommand("use master", conn)) + { + cmd.ExecuteNonQuery(); + + cmd.CommandText = "drop database nhibernate"; + + try + { + cmd.ExecuteNonQuery(); + } + catch(Exception) + { + } + + cmd.CommandText = "create database nhibernate"; + cmd.ExecuteNonQuery(); + } + } + } + } +} Modified: trunk/nhibernate/src/NHibernate.sln =================================================================== --- trunk/nhibernate/src/NHibernate.sln 2010-03-17 14:18:03 UTC (rev 4958) +++ trunk/nhibernate/src/NHibernate.sln 2010-03-17 15:35:33 UTC (rev 4959) @@ -3,6 +3,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{593DCEA7-C933-46F3-939F-D8172399AB05}" ProjectSection(SolutionItems) = preProject ..\default.build = ..\default.build + LocalTestRun.testrunconfig = LocalTestRun.testrunconfig + NHibernate.vsmdi = NHibernate.vsmdi ..\releasenotes.txt = ..\releasenotes.txt EndProjectSection EndProject @@ -22,7 +24,12 @@ EndProject 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.TestDatabaseSetup", "NHibernate.TestDatabaseSetup\NHibernate.TestDatabaseSetup.csproj", "{BEEC1564-6FB6-49F7-BBE5-8EBD2F0F6E8A}" +EndProject Global + GlobalSection(TestCaseManagementSettings) = postSolution + CategoryFile = NHibernate.vsmdi + EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU @@ -60,6 +67,10 @@ {4972EE96-2417-4D47-9FF1-3B1D6B1D3191}.Debug|Any CPU.Build.0 = Debug|Any CPU {4972EE96-2417-4D47-9FF1-3B1D6B1D3191}.Release|Any CPU.ActiveCfg = Release|Any CPU {4972EE96-2417-4D47-9FF1-3B1D6B1D3191}.Release|Any CPU.Build.0 = Release|Any CPU + {BEEC1564-6FB6-49F7-BBE5-8EBD2F0F6E8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BEEC1564-6FB6-49F7-BBE5-8EBD2F0F6E8A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BEEC1564-6FB6-49F7-BBE5-8EBD2F0F6E8A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BEEC1564-6FB6-49F7-BBE5-8EBD2F0F6E8A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2010-03-17 16:26:40
|
Revision: 4960 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4960&view=rev Author: steverstrong Date: 2010-03-17 16:26:33 +0000 (Wed, 17 Mar 2010) Log Message: ----------- Fixed TestDatabaseSetup.build file Modified Paths: -------------- trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.build trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs Added Paths: ----------- trunk/nhibernate/src/NHibernate.TestDatabaseSetup/NHibernate.TestDatabaseSetup.csproj Property Changed: ---------------- trunk/nhibernate/ trunk/nhibernate/lib/net/3.5/ trunk/nhibernate/src/ trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/ trunk/nhibernate/src/NHibernate.TestDatabaseSetup/ Property changes on: trunk/nhibernate ___________________________________________________________________ Modified: svn:ignore - build + build output build.old Property changes on: trunk/nhibernate/lib/net/3.5 ___________________________________________________________________ Modified: svn:ignore - NHibernate.dll + NHibernate.dll Remotion.Data.Linq.pdb Property changes on: trunk/nhibernate/src ___________________________________________________________________ Modified: svn:ignore - *.suo CloverSrc _ReSharper* *.resharperoptions *.resharper.user CloverBuild Ankh.Load *.resharper ConsoleTest _UpgradeReport_Files NHibernate.userprefs NHibernate.usertasks UpgradeLog.XML UpgradeLog2.XML UpgradeLog3.XML UpgradeLog4.XML UpgradeLog5.XML UpgradeLog6.XML UpgradeLog7.XML UpgradeLog8.XML UpgradeLog9.XML NHibernate.sln.proj NHibernate.sln.AssemblySurfaceCache.user NHibernate.sln.cache .git .gitignore NHibernate.5.0.ReSharper.user + *.suo CloverSrc _ReSharper* *.resharperoptions *.resharper.user CloverBuild Ankh.Load *.resharper ConsoleTest _UpgradeReport_Files NHibernate.userprefs NHibernate.usertasks UpgradeLog.XML UpgradeLog2.XML UpgradeLog3.XML UpgradeLog4.XML UpgradeLog5.XML UpgradeLog6.XML UpgradeLog7.XML UpgradeLog8.XML UpgradeLog9.XML NHibernate.sln.proj NHibernate.sln.AssemblySurfaceCache.user NHibernate.sln.cache .git .gitignore NHibernate.5.0.ReSharper.user LocalTestRun.testrunconfig Property changes on: trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests ___________________________________________________________________ Modified: svn:ignore - obj .#* *.user *.xsx AssemblyInfo.cs hibernate.cfg.xml *.aps *.eto [Bb]in [Dd]ebug [Rr]elease *resharper* *.xml + *.aps *.eto *.user *.xml *.xsx *resharper* .#* AssemblyInfo.cs [Bb]in [Dd]ebug [Rr]elease bin hibernate.cfg.xml obj Property changes on: trunk/nhibernate/src/NHibernate.TestDatabaseSetup ___________________________________________________________________ Added: svn:ignore + AssemblyInfo.cs bin obj Added: trunk/nhibernate/src/NHibernate.TestDatabaseSetup/NHibernate.TestDatabaseSetup.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.TestDatabaseSetup/NHibernate.TestDatabaseSetup.csproj (rev 0) +++ trunk/nhibernate/src/NHibernate.TestDatabaseSetup/NHibernate.TestDatabaseSetup.csproj 2010-03-17 16:26:33 UTC (rev 4960) @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>9.0.30729</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{BEEC1564-6FB6-49F7-BBE5-8EBD2F0F6E8A}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>NHibernate.TestDatabaseSetup</RootNamespace> + <AssemblyName>NHibernate.TestDatabaseSetup</AssemblyName> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <StartupObject> + </StartupObject> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="nunit.framework, Version=2.5.0.9122, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\lib\net\3.5\nunit.framework.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> + <Reference Include="System.Data" /> + </ItemGroup> + <ItemGroup> + <Compile Include="TestDatabaseSetup.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + <None Include="TestDatabaseSetup.build" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\NHibernate\NHibernate.csproj"> + <Project>{5909BFE7-93CF-4E5F-BE22-6293368AF01D}</Project> + <Name>NHibernate</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Folder Include="Properties\" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.build =================================================================== --- trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.build 2010-03-17 15:35:33 UTC (rev 4959) +++ trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.build 2010-03-17 16:26:33 UTC (rev 4960) @@ -1,5 +1,5 @@ <?xml version="1.0" ?> -<project name="NHibernate.Test" default="build" xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd"> +<project name="NHibernate.TestDatabaseSetup" default="build" xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd"> <property name="root.dir" value="../.." /> <property name="config.FileName" value="hibernate.cfg.xml" /> <include buildfile="${root.dir}/build-common/common-project.xml" /> @@ -14,15 +14,9 @@ <include name="NHibernate.dll" /> <include name="nunit.framework.dll" /> </assemblyfileset> - <resourcefileset id="project.resources" prefix="NHibernate.Test" dynamicprefix="true"> - <include name="**/*.xml" /> - <exclude name="bin/**/*.xml" /> - </resourcefileset> </target> <target name="generate-assemblyinfo" depends="init common.generate-assemblyinfo" /> <target name="build" depends="init generate-assemblyinfo common.compile-tests"> - - <if test="${file::exists(config.FileName)}"> <copy file="hibernate.cfg.xml" tofile="${bin.dir}/hibernate.cfg.xml" /> </if> Modified: trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs =================================================================== --- trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs 2010-03-17 15:35:33 UTC (rev 4959) +++ trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs 2010-03-17 16:26:33 UTC (rev 4960) @@ -1,8 +1,8 @@ using System; using NUnit.Framework; -using Sql=System.Data.SqlClient; +using System.Data.SqlClient; -namespace NHibernate.TeamCity.TestDatabaseSetup +namespace NHibernate.TestDatabaseSetup { [TestFixture] public class DatabaseSetup @@ -12,11 +12,11 @@ { var cfg = new Cfg.Configuration(); - using (var conn = new Sql.SqlConnection(cfg.Properties["connection.connection_string"])) + using (var conn = new SqlConnection(cfg.Properties["connection.connection_string"])) { conn.Open(); - using (var cmd = new Sql.SqlCommand("use master", conn)) + using (var cmd = new System.Data.SqlClient.SqlCommand("use master", conn)) { cmd.ExecuteNonQuery(); @@ -37,3 +37,5 @@ } } } + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |