You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(248) |
May
(82) |
Jun
(90) |
Jul
(177) |
Aug
(253) |
Sep
(157) |
Oct
(151) |
Nov
(143) |
Dec
(278) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(152) |
Feb
(107) |
Mar
(177) |
Apr
(133) |
May
(259) |
Jun
(81) |
Jul
(119) |
Aug
(306) |
Sep
(416) |
Oct
(240) |
Nov
(329) |
Dec
(206) |
2006 |
Jan
(466) |
Feb
(382) |
Mar
(153) |
Apr
(162) |
May
(133) |
Jun
(21) |
Jul
(18) |
Aug
(37) |
Sep
(97) |
Oct
(114) |
Nov
(110) |
Dec
(28) |
2007 |
Jan
(74) |
Feb
(65) |
Mar
(49) |
Apr
(76) |
May
(43) |
Jun
(15) |
Jul
(68) |
Aug
(55) |
Sep
(63) |
Oct
(59) |
Nov
(70) |
Dec
(66) |
2008 |
Jan
(71) |
Feb
(60) |
Mar
(120) |
Apr
(31) |
May
(48) |
Jun
(81) |
Jul
(107) |
Aug
(51) |
Sep
(80) |
Oct
(83) |
Nov
(83) |
Dec
(79) |
2009 |
Jan
(83) |
Feb
(110) |
Mar
(97) |
Apr
(91) |
May
(291) |
Jun
(250) |
Jul
(197) |
Aug
(58) |
Sep
(54) |
Oct
(122) |
Nov
(68) |
Dec
(34) |
2010 |
Jan
(50) |
Feb
(17) |
Mar
(63) |
Apr
(61) |
May
(84) |
Jun
(81) |
Jul
(138) |
Aug
(144) |
Sep
(78) |
Oct
(26) |
Nov
(30) |
Dec
(61) |
2011 |
Jan
(33) |
Feb
(35) |
Mar
(166) |
Apr
(221) |
May
(109) |
Jun
(76) |
Jul
(27) |
Aug
(37) |
Sep
(1) |
Oct
(4) |
Nov
(2) |
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
(1) |
2014 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <fab...@us...> - 2009-03-17 19:16:14
|
Revision: 4143 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4143&view=rev Author: fabiomaulo Date: 2009-03-17 19:16:01 +0000 (Tue, 17 Mar 2009) Log Message: ----------- Minor (reformatted) Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/Stateless/StatelessSessionFixture.cs Modified: trunk/nhibernate/src/NHibernate.Test/Stateless/StatelessSessionFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Stateless/StatelessSessionFixture.cs 2009-03-17 16:51:43 UTC (rev 4142) +++ trunk/nhibernate/src/NHibernate.Test/Stateless/StatelessSessionFixture.cs 2009-03-17 19:16:01 UTC (rev 4143) @@ -1,11 +1,6 @@ using System; using System.Collections; using System.Threading; -using NHibernate.Cfg; -using NHibernate.Engine; -using NHibernate.SqlCommand; -using NHibernate.SqlTypes; -using NHibernate.Type; using NUnit.Framework; namespace NHibernate.Test.Stateless @@ -20,7 +15,7 @@ protected override IList Mappings { - get { return new string[] { "Stateless.Document.hbm.xml" }; } + get { return new[] {"Stateless.Document.hbm.xml"}; } } protected override void OnTearDown() @@ -56,7 +51,7 @@ doc.Text = "blah blah blah .... blah"; ss.Update(doc); Assert.IsTrue(doc.LastModified.HasValue); - Assert.AreNotEqual(initVersion, doc.LastModified); + Assert.AreNotEqual(initVersion, doc.LastModified); tx.Commit(); } using (tx = ss.BeginTransaction()) @@ -65,15 +60,15 @@ ss.Update(doc); tx.Commit(); } - Document doc2 = (Document)ss.Get<Document>("Blahs"); + var doc2 = ss.Get<Document>("Blahs"); Assert.AreEqual("Blahs", doc2.Name); Assert.AreEqual(doc.Text, doc2.Text); - doc2 = (Document)ss.CreateQuery("from Document where text is not null").UniqueResult(); + doc2 = (Document) ss.CreateQuery("from Document where text is not null").UniqueResult(); Assert.AreEqual("Blahs", doc2.Name); Assert.AreEqual(doc.Text, doc2.Text); - doc2 = (Document)ss.CreateSQLQuery("select * from Document").AddEntity(typeof(Document)).UniqueResult(); + doc2 = (Document) ss.CreateSQLQuery("select * from Document").AddEntity(typeof (Document)).UniqueResult(); Assert.AreEqual("Blahs", doc2.Name); Assert.AreEqual(doc.Text, doc2.Text); @@ -81,7 +76,7 @@ Assert.AreEqual("Blahs", doc2.Name); Assert.AreEqual(doc.Text, doc2.Text); - doc2 = (Document)ss.CreateCriteria(typeof(Document)).UniqueResult(); + doc2 = (Document) ss.CreateCriteria(typeof (Document)).UniqueResult(); Assert.AreEqual("Blahs", doc2.Name); Assert.AreEqual(doc.Text, doc2.Text); @@ -98,22 +93,18 @@ { IStatelessSession ss = sessions.OpenStatelessSession(); ITransaction tx = ss.BeginTransaction(); - Document doc = new Document("blah blah blah", "Blahs"); + var doc = new Document("blah blah blah", "Blahs"); ss.Insert(doc); - Paper paper = new Paper(); - paper.Color = "White"; + var paper = new Paper {Color = "White"}; ss.Insert(paper); tx.Commit(); tx = ss.BeginTransaction(); - int count = ss.CreateQuery("update Document set name = :newName where name = :oldName") - .SetString("newName", "Foos") - .SetString("oldName", "Blahs") - .ExecuteUpdate(); + int count = + ss.CreateQuery("update Document set name = :newName where name = :oldName").SetString("newName", "Foos").SetString( + "oldName", "Blahs").ExecuteUpdate(); Assert.AreEqual(1, count, "hql-delete on stateless session"); - count = ss.CreateQuery("update Paper set color = :newColor") - .SetString("newColor", "Goldenrod") - .ExecuteUpdate(); + count = ss.CreateQuery("update Paper set color = :newColor").SetString("newColor", "Goldenrod").ExecuteUpdate(); Assert.AreEqual(1, count, "hql-delete on stateless session"); tx.Commit(); @@ -136,8 +127,7 @@ ITransaction tx; using (tx = ss.BeginTransaction()) { - paper = new Paper(); - paper.Color = "White"; + paper = new Paper {Color = "White"}; ss.Insert(paper); Assert.IsTrue(paper.Id != 0); tx.Commit(); @@ -156,30 +146,35 @@ Paper paper; using (IStatelessSession ss = sessions.OpenStatelessSession()) - using (ITransaction tx = ss.BeginTransaction()) { - paper = new Paper(); - paper.Color = "whtie"; - ss.Insert(paper); - tx.Commit(); + using (ITransaction tx = ss.BeginTransaction()) + { + paper = new Paper {Color = "whtie"}; + ss.Insert(paper); + tx.Commit(); + } } using (IStatelessSession ss = sessions.OpenStatelessSession()) - using (ITransaction tx = ss.BeginTransaction()) { - Paper p2 = ss.Get<Paper>(paper.Id); - p2.Color = "White"; - ss.Update(p2); - tx.Commit(); + using (ITransaction tx = ss.BeginTransaction()) + { + var p2 = ss.Get<Paper>(paper.Id); + p2.Color = "White"; + ss.Update(p2); + tx.Commit(); + } } using (IStatelessSession ss = sessions.OpenStatelessSession()) - using (ITransaction tx = ss.BeginTransaction()) { - Assert.AreEqual("whtie", paper.Color); - ss.Refresh(paper); - Assert.AreEqual("White", paper.Color); - ss.Delete(paper); - tx.Commit(); + using (ITransaction tx = ss.BeginTransaction()) + { + Assert.AreEqual("whtie", paper.Color); + ss.Refresh(paper); + Assert.AreEqual("White", paper.Color); + ss.Delete(paper); + tx.Commit(); + } } } } -} +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-17 16:51:58
|
Revision: 4142 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4142&view=rev Author: fabiomaulo Date: 2009-03-17 16:51:43 +0000 (Tue, 17 Mar 2009) Log Message: ----------- Fix NH-1671 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Util/SoftLimitMRUCache.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/UtilityTest/SoftLimitMRUCacheFixture.cs Modified: trunk/nhibernate/src/NHibernate/Util/SoftLimitMRUCache.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Util/SoftLimitMRUCache.cs 2009-03-17 05:01:00 UTC (rev 4141) +++ trunk/nhibernate/src/NHibernate/Util/SoftLimitMRUCache.cs 2009-03-17 16:51:43 UTC (rev 4142) @@ -32,8 +32,8 @@ // actual cache of the entries. soft references are used for both the keys and the // values here since the values pertaining to the MRU entries are kept in a // separate hard reference cache (to avoid their enqueuement/garbage-collection). - [NonSerialized] - private readonly IDictionary softReferenceCache = new Hashtable(); + [NonSerialized] + private readonly IDictionary softReferenceCache = new WeakHashtable(); // the MRU cache used to keep hard references to the most recently used query plans; // note : LRU here is a bit of a misnomer, it indicates that LRU entries are removed, the Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-17 05:01:00 UTC (rev 4141) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-17 16:51:43 UTC (rev 4142) @@ -1113,6 +1113,7 @@ <Compile Include="UtilityTest\SafetyEnumerableFixture.cs" /> <Compile Include="UtilityTest\SequencedHashMapFixture.cs" /> <Compile Include="UtilityTest\SingletonEnumerableFixture.cs" /> + <Compile Include="UtilityTest\SoftLimitMRUCacheFixture.cs" /> <Compile Include="UtilityTest\StringHelperFixture.cs" /> <Compile Include="UtilityTest\StringTokenizerFixture.cs" /> <Compile Include="UtilityTest\ThreadSafeDictionaryFixture.cs" /> Added: trunk/nhibernate/src/NHibernate.Test/UtilityTest/SoftLimitMRUCacheFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/UtilityTest/SoftLimitMRUCacheFixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/UtilityTest/SoftLimitMRUCacheFixture.cs 2009-03-17 16:51:43 UTC (rev 4142) @@ -0,0 +1,29 @@ +using System; +using NHibernate.Util; +using NUnit.Framework; +using NUnit.Framework.SyntaxHelpers; + +namespace NHibernate.Test.UtilityTest +{ + [TestFixture] + public class SoftLimitMRUCacheFixture + { + [Test] + public void DontFillUp() + { + // NH-1671 + const int count = 32; + var s = new SoftLimitMRUCache(count); + for (int i = 0; i < count+10; i++) + { + s.Put(new object(), new object()); + } + Assert.That(s.Count, Is.EqualTo(count)); + + GC.Collect(); + s.Put(new object(), new object()); + + Assert.That(s.SoftCount, Is.EqualTo(count + 1)); + } + } +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-17 05:01:18
|
Revision: 4141 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4141&view=rev Author: fabiomaulo Date: 2009-03-17 05:01:00 +0000 (Tue, 17 Mar 2009) Log Message: ----------- Fix NH-1707 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs 2009-03-17 04:25:45 UTC (rev 4140) +++ trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs 2009-03-17 05:01:00 UTC (rev 4141) @@ -138,7 +138,7 @@ RegisterKeyword("top"); DefaultProperties[Environment.ConnectionDriver] = "NHibernate.Driver.SqlClientDriver"; - DefaultProperties[Environment.PrepareSql] = "false"; + DefaultProperties[Environment.PrepareSql] = "true"; } /// <summary></summary> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-17 04:26:03
|
Revision: 4140 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4140&view=rev Author: fabiomaulo Date: 2009-03-17 04:25:45 +0000 (Tue, 17 Mar 2009) Log Message: ----------- To version in working Modified Paths: -------------- trunk/nhibernate/build-common/common.xml Modified: trunk/nhibernate/build-common/common.xml =================================================================== --- trunk/nhibernate/build-common/common.xml 2009-03-16 16:27:01 UTC (rev 4139) +++ trunk/nhibernate/build-common/common.xml 2009-03-17 04:25:45 UTC (rev 4140) @@ -76,7 +76,7 @@ effectively SP0). --> - <property name="project.version" value="2.1.0.Alpha1" overwrite="false" /> + <property name="project.version" value="2.1.0.Alpha2" overwrite="false" /> <!-- Compute short project version (major.minor) using a regex --> <regex input="${project.version}" pattern="^(?'shortversion'\d+\.\d+)" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-16 16:27:12
|
Revision: 4139 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4139&view=rev Author: fabiomaulo Date: 2009-03-16 16:27:01 +0000 (Mon, 16 Mar 2009) Log Message: ----------- Fix NH-1222 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/Hbm.generated.cs trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs trunk/nhibernate/src/NHibernate/NHibernate.csproj trunk/nhibernate/src/NHibernate/nhibernate-mapping.xsd trunk/nhibernate/src/NHibernate.Test/Join/Employee.cs trunk/nhibernate/src/NHibernate.Test/Join/JoinTest.cs trunk/nhibernate/src/NHibernate.Test/Join/Person.cs trunk/nhibernate/src/NHibernate.Test/Join/Person.hbm.xml trunk/nhibernate/src/NHibernate.Tool.HbmXsd/Program.cs Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/Hbm.generated.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/Hbm.generated.cs 2009-03-15 16:55:08 UTC (rev 4138) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/Hbm.generated.cs 2009-03-16 16:27:01 UTC (rev 4139) @@ -3780,10 +3780,17 @@ /// <remarks/> [System.Xml.Serialization.XmlElementAttribute("any", typeof(HbmAny))] + [System.Xml.Serialization.XmlElementAttribute("array", typeof(HbmArray))] + [System.Xml.Serialization.XmlElementAttribute("bag", typeof(HbmBag))] [System.Xml.Serialization.XmlElementAttribute("component", typeof(HbmComponent))] [System.Xml.Serialization.XmlElementAttribute("dynamic-component", typeof(HbmDynamicComponent))] + [System.Xml.Serialization.XmlElementAttribute("idbag", typeof(HbmIdbag))] + [System.Xml.Serialization.XmlElementAttribute("list", typeof(HbmList))] [System.Xml.Serialization.XmlElementAttribute("many-to-one", typeof(HbmManyToOne))] + [System.Xml.Serialization.XmlElementAttribute("map", typeof(HbmMap))] + [System.Xml.Serialization.XmlElementAttribute("primitive-array", typeof(HbmPrimitiveArray))] [System.Xml.Serialization.XmlElementAttribute("property", typeof(HbmProperty))] + [System.Xml.Serialization.XmlElementAttribute("set", typeof(HbmSet))] public object[] Items; /// <remarks/> Modified: trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs 2009-03-15 16:55:08 UTC (rev 4138) +++ trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs 2009-03-16 16:27:01 UTC (rev 4139) @@ -348,28 +348,40 @@ string propertyName = nameAttribute == null ? null : nameAttribute.Value; IValue value = null; - switch (name) + var collectionBinder = new CollectionBinder(this); + if (collectionBinder.CanCreate(name)) { - case "many-to-one": - value = new ManyToOne(table); - BindManyToOne(subnode, (ManyToOne) value, propertyName, true); - break; - case "any": - value = new Any(table); - BindAny(subnode, (Any) value, true); - break; - case "property": - value = new SimpleValue(table); - BindSimpleValue(subnode, (SimpleValue) value, true, propertyName); - break; - case "component": - case "dynamic-component": - string subpath = StringHelper.Qualify(path, propertyName); - value = new Component(join); - BindComponent(subnode, (Component) value, join.PersistentClass.MappedClass, join.PersistentClass.ClassName, propertyName, subpath, true); - break; + Mapping.Collection collection = collectionBinder.Create(name, subnode, persistentClass.EntityName, + propertyName, persistentClass, persistentClass.MappedClass); + + mappings.AddCollection(collection); + value = collection; } - + else + { + switch (name) + { + case "many-to-one": + value = new ManyToOne(table); + BindManyToOne(subnode, (ManyToOne) value, propertyName, true); + break; + case "any": + value = new Any(table); + BindAny(subnode, (Any) value, true); + break; + case "property": + value = new SimpleValue(table); + BindSimpleValue(subnode, (SimpleValue) value, true, propertyName); + break; + case "component": + case "dynamic-component": + string subpath = StringHelper.Qualify(path, propertyName); + value = new Component(join); + BindComponent(subnode, (Component) value, join.PersistentClass.MappedClass, join.PersistentClass.ClassName, + propertyName, subpath, true); + break; + } + } if (value != null) { Mapping.Property prop = CreateProperty(value, propertyName, persistentClass.MappedClass.AssemblyQualifiedName, subnode); Modified: trunk/nhibernate/src/NHibernate/NHibernate.csproj =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-03-15 16:55:08 UTC (rev 4138) +++ trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-03-16 16:27:01 UTC (rev 4139) @@ -1149,16 +1149,10 @@ <SubType> </SubType> </EmbeddedResource> - <None Include="nhibernate-configuration.xsx"> - <DependentUpon>nhibernate-configuration.xsd</DependentUpon> - </None> <EmbeddedResource Include="nhibernate-mapping.xsd"> <SubType> </SubType> </EmbeddedResource> - <None Include="nhibernate-mapping.xsx"> - <DependentUpon>nhibernate-mapping.xsd</DependentUpon> - </None> <None Include="NHibernate.build" /> <None Include="Type\IType.cs.xmldoc" /> </ItemGroup> Modified: trunk/nhibernate/src/NHibernate/nhibernate-mapping.xsd =================================================================== --- trunk/nhibernate/src/NHibernate/nhibernate-mapping.xsd 2009-03-15 16:55:08 UTC (rev 4138) +++ trunk/nhibernate/src/NHibernate/nhibernate-mapping.xsd 2009-03-16 16:27:01 UTC (rev 4139) @@ -616,6 +616,13 @@ <xs:element ref="component" /> <xs:element ref="dynamic-component" /> <xs:element ref="any" /> + <xs:element ref="map" /> + <xs:element ref="set" /> + <xs:element ref="list" /> + <xs:element ref="bag" /> + <xs:element ref="idbag" /> + <xs:element ref="array" /> + <xs:element ref="primitive-array" /> </xs:choice> <xs:element ref="sql-insert" minOccurs="0" /> <xs:element ref="sql-update" minOccurs="0" /> Modified: trunk/nhibernate/src/NHibernate.Test/Join/Employee.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Join/Employee.cs 2009-03-15 16:55:08 UTC (rev 4138) +++ trunk/nhibernate/src/NHibernate.Test/Join/Employee.cs 2009-03-16 16:27:01 UTC (rev 4139) @@ -1,9 +1,14 @@ using System; +using System.Collections.Generic; namespace NHibernate.Test.Join { public class Employee : Person { + public Employee() + { + Meetings = new List<Meeting>(); + } private string _Title; public virtual string Title { @@ -25,5 +30,13 @@ set { _Salary = value; } } + public virtual IList<Meeting> Meetings { get; set; } } + + public class Meeting + { + public virtual int Id { get; set; } + public virtual Employee Employee { get; set; } + public virtual string Description { get; set; } + } } Modified: trunk/nhibernate/src/NHibernate.Test/Join/JoinTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Join/JoinTest.cs 2009-03-15 16:55:08 UTC (rev 4138) +++ trunk/nhibernate/src/NHibernate.Test/Join/JoinTest.cs 2009-03-16 16:27:01 UTC (rev 4139) @@ -1,3 +1,4 @@ +using Iesi.Collections.Generic; using log4net; using NHibernate.Criterion; using NUnit.Framework; @@ -154,7 +155,7 @@ Person p = CreatePerson("A guy"); p.HomePhone = null; p.BusinessPhone = null; - + p.OthersPhones = null; s.Save(p); s.Flush(); s.Clear(); @@ -295,7 +296,7 @@ p.Country = "Canada"; p.HomePhone = "555-1234"; p.BusinessPhone = "555-4321"; - + p.OthersPhones = new HashedSet<string> {"555-9876", "555-6789"}; return p; } @@ -308,7 +309,10 @@ if (!string.Equals(x.Country, y.Country)) return false; if (!string.Equals(x.HomePhone, y.HomePhone)) return false; if (!string.Equals(x.BusinessPhone, y.BusinessPhone)) return false; - + if(x.OthersPhones.Count != y.OthersPhones.Count) + { + return false; + } return true; } @@ -399,7 +403,8 @@ p.Title = title; p.Salary = 100; - + p.Meetings.Add(new Meeting {Employee = p, Description = "salary definition"}); + p.Meetings.Add(new Meeting { Employee = p, Description = "targets definition" }); return p; } @@ -475,7 +480,7 @@ if (!PersonsAreEqual(x, y)) return false; if (!string.Equals(x.Title, y.Title)) return false; if (x.Salary != y.Salary) return false; - + if (x.Meetings.Count != y.Meetings.Count) return false; if (x.Manager != null && y.Manager != null) { return x.Manager.Id == y.Manager.Id; @@ -509,6 +514,9 @@ emp0.Salary = 20000; emp0.Title = "Title"; emp0.Zip = "Zip"; + NHibernateUtil.Initialize(emp0.Meetings); + NHibernateUtil.Initialize(emp0.OthersPhones); + emp0.Meetings.Add(new Meeting { Employee = emp0, Description = "vacation def" }); // Not updating emp0.Sex because it is marked update=false in the mapping file. s.Flush(); Modified: trunk/nhibernate/src/NHibernate.Test/Join/Person.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Join/Person.cs 2009-03-15 16:55:08 UTC (rev 4138) +++ trunk/nhibernate/src/NHibernate.Test/Join/Person.cs 2009-03-16 16:27:01 UTC (rev 4139) @@ -1,9 +1,14 @@ using System; +using Iesi.Collections.Generic; namespace NHibernate.Test.Join { public class Person { + public Person() + { + OthersPhones = new HashedSet<string>(); + } private char _Sex; public virtual char Sex { @@ -67,5 +72,6 @@ set { _StuffName = value; } } + public virtual ISet<string> OthersPhones { get; set; } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/Join/Person.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Join/Person.hbm.xml 2009-03-15 16:55:08 UTC (rev 4138) +++ trunk/nhibernate/src/NHibernate.Test/Join/Person.hbm.xml 2009-03-16 16:27:01 UTC (rev 4139) @@ -27,6 +27,10 @@ <key column="phone_id"/> <property name="HomePhone"/> <property name="BusinessPhone"/> + <set name="OthersPhones" cascade="all" access="property"> + <key column="phone_id"/> + <element column="phone" type="string" length="20"/> + </set> </join> <join table="inversed_stuff" inverse="true"> @@ -40,6 +44,10 @@ <property name="Title" not-null="true" length="20"/> <property name="Salary"/> <many-to-one name="Manager"/> + <bag name="Meetings" cascade="all" inverse="true" access="property"> + <key column="person_id" on-delete="cascade"/> + <one-to-many class="Meeting"/> + </bag> </join> </subclass> @@ -62,5 +70,12 @@ </join> </subclass> </class> - + + <class name="Meeting"> + <id name="Id" access="property"> + <generator class="native"/> + </id> + <many-to-one name="Employee" column="person_id" access="property"/> + <property name="Description" length="100" access="property"/> + </class> </hibernate-mapping> \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Tool.HbmXsd/Program.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Tool.HbmXsd/Program.cs 2009-03-15 16:55:08 UTC (rev 4138) +++ trunk/nhibernate/src/NHibernate.Tool.HbmXsd/Program.cs 2009-03-16 16:27:01 UTC (rev 4139) @@ -1,17 +1,11 @@ -using System; - namespace NHibernate.Tool.HbmXsd { public class Program { private static void Main(string[] args) { - // For debugging: ..\..\..\NHibernate\Cfg\MappingSchema\Hbm.generated.cs - - if (args.Length == 1) - new HbmCodeGenerator().Execute(args[0]); - else - Console.WriteLine("usage: HbmXsd <outputfile>"); + string outFile = args.Length == 0 ? @"..\..\..\NHibernate\Cfg\MappingSchema\Hbm.generated.cs" : args[0]; + new HbmCodeGenerator().Execute(outFile); } } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dar...@us...> - 2009-03-15 16:56:16
|
Revision: 4138 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4138&view=rev Author: darioquintana Date: 2009-03-15 16:55:08 +0000 (Sun, 15 Mar 2009) Log Message: ----------- minor Modified Paths: -------------- trunk/nhibernate/releasenotes.txt Modified: trunk/nhibernate/releasenotes.txt =================================================================== --- trunk/nhibernate/releasenotes.txt 2009-03-15 13:08:54 UTC (rev 4137) +++ trunk/nhibernate/releasenotes.txt 2009-03-15 16:55:08 UTC (rev 4138) @@ -19,6 +19,7 @@ ##### Breaking Changes ##### * see NH-1633 if you are using SQL native queries + * see NH-1657 if you are using 'TimeSpan' NH type. Build 2.1.0.Alpha1 ======================== This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-15 13:09:05
|
Revision: 4137 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4137&view=rev Author: fabiomaulo Date: 2009-03-15 13:08:54 +0000 (Sun, 15 Mar 2009) Log Message: ----------- Actualized for NH2.1.0Alpha1 release Modified Paths: -------------- trunk/nhibernate/releasenotes.txt Modified: trunk/nhibernate/releasenotes.txt =================================================================== --- trunk/nhibernate/releasenotes.txt 2009-03-14 22:43:23 UTC (rev 4136) +++ trunk/nhibernate/releasenotes.txt 2009-03-15 13:08:54 UTC (rev 4137) @@ -20,7 +20,197 @@ ##### Breaking Changes ##### * see NH-1633 if you are using SQL native queries +Build 2.1.0.Alpha1 +======================== +** Sub-task + * [NH-1379] - Allow <typedef> for version custom type + * [NH-1649] - DateTime2 and DateTimeOffset data types support + * [NH-1650] - FileStream data type support + * [NH-1656] - Date and Time data types support + +** Bug + * [NH-1083] - When using a proxy with an interface access strategy on the Id does not get applied + * [NH-1177] - Save/Delete/Evict/Save does not work if collections are mapped + * [NH-1197] - Some tests related to paged subselect are failing under PostgreSQL + * [NH-1251] - TypeFactory.GetSerializableType race condition + * [NH-1253] - Named paramaters with numeric suffix may cause problems + * [NH-1297] - <idbag> with native ID generator throws InvalidCastException + * [NH-1329] - Expression.Sql with parameters (inside of functions) is broken + * [NH-1345] - PersistentGenericList.GetEnumerator missing Read + * [NH-1357] - ICriteria.ClearOrders is mispelled and belongs on DetachedCriteria too + * [NH-1358] - SchemaUpdate fails for Firebird in released binaries only - NHibernate source and local builds from this source work fine + * [NH-1385] - System.Collections.Generic.KeyNotFoundException exception in PersistentGenericMap.GetDeletes() + * [NH-1395] - Unsaved value null for ValueType + * [NH-1422] - incorrect parameter replacement when one variable is the prefix of another + * [NH-1443] - default_catalog is not used in create table + * [NH-1445] - CriteriaImpl.Clone does not propertly maintain the persistentClass + * [NH-1446] - cast case sensitivity + * [NH-1447] - boolean ConstantProjection fails with MSSQL2005 + * [NH-1480] - SchemaUpdate & Oracle + * [NH-1495] - using access=field.camelcase with interface to create proxy + * [NH-1499] - NullReferenceException construting Criteria query + * [NH-1502] - Order by with projections uses invalid parameter characters + * [NH-1505] - LikeExpression when using projections is invalid + * [NH-1520] - SQLite Dialect does not properly escape names surrounded by backticks + * [NH-1521] - The drop scripts from SchemaExport in SQL2005 dialect will not work when using DefaultSchema setting other than dbo + * [NH-1522] - AdoTransaction.CloseIfRequerid + * [NH-1526] - Cannot use projection for Count in OrderBy + * [NH-1527] - Using projection on order by in conjuction with set max results with parameters passed to the projection will fail + * [NH-1528] - Using order by with a parameter and set max results on 2005 mix up the parameters + * [NH-1549] - Accessing Id of proxy with base class intializes proxy + * [NH-1552] - Paging in NHibernate builds buggy SQL query string, when paging is used against a MS SQL 2005 Database + * [NH-1556] - Cannot order by aggregates in HQL + * [NH-1572] - Small typo in AbstractType.Compare() + * [NH-1573] - "collable" typo in nhibernate-mapping.xsd + * [NH-1578] - The "not" criteria does surround the following or inner criteria with parens only when using MySQLDialect. + * [NH-1584] - one-to-one compositions to a joined subclass don't load + * [NH-1587] - PocoEntityTuplizer don't use ReflectionOptimizer for instantiator + * [NH-1590] - NHibernate.Util.ReflectHelper.TryGetMethod not returning inherited id-getter/setter + * [NH-1593] - SchemaUpdate not create property index. + * [NH-1594] - When setting property in hbm type="Decimal(precision, scale)" - "DECIMAL(19,5)" is always generated + * [NH-1608] - LRUMap Memory Leak + * [NH-1609] - MSSQL2005 dialect: paged query in multicriteria uses wrong parameter values when preceeded by other queries + * [NH-1611] - One-To-One Mappings Fail with Composite ID + * [NH-1612] - Native SQL queries for value collections fail with NullReferenceException + * [NH-1619] - NHibernateUtil returns a wrong IType for Boolean on Postgres + * [NH-1627] - lazy=extra causes the where=".." to be ignored when using collection.Count() + * [NH-1633] - Native SQL queries with addJoin or <return-join/> return object arrays instead of single Entities + * [NH-1637] - Oracle9Dialect Paging based on rownum is not valid. + * [NH-1640] - FETCH JOIN query doesn't work in a StatelessSession + * [NH-1654] - Reserved words in formula + * [NH-1668] - Ingres .NET Data Provider name changed + * [NH-1675] - Problem using distinct query with SetMaxResult + * [NH-1677] - Bug in Criteria API with EntityMode == Map + * [NH-1679] - System.Boolean type incorrectly mapped to YesNoType when the criterion is created by using a projection instead of a property name + * [NH-1685] - Generated Version Not Reloaded After Update + * [NH-1687] - Version tag are ignoring child column tag + +** Improvement + * [NH-298] - After, deleting an item which belongs to a <list> the list indices are not modified + * [NH-545] - Distributed transactions support + * [NH-645] - Support for scalar functions which don't return a value in where clause + * [NH-727] - Allow using sql-insert with generator class="identity" + * [NH-1047] - Add overloads to IQuery.SetParameter to accept System.Type + * [NH-1053] - Allow short class name for collection-type + * [NH-1202] - Improve the error messages when compiling queries + * [NH-1274] - Give the option to exclude a mapped class from the SchemaExport.Create loop. + * [NH-1291] - Example.Create with anonymous objects + * [NH-1336] - Native id generator as default and make generator optional in config + * [NH-1354] - Add support for keyed retrieval of MultiCriteria results + * [NH-1381] - Add support for keyed retrieval of MultiQuery results + * [NH-1396] - Allow override of EmptyInterceptor.GetEntityName + * [NH-1398] - Allow access to EntityMode from ISession + * [NH-1402] - Support Cache for Dynamic entities (entity-name without entity-class) + * [NH-1468] - InFragment ToFragmentString() needs more information in error + * [NH-1496] - Configuration.AddAssembly(Assembly) should do some logging if no mapping files where found + * [NH-1500] - Spelling error of NHibernate.Cfg.ConfigurationSchema.ParseColectionsCache + * [NH-1515] - Proxy validator doesn't check "internal" methods + * [NH-1560] - AbstractDataBaseSchema: Make GetIndexInfo and GetIndexColumns virtual + * [NH-1564] - Generic EnumString Mapping + * [NH-1588] - "Relax" PocoEntityTuplizer + * [NH-1589] - ReflectionOptimizer override CreateCreateInstanceMethod + * [NH-1605] - Typedef support in sql-query/return-scaler/@type attribute + * [NH-1613] - Allow custom action for schema script create/update + * [NH-1643] - Allow to use ICollection<T> and HashSet<T> for <set> + * [NH-1644] - Oracle Lite Driver With Working Query Parameters + * [NH-1657] - TimeSpan as DbType.Time + * [NH-1658] - current_timestamp_offset: current_timestamp for DateTimeOffset + * [NH-1659] - current_timestamp in MsSql2008Dialect using SYSDATETIME() + * [NH-1661] - DriverConnectionProvider.GetConnection doesn't dispose IDbConnection in case of an exception + * [NH-1665] - Supports Hibernate-Quoting sequence name + * [NH-1669] - Add guid.native support to MySQL5Dialect + * [NH-1678] - Add a CreateCriteria<T> method to session + * [NH-1684] - MS SQL Server Dialect - UNION ALL + * [NH-1686] - IStatelessSession.CreateCriteria(System.Type entityType) + * [NH-1703] - Configuration full serializable + * [NH-1704] - AliasToBeanResultTransformer should hold ConstructorInfo + +** New Feature + * [NH-791] - Add always-wrap As a Configuration Option On Collections + * [NH-855] - Port lazy="extra" from Hibernate 3 + * [NH-871] - Implement SelectGenerator + * [NH-1033] - Add support for polymorphic criteria + * [NH-1106] - SQL Anywhere 10 Driver and Dialect + * [NH-1173] - Generic Ordered Set + * [NH-1176] - Trigger generated identities + * [NH-1188] - Provide a method to delete by Id + * [NH-1232] - Enums as discriminators + * [NH-1233] - EnumCharType + * [NH-1305] - Add BuildMappings method to Configuration to eagerly configure mappings + * [NH-1359] - Ability to create an IProjection from a DetachedCriteria + * [NH-1370] - Allow short name for <type> + * [NH-1371] - short name for UserType (<typedef>) + * [NH-1373] - shorter name for UserCollectionType (<typedef>) + * [NH-1393] - Ability to use Aggregate Projections on Projections + * [NH-1394] - Ability to use "order by projection" + * [NH-1397] - <tuplizer> from H3.2 + * [NH-1401] - Support for EntityMode.Map and for DefaultEntityMode in Settings + * [NH-1416] - Support DEFAULTs, for properties values, in mappings + * [NH-1451] - Port of <natural-id> from H3.2.6 + * [NH-1458] - Collections events (from H3.2.6) + * [NH-1479] - Add Guid native generation + * [NH-1493] - BackingField accessors + * [NH-1518] - Log info per Operation Threshold in statistics (from H3.2.6) + * [NH-1537] - Comments in Query + * [NH-1538] - Configuration property use_sql_comments (from H3.2) + * [NH-1561] - Dialect, Driver + MetaData for SQL Anywhere 9, and 10 + * [NH-1562] - SQLite MetaData + * [NH-1563] - LinFu ProxyFactoryFactory (LinFu.DynamicProxy) + * [NH-1571] - MSSQL 2008 Dialect + * [NH-1596] - Support Connection to Oracle Lite + * [NH-1621] - Read only property accessor + * [NH-1632] - System.Transactions support issue + * [NH-1646] - Support for IQuery.Future<T>() + * [NH-1662] - sequence-identity generator from H3 + * [NH-1664] - Identity style generic generator support + +** Patch + * [NH-1094] - DecodeCaseFragment ignoring 'returnColumnName' + * [NH-1127] - Use default assembly name and namespace from the <hibernate-mapping> element (more than at present). + * [NH-1209] - TableHiLoGenerator Jumps 1 number each lo > maxLo + * [NH-1280] - Adds HAVING support to CreateCriteria queries, Fixes parameter order bugs + * [NH-1295] - ISynchronization support + * [NH-1314] - Change signature of AbstractPersistentCollection.IdentityRemoveAll() from ICollection to IEnumerable for generics + * [NH-1322] - DeleteEvent constructor does not check its parameter properly + * [NH-1356] - Fixes Generic List of Composite Elements + * [NH-1409] - Includes Patch : nant build scripts ignore -D:sign=false + * [NH-1429] - Oracle GUID to Raw(16) + * [NH-1467] - some comment clean ups + * [NH-1485] - MultiQueryImpl.GetResultList does not use Result Transformers correctly. + * [NH-1491] - NoArgSQLFunction is not cls compliant + * [NH-1503] - Support for Sybase ASE ADO.NET 2 Provider + * [NH-1532] - Class called SystemConfiguration does not persist properly + * [NH-1539] - Oracle dialect - incorrect CONCAT behaviour + * [NH-1540] - Oracle dialect - allowing pagging in subqueries + * [NH-1541] - Oracle Dialect - Extra lazy collection count not working under Oracle + * [NH-1542] - Oracle dialect - Fix to some HQL functions + * [NH-1543] - SQLite paging broken + * [NH-1547] - SqLite Paqing does not page properly after the 2nd page + * [NH-1550] - Oracle dialect - pagging correction (+left/right functions) + * [NH-1551] - Update some tests to support Oracle + * [NH-1555] - Add some helper methods for the transformers class + * [NH-1570] - Revision 3859 broke paging support in SQL 2005 dialect for ordered queries + * [NH-1575] - Revision 3860 introduced bug where paged Hql Queries can break unpaged Hql Queries in Sql 2005 + * [NH-1582] - DbType.Date support for SQLite + * [NH-1586] - Informix driver + * [NH-1591] - SetCacheable isn't exposed by DetachedCriteria + * [NH-1592] - Informix dialect update + * [NH-1595] - SQLite dialect does not support the "extract" function + * [NH-1603] - MSSql2005Dialect - Better Data Paging Strategy + * [NH-1606] - Timestamp in Oracle8 + * [NH-1607] - Dictionary<T,U> should use ContainsKey to check for values + * [NH-1614] - Add support to primitive type (es: unsigned type) to MySql Dialect + * [NH-1660] - Faster retrieval of tuplizer + * [NH-1691] - Nested component broken by fix for NH-1612 + * [NH-1695] - MySQL MetaData implementation + * [NH-1698] - MS SQL Server 2005 creates a clustered primary key by default. Requesting nonclustered as a default to simplify the creation of optimized clustered indexes. + * [NH-1702] - Make AliasToBeanResultTransformer able to return types with a non-public constructor + +** Task + * [NH-1511] - Correctly spell IPropertyAccessor.CanAccessTroughReflectionOptimizer + + Build 2.0.1.GA ======================== ** Bug This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-14 22:43:29
|
Revision: 4136 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4136&view=rev Author: fabiomaulo Date: 2009-03-14 22:43:23 +0000 (Sat, 14 Mar 2009) Log Message: ----------- Disable build-all-framework Modified Paths: -------------- trunk/nhibernate/default.build Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2009-03-14 20:09:50 UTC (rev 4135) +++ trunk/nhibernate/default.build 2009-03-14 22:43:23 UTC (rev 4136) @@ -190,7 +190,7 @@ <target name="binaries" depends="init"> <property name="clover.enabled" value="false" /> - <call target="build-all-frameworks" /> + <call target="build" /> </target> <target name="test-all-frameworks" depends="init"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-14 20:09:51
|
Revision: 4135 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4135&view=rev Author: fabiomaulo Date: 2009-03-14 20:09:50 +0000 (Sat, 14 Mar 2009) Log Message: ----------- Actualized readme with last available info Modified Paths: -------------- trunk/nhibernate/readme.html Modified: trunk/nhibernate/readme.html =================================================================== --- trunk/nhibernate/readme.html 2009-03-14 19:53:23 UTC (rev 4134) +++ trunk/nhibernate/readme.html 2009-03-14 20:09:50 UTC (rev 4135) @@ -11,7 +11,8 @@ relational persistence tool. </p> <p> - You can find tutorials and samples in the <a href="http://www.hibernate.org/365.html">NHibernate Resources</a>. + You can find tutorials and samples in the <a href="http://www.nhforge.org/">NHibernate community site</a> + <a href="http://nhforge.org/wikis/">wiki</a> and <a href="http://nhforge.org/blogs/nhibernate/">blog</a>. </p> <h2>Latest Version</h2> <p> @@ -22,50 +23,31 @@ <h2>Documentation</h2> <p> All available resources on NHibernate can be found online: - <a href="http://www.hibernate.org/22.html#A23">http://www.hibernate.org/22.html#A23</a>. + <a href="http://nhibernate.deepgrok.com/">NHibernate deep grok</a>. </p> <p> - The API documentation is in MSDN format; thanks to <a href="http://sourceforge.net/projects/ndoc/">NDoc</a>. - It can also be integrated into Visual Studio 2005 using a separate installer downloadable from Sourceforge. - </p> - <p> The reference documentation for NHibernate is available <a - href="http://www.hibernate.org/hib_docs/nhibernate/1.2/reference/en/html/">on-line on the Hibernate website</a>. + href="http://nhforge.org/doc/nh/en/index.html">on-line on the website</a>. </p> <h2>Bug Reports</h2> <p> - If you find any bugs please use the <a href="http://jira.nhibernate.org/">JIRA bug tracker</a>. + If you find any bugs please use the <a href="http://jira.nhforge.org/">JIRA bug tracker</a>. </p> <h2>Licenses</h2> <p> This software is distributed under the terms of the FSF Lesser GNU Public License (see lgpl.txt). </p> + <p> This product uses software developed by the Apache Software Foundation (http://www.apache.org/). </p> <ul> <li>log4net</li> </ul> + <p> - This product uses software copyrighted by DigitalCraftsmen - (http://www.digitalcraftsmen.com.br) that is Licensed under the Apache License, - Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) - </p> - <ul> - <li>Castle.DynamicProxy</li> - </ul> - <p> - This product includes source code derived from a sample written by Mattias Sjogren. - </p> - <ul> - <li> - HashCodeProvider - original code can be found at <a href="http://www.msjogren.net/dotnet/eng/samples/misc.asp"> - http://www.msjogren.net/dotnet/eng/samples/misc.asp</a> - </li> - </ul> - <p> This product includes source code from an article written by Jason Smith. </p> <ul> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-14 19:53:33
|
Revision: 4134 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4134&view=rev Author: fabiomaulo Date: 2009-03-14 19:53:23 +0000 (Sat, 14 Mar 2009) Log Message: ----------- Revert r4133 (apparently was not only a reformat matter) Modified Paths: -------------- trunk/nhibernate/default.build Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2009-03-14 19:40:00 UTC (rev 4133) +++ trunk/nhibernate/default.build 2009-03-14 19:53:23 UTC (rev 4134) @@ -1,14 +1,26 @@ -<?xml version="1.0"?> -<project name="NHibernate" default="build"> +<?xml version="1.0" ?> +<project + name="NHibernate" + default="build" + xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd" +> + <property name="root.dir" value="." /> + <include buildfile="${root.dir}/build-common/common.xml" /> + <!-- Pass -D:skip.tests=true to NAnt to skip running tests when building --> <property name="skip.tests" value="false" overwrite="false" /> + <!-- Disable performance tests by default. They take too much time. --> <property name="run.performance.tests" value="false" overwrite="false" /> - <!-- Supported versions of .NET Framework, separated by spaces. - Used by *-all-frameworks targets. --> + + <!-- + Supported versions of .NET Framework, separated by spaces. + Used by *-all-frameworks targets. + --> <property name="supported.frameworks" value="net-2.0" /> + <fileset id="buildfiles.all" basedir="src"> <!-- Files have to be in dependency order --> <include name="Iesi.Collections/Iesi.Collections.build" /> @@ -24,21 +36,27 @@ <include name="NHibernate.Examples/NHibernate.Examples.build" /> <include name="NHibernate.Tool.HbmXsd/NHibernate.Tool.HbmXsd.build" /> </fileset> + <fileset id="buildfiles.tests" basedir="src"> <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" /> <include name="NHibernate.Test/NHibernate.Test.build" /> - <include name="NHibernate.Test.Performance/NHibernate.Test.Performance.build" if="${run.performance.tests}" /> + <include name="NHibernate.Test.Performance/NHibernate.Test.Performance.build" + if="${run.performance.tests}" /> </fileset> - <target name="init" depends="common.init" description="Initializes build properties" /> + + <target name="init" depends="common.init" + description="Initializes build properties" /> + <target name="prepare-build-directory" depends="init"> <mkdir dir="${bin.dir}" /> <call target="copy-referenced-assemblies" /> </target> + <target name="copy-referenced-assemblies"> <!-- Copy framework-neutral libraries --> - <copy todir="${bin.dir}"> + <copy todir="${bin.dir}" > <fileset basedir="${lib.dir}"> <include name="*.dll" /> <include name="*.xml" /> @@ -46,9 +64,13 @@ <include name="nant/*.*" /> </fileset> </copy> - <!-- Copy family-specific libraries | The builds of log4net and nunit work just fine for all versions of .NET. + + <!-- Copy family-specific libraries --> + <!-- + The builds of log4net and nunit work just fine for all versions of .NET. When they do get framework specific extensions then we - can just move them to the framework specific section --> + can just move them to the framework specific section + --> <copy todir="${bin.dir}"> <fileset basedir="${lib.family.dir}"> <include name="*.dll" /> @@ -56,6 +78,7 @@ <include name="*.license.txt" /> </fileset> </copy> + <!-- Copy framework-specific libraries --> <copy todir="${bin.dir}"> <fileset basedir="${lib.framework.dir}"> @@ -78,15 +101,22 @@ </fileset> </copy> </target> - <target name="build" depends="check-framework-version init prepare-build-directory" description="Builds NHibernate in the current configuration"> + + <target name="build" + depends="check-framework-version init prepare-build-directory" + description="Builds NHibernate in the current configuration"> + <nant target="build"> <buildfiles refid="buildfiles.all" /> </nant> + </target> + <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'}" /> + <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'}"/> </target> + <target name="test-report" if="${nunit2report.installed}"> <mkdir dir="${build.dir}/testresults" /> <nunit2report out="${build.dir}/testresults/index.html" format="Frames" todir="${build.dir}/testresults"> @@ -95,10 +125,14 @@ </fileset> </nunit2report> </target> + <target name="test" depends="init build" description="Runs all NHibernate tests for the current framework" unless="${skip.tests}"> - <!-- <nant target="test"> + <!-- + <nant target="test"> <buildfiles refid="buildfiles.tests" /> - </nant> | --> + </nant> + --> + <!-- --> <foreach item="File" property="buildfile"> <in> <items refid="buildfiles.tests" /> @@ -114,74 +148,100 @@ </foreach> <!-- --> </target> - <target name="coverage-report" description="Builds the test coverage reports" if="${clover.enabled}"> + + <target name="coverage-report" description="Builds the test coverage reports" + if="${clover.enabled}"> + <mkdir dir="${build.dir}/clover" /> - <clover-setup initstring="${clover.db}" flushinterval="1000" /> + <clover-setup + initstring="${clover.db}" + flushinterval="1000" + /> + <clover-report> - <current title="NHibernate Clover Report" output="${build.dir}/clover"> + <current title="NHibernate Clover Report" output="${build.dir}/clover" > <format type="html" orderby="Alpha" /> </current> </clover-report> + </target> - <target name="doc" depends="init binaries" description="Builds the Help Documentation and the API documentation"> + + <target name="doc" depends="init binaries" + description="Builds the Help Documentation and the API documentation"> <nant buildfile="doc/documentation.build" target="api manual" /> </target> + <target name="build-all-frameworks" depends="init"> <!-- Save the current framework --> <property name="current.framework.saved" value="${nant.settings.currentframework}" /> + <!-- Execute build for each framework --> <foreach item="String" delim=" " property="framework" in="${supported.frameworks}"> <call target="set-${framework}-framework-configuration" /> <call target="build" /> <!-- Copy and rename the license --> - <copy file="lgpl.txt" tofile="${bin.dir}/NHibernate.license.txt" /> + <copy file="lgpl.txt" tofile="${bin.dir}/NHibernate.license.txt" /> </foreach> + <!-- Reset the current framework to the saved value --> <call target="set-${current.framework.saved}-framework-configuration" /> </target> + <target name="binaries" depends="init"> <property name="clover.enabled" value="false" /> + <call target="build-all-frameworks" /> </target> + <target name="test-all-frameworks" depends="init"> <!-- Save the current framework --> <property name="current.framework.saved" value="${nant.settings.currentframework}" /> + <!-- Execute build for each framework --> <foreach item="String" delim=" " property="framework" in="${supported.frameworks}"> <call target="set-${framework}-framework-configuration" /> <call target="test" /> </foreach> + <!-- Reset the current framework to the saved value --> <call target="set-${current.framework.saved}-framework-configuration" /> </target> + <target name="reports" depends="init"> <property name="clover.enabled" value="false" /> <call target="test-all-frameworks" /> <call target="test-report" /> <call target="coverage-report" /> </target> + <target name="sources"> <property name="source.tmpdir" value="${build.dir}/tmp-src" /> <copy todir="${source.tmpdir}"> <fileset> <!-- copy dlls used by this build --> - <include name="${lib.dir}/**" /> + <include name="${lib.dir}/**" /> + <!-- copy all of the NHibernate source --> <include name="src/NHibernate*/**" /> <include name="src/Iesi*/**" /> <include name="src/*.*" /> + <include name="build-common/**" /> + <include name="*.build" /> <include name="gfdl.txt" /> <include name="lgpl.txt" /> <include name="releasenotes.txt" /> <include name="readme.html" /> + <!-- exclude the Clover modified source files. --> <exclude name="${clover.src}/**" /> + <!-- exclude ReSharper stuff --> <exclude name="**/_ReSharper*/**" /> <exclude name="**/*.resharperoptions" /> <exclude name="**/*resharper*" /> + <!-- exclude VS.NET stuff --> <exclude name="**/*.suo" /> <exclude name="**/*.user" /> @@ -189,9 +249,12 @@ <exclude name="**/obj/**" /> </fileset> </copy> + <!-- Generate AssemblyInfo.cs files for Visual Studio --> <nant buildfile="${source.tmpdir}/default.build" target="visual-studio" /> + </target> + <target name="sources-zip" depends="init sources"> <mkdir dir="${build.dir}/src" /> <zip zipfile="${build.dir}/src/NHibernate-${project.version}-src.zip"> @@ -200,12 +263,16 @@ </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. --> + <!-- + 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" /> @@ -213,32 +280,42 @@ </fileset> </copy> </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. --> + <!-- + TODO: I don't like where these are put now. Should think of a better + place for these. + --> <copy todir="${build.dir}/config.templates"> <fileset basedir="src/NHibernate.Config.Templates"> - <include name="*" /> + <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" /> <include name="*.xsd" /> <include name="bin/**" /> + <exclude name="**/*.hbm.xml" /> <exclude name="**/*.commandlog" /> <exclude name="**/MyTest*" /> </fileset> </zip> </target> + <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" /> </target> - <target name="package" depends="init test-all-frameworks binaries doc sources-zip binaries-zip installer" description="Creates files for the File Release System on SourceForge"> + + <target name="package" depends="init test-all-frameworks binaries doc sources-zip binaries-zip installer" + description="Creates files for the File Release System 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}"> @@ -247,30 +324,45 @@ <include name="bin/NHibernate-${project.version}-bin.zip" /> </fileset> </move> + <echo message="Created a '${project.config}' package in ${dist.output.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="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"> <buildfiles refid="buildfiles.all" /> </nant> </target> + <target name="cleanall" description="Deletes every build configuration"> <echo message="Deleting all builds from all configurations" /> <delete dir="build" failonerror="false" /> <delete dir="${clover.src}" failonerror="false" /> </target> + <target name="clean" depends="init" description="Deletes current build"> <delete dir="${build.dir}" failonerror="false" /> <delete dir="${clover.src}" failonerror="false" /> </target> + <target name="gen-schema-classes" descripton="Generates schema classes from nhibernate-mapping.xsd"> - <exec program="xsd.exe" commandline="src\NHibernate\nhibernate-mapping.xsd /classes /fields /order /namespace:NHibernate.Cfg.MappingSchema /out:src\NHibernate\Cfg\MappingSchema\" /> + <exec program="xsd.exe" + commandline="src\NHibernate\nhibernate-mapping.xsd /classes /fields /order /namespace:NHibernate.Cfg.MappingSchema /out:src\NHibernate\Cfg\MappingSchema\"/> + </target> + </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-14 19:40:05
|
Revision: 4133 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4133&view=rev Author: fabiomaulo Date: 2009-03-14 19:40:00 +0000 (Sat, 14 Mar 2009) Log Message: ----------- Minor (Reformatted) Modified Paths: -------------- trunk/nhibernate/default.build Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2009-03-14 19:14:07 UTC (rev 4132) +++ trunk/nhibernate/default.build 2009-03-14 19:40:00 UTC (rev 4133) @@ -1,26 +1,14 @@ -<?xml version="1.0" ?> -<project - name="NHibernate" - default="build" - xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd" -> - +<?xml version="1.0"?> +<project name="NHibernate" default="build"> <property name="root.dir" value="." /> - <include buildfile="${root.dir}/build-common/common.xml" /> - <!-- Pass -D:skip.tests=true to NAnt to skip running tests when building --> <property name="skip.tests" value="false" overwrite="false" /> - <!-- Disable performance tests by default. They take too much time. --> <property name="run.performance.tests" value="false" overwrite="false" /> - - <!-- - Supported versions of .NET Framework, separated by spaces. - Used by *-all-frameworks targets. - --> + <!-- Supported versions of .NET Framework, separated by spaces. + Used by *-all-frameworks targets. --> <property name="supported.frameworks" value="net-2.0" /> - <fileset id="buildfiles.all" basedir="src"> <!-- Files have to be in dependency order --> <include name="Iesi.Collections/Iesi.Collections.build" /> @@ -36,27 +24,21 @@ <include name="NHibernate.Examples/NHibernate.Examples.build" /> <include name="NHibernate.Tool.HbmXsd/NHibernate.Tool.HbmXsd.build" /> </fileset> - <fileset id="buildfiles.tests" basedir="src"> <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" /> <include name="NHibernate.Test/NHibernate.Test.build" /> - <include name="NHibernate.Test.Performance/NHibernate.Test.Performance.build" - if="${run.performance.tests}" /> + <include name="NHibernate.Test.Performance/NHibernate.Test.Performance.build" if="${run.performance.tests}" /> </fileset> - - <target name="init" depends="common.init" - description="Initializes build properties" /> - + <target name="init" depends="common.init" description="Initializes build properties" /> <target name="prepare-build-directory" depends="init"> <mkdir dir="${bin.dir}" /> <call target="copy-referenced-assemblies" /> </target> - <target name="copy-referenced-assemblies"> <!-- Copy framework-neutral libraries --> - <copy todir="${bin.dir}" > + <copy todir="${bin.dir}"> <fileset basedir="${lib.dir}"> <include name="*.dll" /> <include name="*.xml" /> @@ -64,13 +46,9 @@ <include name="nant/*.*" /> </fileset> </copy> - - <!-- Copy family-specific libraries --> - <!-- - The builds of log4net and nunit work just fine for all versions of .NET. + <!-- Copy family-specific libraries | The builds of log4net and nunit work just fine for all versions of .NET. When they do get framework specific extensions then we - can just move them to the framework specific section - --> + can just move them to the framework specific section --> <copy todir="${bin.dir}"> <fileset basedir="${lib.family.dir}"> <include name="*.dll" /> @@ -78,7 +56,6 @@ <include name="*.license.txt" /> </fileset> </copy> - <!-- Copy framework-specific libraries --> <copy todir="${bin.dir}"> <fileset basedir="${lib.framework.dir}"> @@ -101,22 +78,15 @@ </fileset> </copy> </target> - - <target name="build" - depends="check-framework-version init prepare-build-directory" - description="Builds NHibernate in the current configuration"> - + <target name="build" depends="check-framework-version init prepare-build-directory" description="Builds NHibernate in the current configuration"> <nant target="build"> <buildfiles refid="buildfiles.all" /> </nant> - </target> - <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'}"/> + <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'}" /> </target> - <target name="test-report" if="${nunit2report.installed}"> <mkdir dir="${build.dir}/testresults" /> <nunit2report out="${build.dir}/testresults/index.html" format="Frames" todir="${build.dir}/testresults"> @@ -125,14 +95,10 @@ </fileset> </nunit2report> </target> - <target name="test" depends="init build" description="Runs all NHibernate tests for the current framework" unless="${skip.tests}"> - <!-- - <nant target="test"> + <!-- <nant target="test"> <buildfiles refid="buildfiles.tests" /> - </nant> - --> - <!-- --> + </nant> | --> <foreach item="File" property="buildfile"> <in> <items refid="buildfiles.tests" /> @@ -148,100 +114,74 @@ </foreach> <!-- --> </target> - - <target name="coverage-report" description="Builds the test coverage reports" - if="${clover.enabled}"> - + <target name="coverage-report" description="Builds the test coverage reports" if="${clover.enabled}"> <mkdir dir="${build.dir}/clover" /> - <clover-setup - initstring="${clover.db}" - flushinterval="1000" - /> - + <clover-setup initstring="${clover.db}" flushinterval="1000" /> <clover-report> - <current title="NHibernate Clover Report" output="${build.dir}/clover" > + <current title="NHibernate Clover Report" output="${build.dir}/clover"> <format type="html" orderby="Alpha" /> </current> </clover-report> - </target> - - <target name="doc" depends="init binaries" - description="Builds the Help Documentation and the API documentation"> + <target name="doc" depends="init binaries" description="Builds the Help Documentation and the API documentation"> <nant buildfile="doc/documentation.build" target="api manual" /> </target> - <target name="build-all-frameworks" depends="init"> <!-- Save the current framework --> <property name="current.framework.saved" value="${nant.settings.currentframework}" /> - <!-- Execute build for each framework --> <foreach item="String" delim=" " property="framework" in="${supported.frameworks}"> <call target="set-${framework}-framework-configuration" /> <call target="build" /> <!-- Copy and rename the license --> - <copy file="lgpl.txt" tofile="${bin.dir}/NHibernate.license.txt" /> + <copy file="lgpl.txt" tofile="${bin.dir}/NHibernate.license.txt" /> </foreach> - <!-- Reset the current framework to the saved value --> <call target="set-${current.framework.saved}-framework-configuration" /> </target> - <target name="binaries" depends="init"> <property name="clover.enabled" value="false" /> - <call target="build-all-frameworks" /> </target> - <target name="test-all-frameworks" depends="init"> <!-- Save the current framework --> <property name="current.framework.saved" value="${nant.settings.currentframework}" /> - <!-- Execute build for each framework --> <foreach item="String" delim=" " property="framework" in="${supported.frameworks}"> <call target="set-${framework}-framework-configuration" /> <call target="test" /> </foreach> - <!-- Reset the current framework to the saved value --> <call target="set-${current.framework.saved}-framework-configuration" /> </target> - <target name="reports" depends="init"> <property name="clover.enabled" value="false" /> <call target="test-all-frameworks" /> <call target="test-report" /> <call target="coverage-report" /> </target> - <target name="sources"> <property name="source.tmpdir" value="${build.dir}/tmp-src" /> <copy todir="${source.tmpdir}"> <fileset> <!-- copy dlls used by this build --> - <include name="${lib.dir}/**" /> - + <include name="${lib.dir}/**" /> <!-- copy all of the NHibernate source --> <include name="src/NHibernate*/**" /> <include name="src/Iesi*/**" /> <include name="src/*.*" /> - <include name="build-common/**" /> - <include name="*.build" /> <include name="gfdl.txt" /> <include name="lgpl.txt" /> <include name="releasenotes.txt" /> <include name="readme.html" /> - <!-- exclude the Clover modified source files. --> <exclude name="${clover.src}/**" /> - <!-- exclude ReSharper stuff --> <exclude name="**/_ReSharper*/**" /> <exclude name="**/*.resharperoptions" /> <exclude name="**/*resharper*" /> - <!-- exclude VS.NET stuff --> <exclude name="**/*.suo" /> <exclude name="**/*.user" /> @@ -249,12 +189,9 @@ <exclude name="**/obj/**" /> </fileset> </copy> - <!-- Generate AssemblyInfo.cs files for Visual Studio --> <nant buildfile="${source.tmpdir}/default.build" target="visual-studio" /> - </target> - <target name="sources-zip" depends="init sources"> <mkdir dir="${build.dir}/src" /> <zip zipfile="${build.dir}/src/NHibernate-${project.version}-src.zip"> @@ -263,16 +200,12 @@ </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. - --> + <!-- 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" /> @@ -280,42 +213,32 @@ </fileset> </copy> </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. - --> + <!-- TODO: I don't like where these are put now. Should think of a better + place for these. --> <copy todir="${build.dir}/config.templates"> <fileset basedir="src/NHibernate.Config.Templates"> - <include name="*"/> + <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" /> <include name="*.xsd" /> <include name="bin/**" /> - <exclude name="**/*.hbm.xml" /> <exclude name="**/*.commandlog" /> <exclude name="**/MyTest*" /> </fileset> </zip> </target> - <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" /> </target> - - <target name="package" depends="init test-all-frameworks binaries doc sources-zip binaries-zip installer" - description="Creates files for the File Release System on SourceForge"> - + <target name="package" depends="init test-all-frameworks binaries doc sources-zip binaries-zip installer" description="Creates files for the File Release System 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}"> @@ -324,45 +247,30 @@ <include name="bin/NHibernate-${project.version}-bin.zip" /> </fileset> </move> - <echo message="Created a '${project.config}' package in ${dist.output.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="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"> <buildfiles refid="buildfiles.all" /> </nant> </target> - <target name="cleanall" description="Deletes every build configuration"> <echo message="Deleting all builds from all configurations" /> <delete dir="build" failonerror="false" /> <delete dir="${clover.src}" failonerror="false" /> </target> - <target name="clean" depends="init" description="Deletes current build"> <delete dir="${build.dir}" failonerror="false" /> <delete dir="${clover.src}" failonerror="false" /> </target> - <target name="gen-schema-classes" descripton="Generates schema classes from nhibernate-mapping.xsd"> - <exec program="xsd.exe" - commandline="src\NHibernate\nhibernate-mapping.xsd /classes /fields /order /namespace:NHibernate.Cfg.MappingSchema /out:src\NHibernate\Cfg\MappingSchema\"/> - + <exec program="xsd.exe" commandline="src\NHibernate\nhibernate-mapping.xsd /classes /fields /order /namespace:NHibernate.Cfg.MappingSchema /out:src\NHibernate\Cfg\MappingSchema\" /> </target> - </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-14 19:14:08
|
Revision: 4132 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4132&view=rev Author: fabiomaulo Date: 2009-03-14 19:14:07 +0000 (Sat, 14 Mar 2009) Log Message: ----------- Minor Modified Paths: -------------- trunk/nhibernate/releasenotes.txt Modified: trunk/nhibernate/releasenotes.txt =================================================================== --- trunk/nhibernate/releasenotes.txt 2009-03-14 15:18:55 UTC (rev 4131) +++ trunk/nhibernate/releasenotes.txt 2009-03-14 19:14:07 UTC (rev 4132) @@ -1,9 +1,10 @@ Build 2.1.0 ======================== -** BREAKING CHANGES from NH2.0.xGA to NH2.1.0 +** Know BREAKING CHANGES from NH2.0.xGA to NH2.1.0 ##### Run time ##### * If you want work using lazy loading with LinFu.DynamicProxy now you must deploy NHibernate.ByteCode.LinFu.dll * If you want work using lazy loading with Castle.DynamicProxy2 now you must deploy NHibernate.ByteCode.Castle.dll + * If you want work using lazy loading with Spring.Aop now you must deploy NHibernate.ByteCode.Spring.dll * compatible only with .NET2.0 SP1 or above (System.DateTimeOffset) ##### Possible Breaking Changes for external frameworks ##### This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dav...@us...> - 2009-03-14 15:19:01
|
Revision: 4131 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4131&view=rev Author: davybrion Date: 2009-03-14 15:18:55 +0000 (Sat, 14 Mar 2009) Log Message: ----------- removing failing test which is no longer necessary after reverting NH-1698 Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Removed Paths: ------------- trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/NonClusteredPrimaryKeyFixture.cs Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-14 14:03:03 UTC (rev 4130) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-14 15:18:55 UTC (rev 4131) @@ -948,7 +948,6 @@ <Compile Include="SqlTest\Custom\CustomStoredProcSupportTest.cs" /> <Compile Include="SqlTest\Custom\MySQL\MySQLTest.cs" /> <Compile Include="SqlTest\Custom\Oracle\OracleCustomSQLFixture.cs" /> - <Compile Include="Tools\hbm2ddl\SchemaExportTests\NonClusteredPrimaryKeyFixture.cs" /> <Compile Include="Tools\hbm2ddl\SchemaExportTests\WithColumnTag.cs" /> <Compile Include="Tools\hbm2ddl\SchemaExportTests\WithColumnTagFixture.cs" /> <Compile Include="Tools\hbm2ddl\SchemaUpdate\MigrationFixture.cs" /> Deleted: trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/NonClusteredPrimaryKeyFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/NonClusteredPrimaryKeyFixture.cs 2009-03-14 14:03:03 UTC (rev 4130) +++ trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/NonClusteredPrimaryKeyFixture.cs 2009-03-14 15:18:55 UTC (rev 4131) @@ -1,38 +0,0 @@ -using System.IO; -using System.Reflection; -using System.Text; - -using NHibernate.Cfg; -using NHibernate.Dialect; -using NHibernate.Tool.hbm2ddl; - -using NUnit.Framework; -using NUnit.Framework.SyntaxHelpers; - -namespace NHibernate.Test.Tools.hbm2ddl.SchemaExportTests -{ - [TestFixture] - public class NonClusteredPrimaryKeyFixture - { - [Test] - public void ShouldCreateSchemaWithNonClusterdPrimaryKeyForMsSql2005Dialect() - { - var script = new StringBuilder(); - const string mapping = "NHibernate.Test.Tools.hbm2ddl.SchemaExportTests.WithColumnTag.hbm.xml"; - - Configuration cfg = TestConfigurationHelper.GetDefaultConfiguration(); - - if (cfg.Properties[Environment.Dialect] != typeof(MsSql2005Dialect).FullName) - { - Assert.Ignore("this test only applies for MsSql2005Dialect"); - } - - using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(mapping)) - cfg.AddInputStream(stream); - new SchemaExport(cfg).Execute(s => script.AppendLine(s), false, false, false); - - string wholeScript = script.ToString(); - Assert.That(wholeScript, Text.Contains("primary key nonclustered (id)")); - } - } -} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dar...@us...> - 2009-03-14 14:03:51
|
Revision: 4130 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4130&view=rev Author: darioquintana Date: 2009-03-14 14:03:03 +0000 (Sat, 14 Mar 2009) Log Message: ----------- breaking change reverted, now everyone user can configure PrimaryKeyString in they dialect. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs 2009-03-14 05:09:48 UTC (rev 4129) +++ trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs 2009-03-14 14:03:03 UTC (rev 4130) @@ -258,14 +258,6 @@ get { return false; } } - /// <summary> - /// Sql Server 2005 defaults to creating a clustered primary key, which is typically undesirable. - /// </summary> - public override string PrimaryKeyString - { - get { return base.PrimaryKeyString + " nonclustered"; } - } - /// <summary> /// This specialized string tokenizier will break a string to tokens, taking /// into account single quotes, parenthesis and commas and [ ] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-14 05:09:49
|
Revision: 4129 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4129&view=rev Author: fabiomaulo Date: 2009-03-14 05:09:48 +0000 (Sat, 14 Mar 2009) Log Message: ----------- Fix NH-1704 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Transform/AliasToBeanResultTransformer.cs trunk/nhibernate/src/NHibernate.Test/TransformTests/AliasToBeanResultTransformerFixture.cs Modified: trunk/nhibernate/src/NHibernate/Transform/AliasToBeanResultTransformer.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Transform/AliasToBeanResultTransformer.cs 2009-03-14 04:36:00 UTC (rev 4128) +++ trunk/nhibernate/src/NHibernate/Transform/AliasToBeanResultTransformer.cs 2009-03-14 05:09:48 UTC (rev 4129) @@ -1,5 +1,6 @@ using System; using System.Collections; +using System.Reflection; using NHibernate.Properties; namespace NHibernate.Transform @@ -26,22 +27,32 @@ [Serializable] public class AliasToBeanResultTransformer : IResultTransformer { + private const BindingFlags flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance; private readonly System.Type resultClass; private ISetter[] setters; - private IPropertyAccessor propertyAccessor; + private readonly IPropertyAccessor propertyAccessor; + private readonly ConstructorInfo constructor; public AliasToBeanResultTransformer(System.Type resultClass) { if (resultClass == null) + { throw new ArgumentNullException("resultClass"); + } this.resultClass = resultClass; - propertyAccessor = new ChainedPropertyAccessor( - new IPropertyAccessor[] - { - // TODO H3: PropertyAccessorFactory.GetPropertyAccessor(resultClass, null), - PropertyAccessorFactory.GetPropertyAccessor(null), - PropertyAccessorFactory.GetPropertyAccessor("field") - }); + constructor = resultClass.GetConstructor(flags, null, System.Type.EmptyTypes, null); + if (constructor == null) + { + throw new ArgumentException("The target class of a AliasToBeanResultTransformer need a parameter-less constructor", + "resultClass"); + } + + propertyAccessor = + new ChainedPropertyAccessor(new[] + { + PropertyAccessorFactory.GetPropertyAccessor(null), + PropertyAccessorFactory.GetPropertyAccessor("field") + }); } public object TransformTuple(object[] tuple, String[] aliases) @@ -62,7 +73,7 @@ } } } - result = Activator.CreateInstance(resultClass, true); + result = constructor.Invoke(null); for (int i = 0; i < aliases.Length; i++) { Modified: trunk/nhibernate/src/NHibernate.Test/TransformTests/AliasToBeanResultTransformerFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/TransformTests/AliasToBeanResultTransformerFixture.cs 2009-03-14 04:36:00 UTC (rev 4128) +++ trunk/nhibernate/src/NHibernate.Test/TransformTests/AliasToBeanResultTransformerFixture.cs 2009-03-14 05:09:48 UTC (rev 4129) @@ -25,6 +25,17 @@ } } + public class PublicParameterLessCtor + { + private string something; + + public string Something + { + get { return something; } + set { something = value; } + } + } + #region Overrides of TestCase protected override IList Mappings @@ -56,6 +67,32 @@ Cleanup(); } + [Test] + public void WorkWithPublicParameterLessCtor() + { + Setup(); + + var queryString = "select s.Name as something from Simple s"; + AssertAreWorking(queryString); // working for field access + + queryString = "select s.Name as Something from Simple s"; + AssertAreWorking(queryString); // working for property access + + Cleanup(); + } + + private void AssertAreWorking(string queryString) + { + using (ISession s = OpenSession()) + { + IList<PublicParameterLessCtor> l = + s.CreateSQLQuery(queryString).SetResultTransformer( + Transformers.AliasToBean<PublicParameterLessCtor>()).List<PublicParameterLessCtor>(); + Assert.That(l.Count, Is.EqualTo(2)); + Assert.That(l, Has.All.Not.Null); + } + } + private void Cleanup() { using (ISession s = OpenSession()) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-14 04:36:09
|
Revision: 4128 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4128&view=rev Author: fabiomaulo Date: 2009-03-14 04:36:00 +0000 (Sat, 14 Mar 2009) Log Message: ----------- Fix NH-1702 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Transform/AliasToBeanResultTransformer.cs trunk/nhibernate/src/NHibernate/Transform/Transformers.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/TransformTests/ trunk/nhibernate/src/NHibernate.Test/TransformTests/AliasToBeanResultTransformerFixture.cs trunk/nhibernate/src/NHibernate.Test/TransformTests/Simple.cs trunk/nhibernate/src/NHibernate.Test/TransformTests/Simple.hbm.xml Modified: trunk/nhibernate/src/NHibernate/Transform/AliasToBeanResultTransformer.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Transform/AliasToBeanResultTransformer.cs 2009-03-14 04:05:26 UTC (rev 4127) +++ trunk/nhibernate/src/NHibernate/Transform/AliasToBeanResultTransformer.cs 2009-03-14 04:36:00 UTC (rev 4128) @@ -62,7 +62,7 @@ } } } - result = Activator.CreateInstance(resultClass); + result = Activator.CreateInstance(resultClass, true); for (int i = 0; i < aliases.Length; i++) { Modified: trunk/nhibernate/src/NHibernate/Transform/Transformers.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Transform/Transformers.cs 2009-03-14 04:05:26 UTC (rev 4127) +++ trunk/nhibernate/src/NHibernate/Transform/Transformers.cs 2009-03-14 04:36:00 UTC (rev 4128) @@ -1,4 +1,3 @@ -using System; using System.Collections; namespace NHibernate.Transform @@ -23,15 +22,20 @@ return new AliasToBeanResultTransformer(target); } - public static readonly IResultTransformer DistinctRootEntity = new DistinctRootEntityResultTransformer(); + public static IResultTransformer AliasToBean<T>() where T: class + { + return AliasToBean(typeof (T)); + } - public static IResultTransformer AliasToBeanConstructor(System.Reflection.ConstructorInfo constructor) - { - return new AliasToBeanConstructorResultTransformer(constructor); - } + public static readonly IResultTransformer DistinctRootEntity = new DistinctRootEntityResultTransformer(); - public static readonly IResultTransformer PassThrough = new PassThroughResultTransformer(); + public static IResultTransformer AliasToBeanConstructor(System.Reflection.ConstructorInfo constructor) + { + return new AliasToBeanConstructorResultTransformer(constructor); + } - public static readonly IResultTransformer RootEntity = new RootEntityResultTransformer(); + public static readonly IResultTransformer PassThrough = new PassThroughResultTransformer(); + + public static readonly IResultTransformer RootEntity = new RootEntityResultTransformer(); } } Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-14 04:05:26 UTC (rev 4127) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-14 04:36:00 UTC (rev 4128) @@ -1023,6 +1023,8 @@ <Compile Include="Tools\hbm2ddl\SchemaValidator\Version.cs" /> <Compile Include="TransactionTest\TransactionFixture.cs" /> <Compile Include="TransactionTest\TransactionNotificationFixture.cs" /> + <Compile Include="TransformTests\AliasToBeanResultTransformerFixture.cs" /> + <Compile Include="TransformTests\Simple.cs" /> <Compile Include="TypeParameters\DefaultValueIntegerType.cs" /> <Compile Include="TypeParameters\TypeParameterTest.cs" /> <Compile Include="TypeParameters\Widget.cs" /> @@ -1679,6 +1681,7 @@ <EmbeddedResource Include="Cascade\JobBatch.hbm.xml" /> <EmbeddedResource Include="Deletetransient\Person.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="TransformTests\Simple.hbm.xml" /> <EmbeddedResource Include="VersionTest\Db\MsSQL\ComplexVersioned.hbm.xml" /> <EmbeddedResource Include="Tools\hbm2ddl\SchemaExportTests\WithColumnTag.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1691\Mappings.hbm.xml" /> Added: trunk/nhibernate/src/NHibernate.Test/TransformTests/AliasToBeanResultTransformerFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/TransformTests/AliasToBeanResultTransformerFixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/TransformTests/AliasToBeanResultTransformerFixture.cs 2009-03-14 04:36:00 UTC (rev 4128) @@ -0,0 +1,84 @@ +using System.Collections; +using System.Collections.Generic; +using NHibernate.Transform; +using NUnit.Framework; +using NUnit.Framework.SyntaxHelpers; + +namespace NHibernate.Test.TransformTests +{ + [TestFixture] + public class AliasToBeanResultTransformerFixture : TestCase + { + public class WithOutPublicParameterLessCtor + { + private string something; + protected WithOutPublicParameterLessCtor() {} + + public WithOutPublicParameterLessCtor(string something) + { + this.something = something; + } + + public string Something + { + get { return something; } + } + } + + #region Overrides of TestCase + + protected override IList Mappings + { + get { return new[] {"TransformTests.Simple.hbm.xml"}; } + } + + protected override string MappingsAssembly + { + get { return "NHibernate.Test"; } + } + + #endregion + + [Test] + public void WorkWithOutPublicParameterLessCtor() + { + Setup(); + + using (ISession s = OpenSession()) + { + IList<WithOutPublicParameterLessCtor> l = + s.CreateSQLQuery("select s.Name as something from Simple s").SetResultTransformer( + Transformers.AliasToBean<WithOutPublicParameterLessCtor>()).List<WithOutPublicParameterLessCtor>(); + Assert.That(l.Count, Is.EqualTo(2)); + Assert.That(l, Has.All.Not.Null); + } + + Cleanup(); + } + + private void Cleanup() + { + using (ISession s = OpenSession()) + { + using (s.BeginTransaction()) + { + s.Delete("from Simple"); + s.Transaction.Commit(); + } + } + } + + private void Setup() + { + using (ISession s = OpenSession()) + { + using (s.BeginTransaction()) + { + s.Save(new Simple {Name = "Name1"}); + s.Save(new Simple {Name = "Name2"}); + s.Transaction.Commit(); + } + } + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/TransformTests/Simple.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/TransformTests/Simple.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/TransformTests/Simple.cs 2009-03-14 04:36:00 UTC (rev 4128) @@ -0,0 +1,7 @@ +namespace NHibernate.Test.TransformTests +{ + public class Simple + { + public virtual string Name { get; set; } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/TransformTests/Simple.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/TransformTests/Simple.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/TransformTests/Simple.hbm.xml 2009-03-14 04:36:00 UTC (rev 4128) @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + namespace="NHibernate.Test.TransformTests" + assembly="NHibernate.Test" > + <class name="Simple"> + <id type="int"> + <generator class="native" /> + </id> + <property name="Name" type="string" length="40"/> + </class> +</hibernate-mapping> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-14 04:05:41
|
Revision: 4127 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4127&view=rev Author: fabiomaulo Date: 2009-03-14 04:05:26 +0000 (Sat, 14 Mar 2009) Log Message: ----------- - Fixed test in order to use custom configuration file - Minor (reformatting) Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/CfgTest/ConfigurationSerializationTests.cs Modified: trunk/nhibernate/src/NHibernate.Test/CfgTest/ConfigurationSerializationTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/CfgTest/ConfigurationSerializationTests.cs 2009-03-14 03:26:18 UTC (rev 4126) +++ trunk/nhibernate/src/NHibernate.Test/CfgTest/ConfigurationSerializationTests.cs 2009-03-14 04:05:26 UTC (rev 4127) @@ -1,14 +1,12 @@ -using System; -using System.Collections.Generic; -using System.Text; -using NUnit.Framework; +using System.IO; +using System.Reflection; +using System.Runtime.Serialization.Formatters.Binary; using NHibernate.Cfg; -using System.Runtime.Serialization.Formatters.Binary; -using System.Reflection; +using NHibernate.DomainModel; using NHibernate.Tool.hbm2ddl; -using NHibernate.DomainModel; -using System.IO; +using NUnit.Framework; using NUnit.Framework.SyntaxHelpers; + namespace NHibernate.Test.CfgTest { [TestFixture] @@ -24,37 +22,44 @@ public void Basic_CRUD_should_work() { Assembly assembly = Assembly.Load("NHibernate.DomainModel"); - Configuration cfg = new Configuration(); + var cfg = new Configuration(); + if (TestConfigurationHelper.hibernateConfigFile != null) + { + cfg.Configure(TestConfigurationHelper.hibernateConfigFile); + } cfg.AddResource("NHibernate.DomainModel.ParentChild.hbm.xml", assembly); - BinaryFormatter formatter = new BinaryFormatter(); + var formatter = new BinaryFormatter(); var memoryStream = new MemoryStream(); formatter.Serialize(memoryStream, cfg); memoryStream.Position = 0; cfg = formatter.Deserialize(memoryStream) as Configuration; - SchemaExport export = new SchemaExport(cfg); + Assert.That(cfg, Is.Not.Null); + + var export = new SchemaExport(cfg); export.Execute(true, true, false, true); - var sf = cfg.BuildSessionFactory(); - using(var session=sf.OpenSession()) - using(var tran=session.BeginTransaction()) + ISessionFactory sf = cfg.BuildSessionFactory(); + using (ISession session = sf.OpenSession()) { - Parent parent = new Parent(); - Child child = new Child(); - parent.Child = child; - parent.X = 9; - parent.Count = 5; - child.Parent = parent; - child.Count = 3; - child.X = 4; - session.Save(parent); - session.Save(child); - tran.Commit(); + using (ITransaction tran = session.BeginTransaction()) + { + var parent = new Parent(); + var child = new Child(); + parent.Child = child; + parent.X = 9; + parent.Count = 5; + child.Parent = parent; + child.Count = 3; + child.X = 4; + session.Save(parent); + session.Save(child); + tran.Commit(); + } } - using (var session = sf.OpenSession()) - using (var tran = session.BeginTransaction()) + using (ISession session = sf.OpenSession()) { - Parent parent = session.Get<Parent>(1L); + var parent = session.Get<Parent>(1L); Assert.That(parent.Count, Is.EqualTo(5)); Assert.That(parent.X, Is.EqualTo(9)); Assert.That(parent.Child, Is.Not.Null); @@ -63,18 +68,18 @@ Assert.That(parent.Child.Parent, Is.EqualTo(parent)); } - - using (var session = sf.OpenSession()) - using (var tran = session.BeginTransaction()) + using (ISession session = sf.OpenSession()) { - var p = session.Get<Parent>(1L); - var c = session.Get<Child>(1L); - session.Delete(c); - session.Delete(p); - tran.Commit(); + using (ITransaction tran = session.BeginTransaction()) + { + var p = session.Get<Parent>(1L); + var c = session.Get<Child>(1L); + session.Delete(c); + session.Delete(p); + tran.Commit(); + } } - using (var session = sf.OpenSession()) - using (var tran = session.BeginTransaction()) + using (ISession session = sf.OpenSession()) { var p = session.Get<Parent>(1L); Assert.That(p, Is.Null); @@ -82,4 +87,4 @@ export.Drop(true, true); } } -} +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-14 03:26:31
|
Revision: 4126 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4126&view=rev Author: fabiomaulo Date: 2009-03-14 03:26:18 +0000 (Sat, 14 Mar 2009) Log Message: ----------- Update Castle.DynamicProxy2 2.1.0.5579 last release; as requested by Jonathon Rossi (Castle team) Modified Paths: -------------- trunk/nhibernate/lib/net/2.0/Castle.Core.dll trunk/nhibernate/lib/net/2.0/Castle.DynamicProxy2.dll trunk/nhibernate/lib/net/2.0/Castle.DynamicProxy2.xml trunk/nhibernate/lib/net/3.5/Castle.Core.dll trunk/nhibernate/lib/net/3.5/Castle.DynamicProxy2.dll trunk/nhibernate/lib/net/3.5/Castle.DynamicProxy2.xml trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/NHibernate.ByteCode.Castle.Tests.csproj Modified: trunk/nhibernate/lib/net/2.0/Castle.Core.dll =================================================================== (Binary files differ) Modified: trunk/nhibernate/lib/net/2.0/Castle.DynamicProxy2.dll =================================================================== (Binary files differ) Modified: trunk/nhibernate/lib/net/2.0/Castle.DynamicProxy2.xml =================================================================== --- trunk/nhibernate/lib/net/2.0/Castle.DynamicProxy2.xml 2009-03-14 03:09:32 UTC (rev 4125) +++ trunk/nhibernate/lib/net/2.0/Castle.DynamicProxy2.xml 2009-03-14 03:26:18 UTC (rev 4126) @@ -245,6 +245,14 @@ <param name="targetType"></param> <returns></returns> </member> + <member name="M:Castle.DynamicProxy.Generators.InterfaceProxyWithTargetGenerator.IsMethodEquivalent(System.Reflection.MethodInfo,System.Reflection.MethodInfo)"> + <summary> + Checks whether the given methods are the same. + </summary> + <param name="methodInfo"></param> + <param name="methodOnInterface"></param> + <returns>True if the methods are the same.</returns> + </member> <member name="T:Castle.DynamicProxy.Generators.InterfaceGeneratorType"> <summary> This is used by the ProxyObjectReference class durin de-serialiation, to know @@ -319,71 +327,119 @@ Applied to the assemblies saved by <see cref="T:Castle.DynamicProxy.ModuleScope"/> in order to persist the cache data included in the persisted assembly. </summary> </member> + <member name="T:Castle.DynamicProxy.DefaultProxyBuilder"> + <summary> + Default implementation of <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> interface producing in-memory proxy assemblies. + </summary> + </member> <member name="T:Castle.DynamicProxy.IProxyBuilder"> <summary> - Abstracts the implementation of proxy constructions + Abstracts the implementation of proxy type construction. </summary> </member> <member name="M:Castle.DynamicProxy.IProxyBuilder.CreateClassProxy(System.Type,Castle.DynamicProxy.ProxyGenerationOptions)"> <summary> - Implementors should return a proxy for the specified type. + Creates a proxy type for given <paramref name="classToProxy"/>, using <paramref name="options"/> provided. </summary> - <param name="theClass">The proxy base class.</param> + <param name="classToProxy">The class type to proxy.</param> <param name="options">The proxy generation options.</param> <returns>The generated proxy type.</returns> + <exception cref="T:Castle.DynamicProxy.Generators.GeneratorException">Thrown when <paramref name="classToProxy"/> is a generic type definition.</exception> + <exception cref="T:Castle.DynamicProxy.Generators.GeneratorException">Thrown when <paramref name="classToProxy"/> is not public. + Note that to avoid this exception, you can mark offending type internal, and define <see cref="T:System.Runtime.CompilerServices.InternalsVisibleToAttribute"/> + pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate.</exception> + <seealso cref="T:Castle.DynamicProxy.Generators.ClassProxyGenerator"/> </member> <member name="M:Castle.DynamicProxy.IProxyBuilder.CreateClassProxy(System.Type,System.Type[],Castle.DynamicProxy.ProxyGenerationOptions)"> <summary> - Implementors should return a proxy for the specified - type and interfaces. The interfaces must be only "mark" interfaces + Creates a proxy type for given <paramref name="classToProxy"/>, implementing <paramref name="additionalInterfacesToProxy"/>, using <paramref name="options"/> provided. </summary> - <param name="theClass"></param> - <param name="interfaces"></param> - <param name="options"></param> - <returns></returns> + <param name="classToProxy">The class type to proxy.</param> + <param name="additionalInterfacesToProxy">Additional interface types to proxy.</param> + <param name="options">The proxy generation options.</param> + <returns>The generated proxy type.</returns> + <remarks> + Implementers should return a proxy type for the specified class and interfaces. + Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See <see cref="M:Castle.DynamicProxy.IProxyBuilder.CreateInterfaceProxyTypeWithoutTarget(System.Type,System.Type[],Castle.DynamicProxy.ProxyGenerationOptions)"/> method.) + </remarks> + <exception cref="T:Castle.DynamicProxy.Generators.GeneratorException">Thrown when <paramref name="classToProxy"/> or any of <paramref name="additionalInterfacesToProxy"/> is a generic type definition.</exception> + <exception cref="T:Castle.DynamicProxy.Generators.GeneratorException">Thrown when <paramref name="classToProxy"/> or any of <paramref name="additionalInterfacesToProxy"/> is not public. + Note that to avoid this exception, you can mark offending type internal, and define <see cref="T:System.Runtime.CompilerServices.InternalsVisibleToAttribute"/> + pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate.</exception> + <seealso cref="T:Castle.DynamicProxy.Generators.ClassProxyGenerator"/> </member> <member name="M:Castle.DynamicProxy.IProxyBuilder.CreateInterfaceProxyTypeWithTarget(System.Type,System.Type[],System.Type,Castle.DynamicProxy.ProxyGenerationOptions)"> <summary> - Implementors should return a proxy for the specified - interface that 'proceeds' executions to the - specified target. + Creates a proxy type that proxies calls to <paramref name="interfaceToProxy"/> members on <paramref name="targetType"/>, implementing <paramref name="additionalInterfacesToProxy"/>, using <paramref name="options"/> provided. </summary> - <param name="theInterface"></param> - <param name="interfaces"></param> - <param name="targetType"></param> - <param name="options"></param> - <returns></returns> + <param name="interfaceToProxy">The interface type to proxy.</param> + <param name="additionalInterfacesToProxy">Additional interface types to proxy.</param> + <param name="targetType">Type implementing <paramref name="interfaceToProxy"/> on which calls to the interface members should be intercepted.</param> + <param name="options">The proxy generation options.</param> + <returns>The generated proxy type.</returns> + <remarks> + Implementers should return a proxy type for the specified interface that 'proceeds' executions to the specified target. + Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See <see cref="M:Castle.DynamicProxy.IProxyBuilder.CreateInterfaceProxyTypeWithoutTarget(System.Type,System.Type[],Castle.DynamicProxy.ProxyGenerationOptions)"/> method.) + </remarks> + <exception cref="T:Castle.DynamicProxy.Generators.GeneratorException">Thrown when <paramref name="interfaceToProxy"/> or any of <paramref name="additionalInterfacesToProxy"/> is a generic type definition.</exception> + <exception cref="T:Castle.DynamicProxy.Generators.GeneratorException">Thrown when <paramref name="interfaceToProxy"/> or any of <paramref name="additionalInterfacesToProxy"/> is not public. + Note that to avoid this exception, you can mark offending type internal, and define <see cref="T:System.Runtime.CompilerServices.InternalsVisibleToAttribute"/> + pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate.</exception> + <seealso cref="T:Castle.DynamicProxy.Generators.InterfaceProxyWithTargetGenerator"/> </member> <member name="M:Castle.DynamicProxy.IProxyBuilder.CreateInterfaceProxyTypeWithoutTarget(System.Type,System.Type[],Castle.DynamicProxy.ProxyGenerationOptions)"> <summary> - Implementors should return a proxy for the specified - interface that delegate all executions to the - specified interceptor(s). + Creates a proxy type for given <paramref name="interfaceToProxy"/> that delegates all calls to the provided interceptors. </summary> - <param name="theInterface"></param> - <param name="interfaces"></param> - <param name="options"></param> - <returns></returns> + <param name="interfaceToProxy">The interface type to proxy.</param> + <param name="additionalInterfacesToProxy">Additional interface types to proxy.</param> + <param name="options">The proxy generation options.</param> + <returns>The generated proxy type.</returns> + <remarks> + Implementers should return a proxy type for the specified interface and additional interfaces that delegate all executions to the specified interceptors. + </remarks> + <exception cref="T:Castle.DynamicProxy.Generators.GeneratorException">Thrown when <paramref name="interfaceToProxy"/> or any of <paramref name="additionalInterfacesToProxy"/> is a generic type definition.</exception> + <exception cref="T:Castle.DynamicProxy.Generators.GeneratorException">Thrown when <paramref name="interfaceToProxy"/> or any of <paramref name="additionalInterfacesToProxy"/> is not public. + Note that to avoid this exception, you can mark offending type internal, and define <see cref="T:System.Runtime.CompilerServices.InternalsVisibleToAttribute"/> + pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate.</exception> + <seealso cref="T:Castle.DynamicProxy.Generators.InterfaceProxyWithoutTargetGenerator"/> </member> <member name="M:Castle.DynamicProxy.IProxyBuilder.CreateInterfaceProxyTypeWithTargetInterface(System.Type,System.Type[],Castle.DynamicProxy.ProxyGenerationOptions)"> <summary> - Implementors should return a proxy for the specified - interface(s) that delegate all executions to the - specified interceptor(s) and uses an instance of the interface - as their targets, rather than a class. All IInvocation's - should then implement IChangeProxyTarget. + Creates a proxy type for given <paramref name="interfaceToProxy"/> and <parmaref name="additionalInterfacesToProxy"/> that delegates all calls to the provided interceptors and allows interceptors to switch the actual target of invocation. </summary> - <param name="theInterface"></param> - <param name="interfaces"></param> - <param name="options"></param> - <returns></returns> + <param name="interfaceToProxy">The interface type to proxy.</param> + <param name="additionalInterfacesToProxy">Additional interface types to proxy.</param> + <param name="options">The proxy generation options.</param> + <returns>The generated proxy type.</returns> + <remarks> + Implementers should return a proxy type for the specified interface(s) that delegate all executions to the specified interceptors + and uses an instance of the interface as their targets (i.e. <see cref="P:Castle.Core.Interceptor.IInvocation.InvocationTarget"/>), rather than a class. All <see cref="T:Castle.Core.Interceptor.IInvocation"/> classes should then implement <see cref="T:Castle.Core.Interceptor.IChangeProxyTarget"/> interface, + to allow interceptors to switch invocation target with instance of another type implementing called interface. + </remarks> + <exception cref="T:Castle.DynamicProxy.Generators.GeneratorException">Thrown when <paramref name="interfaceToProxy"/> or any of <paramref name="additionalInterfacesToProxy"/> is a generic type definition.</exception> + <exception cref="T:Castle.DynamicProxy.Generators.GeneratorException">Thrown when <paramref name="interfaceToProxy"/> or any of <paramref name="additionalInterfacesToProxy"/> is not public. + Note that to avoid this exception, you can mark offending type internal, and define <see cref="T:System.Runtime.CompilerServices.InternalsVisibleToAttribute"/> + pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate.</exception> + <seealso cref="T:Castle.DynamicProxy.Generators.InterfaceProxyWithTargetInterfaceGenerator"/> </member> <member name="P:Castle.DynamicProxy.IProxyBuilder.ModuleScope"> <summary> - Gets the module scope used by this builder for generating code. + Gets the <see cref="P:Castle.DynamicProxy.IProxyBuilder.ModuleScope"/> associated with this builder. </summary> - <value>The module scope used by this builder.</value> + <value>The module scope associated with this builder.</value> </member> + <member name="M:Castle.DynamicProxy.DefaultProxyBuilder.#ctor"> + <summary> + Initializes a new instance of the <see cref="T:Castle.DynamicProxy.DefaultProxyBuilder"/> class with new <see cref="T:Castle.DynamicProxy.ModuleScope"/>. + </summary> + </member> + <member name="M:Castle.DynamicProxy.DefaultProxyBuilder.#ctor(Castle.DynamicProxy.ModuleScope)"> + <summary> + Initializes a new instance of the <see cref="T:Castle.DynamicProxy.DefaultProxyBuilder"/> class. + </summary> + <param name="scope">The module scope for generated proxy types.</param> + </member> <member name="M:Castle.DynamicProxy.InternalsHelper.IsInternalToDynamicProxy(System.Reflection.Assembly)"> <summary> Determines whether this assembly has internals visible to dynamic proxy. @@ -612,58 +668,535 @@ Initializes a new instance of the <see cref="T:Castle.DynamicProxy.ProxyGenerationOptions"/> class. </summary> </member> + <member name="T:Castle.DynamicProxy.ProxyGenerator"> + <summary> + Provides proxy objects for classes and interfaces. + </summary> + </member> <member name="M:Castle.DynamicProxy.ProxyGenerator.#ctor(Castle.DynamicProxy.IProxyBuilder)"> <summary> Initializes a new instance of the <see cref="T:Castle.DynamicProxy.ProxyGenerator"/> class. </summary> - <param name="builder">The builder.</param> + <param name="builder">Proxy types builder.</param> </member> <member name="M:Castle.DynamicProxy.ProxyGenerator.#ctor"> <summary> Initializes a new instance of the <see cref="T:Castle.DynamicProxy.ProxyGenerator"/> class. </summary> </member> + <member name="M:Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithTarget``1(``0,Castle.Core.Interceptor.IInterceptor[])"> + <summary> + Creates proxy object intercepting calls to members of interface <typeparamref name="TInterface"/> on <paramref name="target"/> object with given <paramref name="interceptors"/>. + </summary> + <typeparam name="TInterface">Type of the interface implemented by <paramref name="target"/> which will be proxied.</typeparam> + <param name="target">The target object, calls to which will be intercepted.</param> + <param name="interceptors">The interceptors called during the invocation of proxied methods.</param> + <returns>Object proxying calls to members of <typeparamref name="TInterface"/> on <paramref name="target"/> object.</returns> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="target"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interceptors"/> array is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentException">Thrown when given <typeparamref name="TInterface"/>is not an interface type.</exception> + <exception cref="T:System.MissingMethodException">Thrown when no default constructor exists on actual type of <paramref name="target"/> object.</exception> + <exception cref="T:System.Reflection.TargetInvocationException">Thrown when default constructor of actual type of <paramref name="target"/> throws an exception.</exception> + <remarks> + This method uses <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation to generate a proxy type. + As such caller should expect any type of exception that given <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation may throw. + </remarks> + </member> + <member name="M:Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithTarget``1(System.Object,Castle.DynamicProxy.ProxyGenerationOptions,Castle.Core.Interceptor.IInterceptor[])"> + <summary> + Creates proxy object intercepting calls to members of interface <typeparamref name="TInterface"/> on <paramref name="target"/> object with given <paramref name="interceptors"/>. + </summary> + <typeparam name="TInterface">Type of the interface implemented by <paramref name="target"/> which will be proxied.</typeparam> + <param name="target">The target object, calls to which will be intercepted.</param> + <param name="options">The proxy generation options used to influence generated proxy type and object.</param> + <param name="interceptors">The interceptors called during the invocation of proxied methods.</param> + <returns> + Object proxying calls to members of <typeparamref name="TInterface"/> on <paramref name="target"/> object. + </returns> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="target"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interceptors"/> array is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentException">Thrown when given <typeparamref name="TInterface"/>is not an interface type.</exception> + <exception cref="T:System.MissingMethodException">Thrown when no default constructor exists on actual type of <paramref name="target"/> object.</exception> + <exception cref="T:System.Reflection.TargetInvocationException">Thrown when default constructor of actual type of <paramref name="target"/> throws an exception.</exception> + <remarks> + This method uses <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation to generate a proxy type. + As such caller should expect any type of exception that given <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation may throw. + </remarks> + </member> + <member name="M:Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithTarget(System.Type,System.Object,Castle.Core.Interceptor.IInterceptor[])"> + <summary> + Creates proxy object intercepting calls to members of interface <paramref name="interfaceToProxy"/> on <paramref name="target"/> object with given <paramref name="interceptors"/>. + </summary> + <param name="interfaceToProxy">Type of the interface implemented by <paramref name="target"/> which will be proxied.</param> + <param name="target">The target object, calls to which will be intercepted.</param> + <param name="interceptors">The interceptors called during the invocation of proxied methods.</param> + <returns> + Object proxying calls to members of <paramref name="interfaceToProxy"/> type on <paramref name="target"/> object. + </returns> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interfaceToProxy"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="target"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interceptors"/> array is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> is a generic type definition.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> is not an interface type.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="target"/> does not implement <paramref name="interfaceToProxy"/> interface.</exception> + <exception cref="T:System.MissingMethodException">Thrown when no default constructor exists on actual type of <paramref name="target"/> object.</exception> + <exception cref="T:System.Reflection.TargetInvocationException">Thrown when default constructor of actual type of <paramref name="target"/> throws an exception.</exception> + <remarks> + This method uses <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation to generate a proxy type. + As such caller should expect any type of exception that given <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation may throw. + </remarks> + </member> + <member name="M:Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithTarget(System.Type,System.Object,Castle.DynamicProxy.ProxyGenerationOptions,Castle.Core.Interceptor.IInterceptor[])"> + <summary> + Creates proxy object intercepting calls to members of interface <paramref name="interfaceToProxy"/> on <paramref name="target"/> object with given <paramref name="interceptors"/>. + </summary> + <param name="interfaceToProxy">Type of the interface implemented by <paramref name="target"/> which will be proxied.</param> + <param name="target">The target object, calls to which will be intercepted.</param> + <param name="options">The proxy generation options used to influence generated proxy type and object.</param> + <param name="interceptors">The interceptors called during the invocation of proxied methods.</param> + <returns> + Object proxying calls to members of <paramref name="interfaceToProxy"/> type on <paramref name="target"/> object. + </returns> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interfaceToProxy"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="target"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interceptors"/> array is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> is a generic type definition.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> is not an interface type.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="target"/> does not implement <paramref name="interfaceToProxy"/> interface.</exception> + <exception cref="T:System.MissingMethodException">Thrown when no default constructor exists on actual type of <paramref name="target"/> object.</exception> + <exception cref="T:System.Reflection.TargetInvocationException">Thrown when default constructor of actual type of <paramref name="target"/> throws an exception.</exception> + <remarks> + This method uses <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation to generate a proxy type. + As such caller should expect any type of exception that given <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation may throw. + </remarks> + </member> + <member name="M:Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithTarget(System.Type,System.Type[],System.Object,Castle.Core.Interceptor.IInterceptor[])"> + <summary> + Creates proxy object intercepting calls to members of interface <paramref name="interfaceToProxy"/> on <paramref name="target"/> object with given <paramref name="interceptors"/>. + </summary> + <param name="interfaceToProxy">Type of the interface implemented by <paramref name="target"/> which will be proxied.</param> + <param name="target">The target object, calls to which will be intercepted.</param> + <param name="additionalInterfacesToProxy">Additional interface types. Calls to their members will be proxied as well.</param> + <param name="interceptors">The interceptors called during the invocation of proxied methods.</param> + <returns> + Object proxying calls to members of <paramref name="interfaceToProxy"/> and <paramref name="additionalInterfacesToProxy"/> types on <paramref name="target"/> object. + </returns> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interfaceToProxy"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="target"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interceptors"/> array is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> or any of <paramref name="additionalInterfacesToProxy"/> is a generic type definition.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> is not an interface type.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="target"/> does not implement <paramref name="interfaceToProxy"/> interface.</exception> + <exception cref="T:System.MissingMethodException">Thrown when no default constructor exists on actual type of <paramref name="target"/> object.</exception> + <exception cref="T:System.Reflection.TargetInvocationException">Thrown when default constructor of actual type of <paramref name="target"/> throws an exception.</exception> + <remarks> + This method uses <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation to generate a proxy type. + As such caller should expect any type of exception that given <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation may throw. + </remarks> + </member> + <member name="M:Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithTarget(System.Type,System.Type[],System.Object,Castle.DynamicProxy.ProxyGenerationOptions,Castle.Core.Interceptor.IInterceptor[])"> + <summary> + Creates proxy object intercepting calls to members of interface <paramref name="interfaceToProxy"/> on <paramref name="target"/> object with given <paramref name="interceptors"/>. + </summary> + <param name="interfaceToProxy">Type of the interface implemented by <paramref name="target"/> which will be proxied.</param> + <param name="target">The target object, calls to which will be intercepted.</param> + <param name="options">The proxy generation options used to influence generated proxy type and object.</param> + <param name="additionalInterfacesToProxy">Additional interface types. Calls to their members will be proxied as well.</param> + <param name="interceptors">The interceptors called during the invocation of proxied methods.</param> + <returns> + Object proxying calls to members of <paramref name="interfaceToProxy"/> and <paramref name="additionalInterfacesToProxy"/> types on <paramref name="target"/> object. + </returns> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interfaceToProxy"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="target"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interceptors"/> array is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> or any of <paramref name="additionalInterfacesToProxy"/> is a generic type definition.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> is not an interface type.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="target"/> does not implement <paramref name="interfaceToProxy"/> interface.</exception> + <exception cref="T:System.MissingMethodException">Thrown when no default constructor exists on actual type of <paramref name="target"/> object.</exception> + <exception cref="T:System.Reflection.TargetInvocationException">Thrown when default constructor of actual type of <paramref name="target"/> throws an exception.</exception> + <remarks> + This method uses <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation to generate a proxy type. + As such caller should expect any type of exception that given <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation may throw. + </remarks> + </member> + <member name="M:Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithTargetInterface(System.Type,System.Object,Castle.Core.Interceptor.IInterceptor[])"> + <summary> + Creates proxy object intercepting calls to members of interface <paramref name="interfaceToProxy"/> on <paramref name="target"/> object with given <paramref name="interceptors"/>. + Interceptors can use <see cref="T:Castle.Core.Interceptor.IChangeProxyTarget"/> interface to provide other target for method invocation than default <paramref name="target"/>. + </summary> + <param name="interfaceToProxy">Type of the interface implemented by <paramref name="target"/> which will be proxied.</param> + <param name="target">The target object, calls to which will be intercepted.</param> + <param name="interceptors">The interceptors called during the invocation of proxied methods.</param> + <returns> + Object proxying calls to members of <paramref name="interfaceToProxy"/> type on <paramref name="target"/> object or alternative implementation swapped at runtime by an interceptor. + </returns> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interfaceToProxy"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="target"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interceptors"/> array is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> is a generic type definition.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> is not an interface type.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="target"/> does not implement <paramref name="interfaceToProxy"/> interface.</exception> + <exception cref="T:System.MissingMethodException">Thrown when no default constructor exists on actual type of <paramref name="target"/> object.</exception> + <exception cref="T:System.Reflection.TargetInvocationException">Thrown when default constructor of actual type of <paramref name="target"/> throws an exception.</exception> + <remarks> + This method uses <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation to generate a proxy type. + As such caller should expect any type of exception that given <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation may throw. + </remarks> + </member> + <member name="M:Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithTargetInterface(System.Type,System.Object,Castle.DynamicProxy.ProxyGenerationOptions,Castle.Core.Interceptor.IInterceptor[])"> + <summary> + Creates proxy object intercepting calls to members of interface <paramref name="interfaceToProxy"/> on <paramref name="target"/> object with given <paramref name="interceptors"/>. + Interceptors can use <see cref="T:Castle.Core.Interceptor.IChangeProxyTarget"/> interface to provide other target for method invocation than default <paramref name="target"/>. + </summary> + <param name="interfaceToProxy">Type of the interface implemented by <paramref name="target"/> which will be proxied.</param> + <param name="target">The target object, calls to which will be intercepted.</param> + <param name="options">The proxy generation options used to influence generated proxy type and object.</param> + <param name="interceptors">The interceptors called during the invocation of proxied methods.</param> + <returns> + Object proxying calls to members of <paramref name="interfaceToProxy"/> type on <paramref name="target"/> object or alternative implementation swapped at runtime by an interceptor. + </returns> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interfaceToProxy"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="target"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interceptors"/> array is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> is a generic type definition.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> is not an interface type.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="target"/> does not implement <paramref name="interfaceToProxy"/> interface.</exception> + <exception cref="T:System.MissingMethodException">Thrown when no default constructor exists on actual type of <paramref name="target"/> object.</exception> + <exception cref="T:System.Reflection.TargetInvocationException">Thrown when default constructor of actual type of <paramref name="target"/> throws an exception.</exception> + <remarks> + This method uses <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation to generate a proxy type. + As such caller should expect any type of exception that given <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation may throw. + </remarks> + </member> + <member name="M:Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithTargetInterface(System.Type,System.Type[],System.Object,Castle.DynamicProxy.ProxyGenerationOptions,Castle.Core.Interceptor.IInterceptor[])"> + <summary> + Creates proxy object intercepting calls to members of interface <paramref name="interfaceToProxy"/> on <paramref name="target"/> object with given <paramref name="interceptors"/>. + Interceptors can use <see cref="T:Castle.Core.Interceptor.IChangeProxyTarget"/> interface to provide other target for method invocation than default <paramref name="target"/>. + </summary> + <param name="interfaceToProxy">Type of the interface implemented by <paramref name="target"/> which will be proxied.</param> + <param name="target">The target object, calls to which will be intercepted.</param> + <param name="options">The proxy generation options used to influence generated proxy type and object.</param> + <param name="additionalInterfacesToProxy">Additional interface types. Calls to their members will be proxied as well.</param> + <param name="interceptors">The interceptors called during the invocation of proxied methods.</param> + <returns> + Object proxying calls to members of <paramref name="interfaceToProxy"/> and <paramref name="additionalInterfacesToProxy"/> types on <paramref name="target"/> object or alternative implementation swapped at runtime by an interceptor. + </returns> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interfaceToProxy"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="target"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interceptors"/> array is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> or any of <paramref name="additionalInterfacesToProxy"/> is a generic type definition.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> is not an interface type.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="target"/> does not implement <paramref name="interfaceToProxy"/> interface.</exception> + <exception cref="T:System.MissingMethodException">Thrown when no default constructor exists on actual type of <paramref name="target"/> object.</exception> + <exception cref="T:System.Reflection.TargetInvocationException">Thrown when default constructor of actual type of <paramref name="target"/> throws an exception.</exception> + <remarks> + This method uses <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation to generate a proxy type. + As such caller should expect any type of exception that given <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation may throw. + </remarks> + </member> + <member name="M:Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithoutTarget``1(Castle.Core.Interceptor.IInterceptor)"> + <summary> + Creates proxy object intercepting calls to members of interface <typeparamref name="TInterface"/> on target object generated at runtime with given <paramref name="interceptor"/>. + </summary> + <typeparam name="TInterface">Type of the interface which will be proxied.</typeparam> + <param name="interceptor">The interceptors called during the invocation of proxied methods.</param> + <returns> + Object proxying calls to members of <typeparamref name="TInterface"/> types on generated target object. + </returns> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interceptor"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentException">Thrown when given <typeparamref name="TInterface"/> is not an interface type.</exception> + <remarks> + Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given <see cref="T:Castle.Core.Interceptor.IInterceptor"/> implementations. + They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call <see cref="M:Castle.Core.Interceptor.IInvocation.Proceed"/>, since there's no actual implementation to proceed with. + This method uses <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation to generate a proxy type. + As such caller should expect any type of exception that given <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation may throw. + </remarks> + </member> + <member name="M:Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithoutTarget``1(Castle.Core.Interceptor.IInterceptor[])"> + <summary> + Creates proxy object intercepting calls to members of interface <typeparamref name="TInterface"/> on target object generated at runtime with given <paramref name="interceptors"/>. + </summary> + <typeparam name="TInterface">Type of the interface which will be proxied.</typeparam> + <param name="interceptors">The interceptors called during the invocation of proxied methods.</param> + <returns> + Object proxying calls to members of <typeparamref name="TInterface"/> types on generated target object. + </returns> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interceptors"/> array is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentException">Thrown when given <typeparamref name="TInterface"/> is not an interface type.</exception> + <remarks> + Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given <see cref="T:Castle.Core.Interceptor.IInterceptor"/> implementations. + They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call <see cref="M:Castle.Core.Interceptor.IInvocation.Proceed"/>, since there's no actual implementation to proceed with. + As a result of that also at least one <see cref="T:Castle.Core.Interceptor.IInterceptor"/> implementation must be provided. + This method uses <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation to generate a proxy type. + As such caller should expect any type of exception that given <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation may throw. + </remarks> + </member> + <member name="M:Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithoutTarget(System.Type,Castle.Core.Interceptor.IInterceptor)"> + <summary> + Creates proxy object intercepting calls to members of interface <paramref name="interfaceToProxy"/> on target object generated at runtime with given <paramref name="interceptor"/>. + </summary> + <param name="interfaceToProxy">Type of the interface which will be proxied.</param> + <param name="interceptor">The interceptor called during the invocation of proxied methods.</param> + <returns> + Object proxying calls to members of <paramref name="interfaceToProxy"/> type on generated target object. + </returns> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interfaceToProxy"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interceptor"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> is a generic type definition.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> is not an interface type.</exception> + <remarks> + Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given <see cref="T:Castle.Core.Interceptor.IInterceptor"/> implementations. + They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call <see cref="M:Castle.Core.Interceptor.IInvocation.Proceed"/>, since there's no actual implementation to proceed with. + This method uses <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation to generate a proxy type. + As such caller should expect any type of exception that given <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation may throw. + </remarks> + </member> + <member name="M:Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithoutTarget(System.Type,Castle.Core.Interceptor.IInterceptor[])"> + <summary> + Creates proxy object intercepting calls to members of interface <paramref name="interfaceToProxy"/> on target object generated at runtime with given <paramref name="interceptors"/>. + </summary> + <param name="interfaceToProxy">Type of the interface which will be proxied.</param> + <param name="interceptors">The interceptors called during the invocation of proxied methods.</param> + <returns> + Object proxying calls to members of <paramref name="interfaceToProxy"/> type on generated target object. + </returns> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interfaceToProxy"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interceptors"/> array is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> is a generic type definition.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> is not an interface type.</exception> + <remarks> + Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given <see cref="T:Castle.Core.Interceptor.IInterceptor"/> implementations. + They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call <see cref="M:Castle.Core.Interceptor.IInvocation.Proceed"/>, since there's no actual implementation to proceed with. + This method uses <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation to generate a proxy type. + As such caller should expect any type of exception that given <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation may throw. + </remarks> + </member> + <member name="M:Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithoutTarget(System.Type,System.Type[],Castle.Core.Interceptor.IInterceptor[])"> + <summary> + Creates proxy object intercepting calls to members of interface <paramref name="interfaceToProxy"/> on target object generated at runtime with given <paramref name="interceptors"/>. + </summary> + <param name="interfaceToProxy">Type of the interface which will be proxied.</param> + <param name="additionalInterfacesToProxy">Additional interface types. Calls to their members will be proxied as well.</param> + <param name="interceptors">The interceptors called during the invocation of proxied methods.</param> + <returns> + Object proxying calls to members of <paramref name="interfaceToProxy"/> and <paramref name="additionalInterfacesToProxy"/> types on generated target object. + </returns> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interfaceToProxy"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interceptors"/> array is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> or any of <paramref name="additionalInterfacesToProxy"/> is a generic type definition.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> is not an interface type.</exception> + <remarks> + Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given <see cref="T:Castle.Core.Interceptor.IInterceptor"/> implementations. + They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call <see cref="M:Castle.Core.Interceptor.IInvocation.Proceed"/>, since there's no actual implementation to proceed with. + This method uses <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation to generate a proxy type. + As such caller should expect any type of exception that given <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation may throw. + </remarks> + </member> + <member name="M:Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithoutTarget(System.Type,System.Type[],Castle.DynamicProxy.ProxyGenerationOptions,Castle.Core.Interceptor.IInterceptor[])"> + <summary> + Creates proxy object intercepting calls to members of interface <paramref name="interfaceToProxy"/> on target object generated at runtime with given <paramref name="interceptors"/>. + </summary> + <param name="interfaceToProxy">Type of the interface which will be proxied.</param> + <param name="options">The proxy generation options used to influence generated proxy type and object.</param> + <param name="additionalInterfacesToProxy">Additional interface types. Calls to their members will be proxied as well.</param> + <param name="interceptors">The interceptors called during the invocation of proxied methods.</param> + <returns> + Object proxying calls to members of <paramref name="interfaceToProxy"/> and <paramref name="additionalInterfacesToProxy"/> types on generated target object. + </returns> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interfaceToProxy"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="interceptors"/> array is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> or any of <paramref name="additionalInterfacesToProxy"/> is a generic type definition.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="interfaceToProxy"/> is not an interface type.</exception> + <remarks> + Since this method uses an empty-shell implementation of <paramref name="additionalInterfacesToProxy"/> to proxy generated at runtime, the actual implementation of proxied methods must be provided by given <see cref="T:Castle.Core.Interceptor.IInterceptor"/> implementations. + They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call <see cref="M:Castle.Core.Interceptor.IInvocation.Proceed"/>, since there's no actual implementation to proceed with. + This method uses <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation to generate a proxy type. + As such caller should expect any type of exception that given <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation may throw. + </remarks> + </member> + <member name="M:Castle.DynamicProxy.ProxyGenerator.CreateClassProxy``1(Castle.Core.Interceptor.IInterceptor[])"> + <summary> + Creates proxy object intercepting calls to virtual members of type <typeparamref name="TClass"/> on newly created instance of that type with given <paramref name="interceptors"/>. + </summary> + <typeparam name="TClass">Type of class which will be proxied.</typeparam> + <param name="interceptors">The interceptors called during the invocation of proxied methods.</param> + <returns> + New object of type <typeparamref name="TClass"/> proxying calls to virtual members of <typeparamref name="TClass"/> type. + </returns> + <exception cref="T:System.ArgumentException">Thrown when given <typeparamref name="TClass"/> is not a class type.</exception> + <exception cref="T:System.MissingMethodException">Thrown when no default constructor exists on type <typeparamref name="TClass"/>.</exception> + <exception cref="T:System.Reflection.TargetInvocationException">Thrown when default constructor of type <typeparamref name="TClass"/> throws an exception.</exception> + <remarks> + This method uses <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation to generate a proxy type. + As such caller should expect any type of exception that given <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation may throw. + </remarks> + </member> + <member name="M:Castle.DynamicProxy.ProxyGenerator.CreateClassProxy(System.Type,Castle.Core.Interceptor.IInterceptor[])"> + <summary> + Creates proxy object intercepting calls to virtual members of type <paramref name="classToProxy"/> on newly created instance of that type with given <paramref name="interceptors"/>. + </summary> + <param name="classToProxy">Type of class which will be proxied.</param> + <param name="interceptors">The interceptors called during the invocation of proxied methods.</param> + <returns> + New object of type <paramref name="classToProxy"/> proxying calls to virtual members of <paramref name="classToProxy"/> type. + </returns> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="classToProxy"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="classToProxy"/> is a generic type definition.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="classToProxy"/> is not a class type.</exception> + <exception cref="T:System.MissingMethodException">Thrown when no default constructor exists on type <paramref name="classToProxy"/>.</exception> + <exception cref="T:System.Reflection.TargetInvocationException">Thrown when default constructor of type <paramref name="classToProxy"/> throws an exception.</exception> + <remarks> + This method uses <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation to generate a proxy type. + As such caller should expect any type of exception that given <see cref="T:Castle.DynamicProxy.IProxyBuilder"/> implementation may throw. + </remarks> + </member> <member name="M:Castle.DynamicProxy.ProxyGenerator.CreateClassProxy(System.Type,System.Type[],Castle.Core.Interceptor.IInterceptor[])"> <summary> - Creates the class proxy. + Creates proxy object intercepting calls to virtual members of type <paramref name="classToProxy"/> on newly created instance of that type with given <paramref name="interceptors"/>. </summary> - <param name="targetType">Type of the target.</param> - <param name="interfaces">The interfaces.</param> - <param name="interceptors">The interceptors.</param> - <returns></returns> + <param name="classToProxy">Type of class which will be proxied.</param> + <param name="additionalInterfacesToProxy">Additional interface types. Calls to their members will be proxied as well.</param> + <param name="interceptors">The interceptors called during the invocation of proxied methods.</param> + <returns> + New object of type <paramref name="classToProxy"/> proxying calls to virtual members of <paramref name="classToProxy"/> and <paramref name="additionalInterfacesToProxy"/> types. + </returns> + <exception cref="T:System.ArgumentNullException">Thrown when given <paramref name="classToProxy"/> object is a null reference (Nothing in Visual Basic).</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="classToProxy"/> or any of <paramref name="additionalInterfacesToProxy"/> is a generic type definition.</exception> + <exception cref="T:System.ArgumentException">Thrown when given <paramref name="classToProxy"/> is not a class type.</exception> + <exception cref="T:System.MissingMethodException">Thrown when no default constructor exists on type <paramref name="classToProxy"/>.</exception> + <exception... [truncated message content] |
From: <fab...@us...> - 2009-03-14 03:09:42
|
Revision: 4125 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4125&view=rev Author: fabiomaulo Date: 2009-03-14 03:09:32 +0000 (Sat, 14 Mar 2009) Log Message: ----------- Improvement by Erich Eichinger Modified Paths: -------------- trunk/nhibernate/src/NHibernate.ByteCode.Spring/LazyInitializer.cs trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactory.cs Modified: trunk/nhibernate/src/NHibernate.ByteCode.Spring/LazyInitializer.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring/LazyInitializer.cs 2009-03-11 21:26:06 UTC (rev 4124) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring/LazyInitializer.cs 2009-03-14 03:09:32 UTC (rev 4125) @@ -15,60 +15,35 @@ private static readonly MethodInfo exceptionInternalPreserveStackTrace = typeof (Exception).GetMethod("InternalPreserveStackTrace", BindingFlags.Instance | BindingFlags.NonPublic); - private static MethodInfo MapInterfaceMethodToImplementationIfNecessary(MethodInfo methodInfo, - System.Type implementingType) - { - MethodInfo concreteMethodInfo = methodInfo; - - if (methodInfo!= null && methodInfo.DeclaringType.IsInterface) - { - InterfaceMapping interfaceMapping = implementingType.GetInterfaceMap(methodInfo.DeclaringType); - int methodIndex = Array.IndexOf(interfaceMapping.InterfaceMethods, methodInfo); - concreteMethodInfo = interfaceMapping.TargetMethods[methodIndex]; - } - - return concreteMethodInfo; - } - public LazyInitializer(string entityName, System.Type persistentClass, object id, MethodInfo getIdentifierMethod, MethodInfo setIdentifierMethod, IAbstractComponentType componentIdType, ISessionImplementor session) : base( - entityName, persistentClass, id, MapInterfaceMethodToImplementationIfNecessary(getIdentifierMethod, persistentClass), - MapInterfaceMethodToImplementationIfNecessary(setIdentifierMethod, persistentClass), componentIdType, session) - { - InterceptCalls = true; - } + entityName, persistentClass.IsInterface ? typeof (object) : persistentClass, id, getIdentifierMethod, + setIdentifierMethod, componentIdType, session) {} - public bool InterceptCalls { get; set; } - #region Implementation of IInterceptor public object Invoke(IMethodInvocation info) { - object returnValue; try { - var methodInfo = info.Method; - returnValue = base.Invoke(methodInfo, info.Arguments, info.Proxy); + MethodInfo methodInfo = info.Method; + object returnValue = base.Invoke(methodInfo, info.Arguments, info.Proxy); if (returnValue != InvokeImplementation) { return returnValue; } - if (InterceptCalls) - { - var method = new SafeMethod(methodInfo); - return method.Invoke(GetImplementation(), info.Arguments); - } + + var method = new SafeMethod(methodInfo); + return method.Invoke(GetImplementation(), info.Arguments); } catch (TargetInvocationException ex) { - exceptionInternalPreserveStackTrace.Invoke(ex.InnerException, new Object[] { }); + exceptionInternalPreserveStackTrace.Invoke(ex.InnerException, new Object[] {}); throw ex.InnerException; } - - return returnValue; } #endregion @@ -77,17 +52,14 @@ object ITargetSource.GetTarget() { - return Target ?? this; + return Target; } - void ITargetSource.ReleaseTarget(object target) - { - //throw new System.NotImplementedException(); - } + void ITargetSource.ReleaseTarget(object target) {} System.Type ITargetSource.TargetType { - get { return base.PersistentClass; } + get { return PersistentClass; } } bool ITargetSource.IsStatic Modified: trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactory.cs 2009-03-11 21:26:06 UTC (rev 4124) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactory.cs 2009-03-14 03:09:32 UTC (rev 4125) @@ -13,7 +13,7 @@ /// <author>Erich Eichinger (Spring.NET Team)</author> public class ProxyFactory : AbstractProxyFactory { - private static readonly ILog log = LogManager.GetLogger(typeof(ProxyFactory)); + private static readonly ILog log = LogManager.GetLogger(typeof (ProxyFactory)); [Serializable] private class SerializableProxyFactory : global::Spring.Aop.Framework.ProxyFactory @@ -31,17 +31,14 @@ { try { - var initializer = new LazyInitializer(EntityName, PersistentClass, id, GetIdentifierMethod, SetIdentifierMethod, - ComponentIdType, session); + var initializer = new LazyInitializer(EntityName, PersistentClass.IsInterface ? typeof (object) : PersistentClass, + id, GetIdentifierMethod, SetIdentifierMethod, ComponentIdType, session); var proxyFactory = new SerializableProxyFactory {Interfaces = Interfaces, TargetSource = initializer, ProxyTargetType = IsClassProxy}; proxyFactory.AddAdvice(initializer); object proxyInstance = proxyFactory.GetProxy(); - - initializer.InterceptCalls = true; - return (INHibernateProxy) proxyInstance; } catch (Exception ex) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dav...@us...> - 2009-03-11 21:26:12
|
Revision: 4124 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4124&view=rev Author: davybrion Date: 2009-03-11 21:26:06 +0000 (Wed, 11 Mar 2009) Log Message: ----------- applied patch from Robert Dusek for NH-1698 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs trunk/nhibernate/src/NHibernate/Mapping/PrimaryKey.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/NonClusteredPrimaryKeyFixture.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs 2009-03-11 04:20:07 UTC (rev 4123) +++ trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs 2009-03-11 21:26:06 UTC (rev 4124) @@ -397,6 +397,14 @@ get { return String.Empty; } } + /// <summary> + /// The keyword used to create a primary key constraint + /// </summary> + public virtual string PrimaryKeyString + { + get { return "primary key"; } + } + #region database type mapping support /// <summary> Modified: trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs 2009-03-11 04:20:07 UTC (rev 4123) +++ trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs 2009-03-11 21:26:06 UTC (rev 4124) @@ -258,6 +258,14 @@ get { return false; } } + /// <summary> + /// Sql Server 2005 defaults to creating a clustered primary key, which is typically undesirable. + /// </summary> + public override string PrimaryKeyString + { + get { return base.PrimaryKeyString + " nonclustered"; } + } + /// <summary> /// This specialized string tokenizier will break a string to tokens, taking /// into account single quotes, parenthesis and commas and [ ] Modified: trunk/nhibernate/src/NHibernate/Mapping/PrimaryKey.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Mapping/PrimaryKey.cs 2009-03-11 04:20:07 UTC (rev 4123) +++ trunk/nhibernate/src/NHibernate/Mapping/PrimaryKey.cs 2009-03-11 21:26:06 UTC (rev 4124) @@ -20,7 +20,7 @@ /// </returns> public string SqlConstraintString(Dialect.Dialect d, string defaultSchema) { - StringBuilder buf = new StringBuilder("primary key ("); + StringBuilder buf = new StringBuilder(d.PrimaryKeyString + " ("); int i = 0; foreach (Column col in ColumnIterator) { Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-11 04:20:07 UTC (rev 4123) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-11 21:26:06 UTC (rev 4124) @@ -948,6 +948,7 @@ <Compile Include="SqlTest\Custom\CustomStoredProcSupportTest.cs" /> <Compile Include="SqlTest\Custom\MySQL\MySQLTest.cs" /> <Compile Include="SqlTest\Custom\Oracle\OracleCustomSQLFixture.cs" /> + <Compile Include="Tools\hbm2ddl\SchemaExportTests\NonClusteredPrimaryKeyFixture.cs" /> <Compile Include="Tools\hbm2ddl\SchemaExportTests\WithColumnTag.cs" /> <Compile Include="Tools\hbm2ddl\SchemaExportTests\WithColumnTagFixture.cs" /> <Compile Include="Tools\hbm2ddl\SchemaUpdate\MigrationFixture.cs" /> Added: trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/NonClusteredPrimaryKeyFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/NonClusteredPrimaryKeyFixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/NonClusteredPrimaryKeyFixture.cs 2009-03-11 21:26:06 UTC (rev 4124) @@ -0,0 +1,38 @@ +using System.IO; +using System.Reflection; +using System.Text; + +using NHibernate.Cfg; +using NHibernate.Dialect; +using NHibernate.Tool.hbm2ddl; + +using NUnit.Framework; +using NUnit.Framework.SyntaxHelpers; + +namespace NHibernate.Test.Tools.hbm2ddl.SchemaExportTests +{ + [TestFixture] + public class NonClusteredPrimaryKeyFixture + { + [Test] + public void ShouldCreateSchemaWithNonClusterdPrimaryKeyForMsSql2005Dialect() + { + var script = new StringBuilder(); + const string mapping = "NHibernate.Test.Tools.hbm2ddl.SchemaExportTests.WithColumnTag.hbm.xml"; + + Configuration cfg = TestConfigurationHelper.GetDefaultConfiguration(); + + if (cfg.Properties[Environment.Dialect] != typeof(MsSql2005Dialect).FullName) + { + Assert.Ignore("this test only applies for MsSql2005Dialect"); + } + + using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(mapping)) + cfg.AddInputStream(stream); + new SchemaExport(cfg).Execute(s => script.AppendLine(s), false, false, false); + + string wholeScript = script.ToString(); + Assert.That(wholeScript, Text.Contains("primary key nonclustered (id)")); + } + } +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dar...@us...> - 2009-03-11 04:21:04
|
Revision: 4123 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4123&view=rev Author: darioquintana Date: 2009-03-11 04:20:07 +0000 (Wed, 11 Mar 2009) Log Message: ----------- fix NH-645: support scalar function which don't return a value in a where clause (for example Sql Server functions: Contains and FreeText) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Hql/Classic/WhereParser.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH645/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH645/HQLFunctionFixture.cs Modified: trunk/nhibernate/src/NHibernate/Hql/Classic/WhereParser.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Classic/WhereParser.cs 2009-03-10 22:43:13 UTC (rev 4122) +++ trunk/nhibernate/src/NHibernate/Hql/Classic/WhereParser.cs 2009-03-11 04:20:07 UTC (rev 4123) @@ -361,7 +361,13 @@ //unaryCounts.removeLast(); //check that its zero? (As an assertion) SqlStringBuilder join = joins[joins.Count - 1]; joins.RemoveAt(joins.Count - 1); - joins[joins.Count - 1].Add(join.ToSqlString()); + + //let special non-boolean-functions works like: "from Animal a where fx(a.Text,'x');" + //and 'fx' isn't a boolean function. + if (joins.Count == 0) + AppendToken(q, join.ToSqlString()); + else + joins[joins.Count - 1].Add(join.ToSqlString()); } bool lastNots = nots[nots.Count - 1]; Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH645/HQLFunctionFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH645/HQLFunctionFixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH645/HQLFunctionFixture.cs 2009-03-11 04:20:07 UTC (rev 4123) @@ -0,0 +1,74 @@ +using System; +using System.Collections; +using NHibernate.Cfg; +using NHibernate.Dialect; +using NHibernate.Dialect.Function; +using NUnit.Framework; +using Environment=NHibernate.Cfg.Environment; + +namespace NHibernate.Test.NHSpecificTest.NH645 +{ + [TestFixture] + public class HQLFunctionFixture : TestCase + { + protected override string MappingsAssembly + { + get { return "NHibernate.Test"; } + } + + protected override IList Mappings + { + get { return new[] {"HQL.Animal.hbm.xml", "HQL.MaterialResource.hbm.xml"}; } + } + + protected override void Configure(Configuration configuration) + { + configuration.SetProperty(Environment.Dialect, typeof (CustomDialect).AssemblyQualifiedName); + } + + /// <summary> + /// Just test the parser can compile, and SqlException is expected. + /// </summary> + + [Test] + public void SimpleWhere() + { + Run("from Animal a where freetext(a.Description, 'hey apple car')"); + } + + [Test] + public void SimpleWhereWithAnotherClause() + { + Run("from Animal a where freetext(a.Description, 'hey apple car') AND 1 = 1"); + } + + [Test] + public void SimpleWhereWithAnotherClause2() + { + Run("from Animal a where freetext(a.Description, 'hey apple car') AND a.Description <> 'foo'"); + } + + + public void Run(string hql) + { + using(ISession s = OpenSession()) + try + { + s.CreateQuery(hql).List(); + } + catch (Exception ex) + { + if (ex is QueryException) + Assert.Fail("The parser think that 'freetext' is a boolean function"); + } + } + } + + public class CustomDialect : MsSql2005Dialect + { + public CustomDialect() + { + RegisterFunction("freetext", new SQLFunctionTemplate(null, "freetext($1,$2)")); + } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-10 22:43:13 UTC (rev 4122) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-11 04:20:07 UTC (rev 4123) @@ -292,6 +292,7 @@ <Compile Include="GenericTest\SetGeneric\SetGenericFixture.cs" /> <Compile Include="HQL\Animal.cs" /> <Compile Include="HQL\BaseFunctionFixture.cs" /> + <Compile Include="NHSpecificTest\NH645\HQLFunctionFixture.cs" /> <Compile Include="HQL\HQLFunctions.cs" /> <Compile Include="HQL\Human.cs" /> <Compile Include="HQL\MaterialResource.cs" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-03-10 22:43:24
|
Revision: 4122 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4122&view=rev Author: tehlike Date: 2009-03-10 22:43:13 +0000 (Tue, 10 Mar 2009) Log Message: ----------- Making Configuration Serializable. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/AdoNet/Expectations.cs trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs trunk/nhibernate/src/NHibernate/Cfg/DefaultNamingStrategy.cs trunk/nhibernate/src/NHibernate/Cfg/SettingsFactory.cs trunk/nhibernate/src/NHibernate/Engine/ExecuteUpdateResultCheckStyle.cs trunk/nhibernate/src/NHibernate/Engine/Query/Sql/NativeSQLQueryScalarReturn.cs trunk/nhibernate/src/NHibernate/Engine/ResultSetMappingDefinition.cs trunk/nhibernate/src/NHibernate/EntityModeEqualityComparer.cs trunk/nhibernate/src/NHibernate/Event/Default/DefaultMergeEventListener.cs trunk/nhibernate/src/NHibernate/Loader/JoinWalker.cs trunk/nhibernate/src/NHibernate/LockMode.cs trunk/nhibernate/src/NHibernate/Properties/BasicPropertyAccessor.cs trunk/nhibernate/src/NHibernate/Properties/FieldAccessor.cs trunk/nhibernate/src/NHibernate/Properties/MapAccessor.cs trunk/nhibernate/src/NHibernate/Properties/PropertyAccessorFactory.cs trunk/nhibernate/src/NHibernate/Tuple/Component/PocoComponentTuplizer.cs trunk/nhibernate/src/NHibernate/Tuple/Entity/PocoEntityTuplizer.cs trunk/nhibernate/src/NHibernate/Type/AbstractType.cs trunk/nhibernate/src/NHibernate/Type/ForeignKeyDirection.cs trunk/nhibernate/src/NHibernate/Type/OneToOneType.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/CfgTest/ConfigurationSerializationTests.cs trunk/nhibernate/src/NHibernate.Test/EngineTest/NativeSqlQueryReturnTest.cs Modified: trunk/nhibernate/src/NHibernate/AdoNet/Expectations.cs =================================================================== --- trunk/nhibernate/src/NHibernate/AdoNet/Expectations.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/AdoNet/Expectations.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -81,11 +81,11 @@ public static IExpectation AppropriateExpectation(ExecuteUpdateResultCheckStyle style) { - if (style == ExecuteUpdateResultCheckStyle.None) + if (style.Equals(ExecuteUpdateResultCheckStyle.None)) { return None; } - else if (style == ExecuteUpdateResultCheckStyle.Count) + else if (style.Equals(ExecuteUpdateResultCheckStyle.Count)) { return Basic; } Modified: trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -26,6 +26,7 @@ using NHibernate.Type; using NHibernate.Util; using Array=System.Array; +using System.Runtime.Serialization; namespace NHibernate.Cfg { @@ -44,7 +45,8 @@ /// is immutable and does not retain any association back to the <see cref="Configuration" /> /// </para> /// </remarks> - public class Configuration + [Serializable] + public class Configuration:ISerializable { /// <summary>The XML Namespace for the nhibernate-mapping</summary> public const string MappingSchemaXMLNS = "urn:nhibernate-mapping-2.2"; @@ -74,8 +76,89 @@ private static readonly ILog log = LogManager.GetLogger(typeof (Configuration)); + protected internal SettingsFactory settingsFactory; + #region ISerializable Members + public Configuration(SerializationInfo info, StreamingContext context) + { + this.Reset(); + + this.EntityNotFoundDelegate = GetSerialedObject<IEntityNotFoundDelegate>(info, "entityNotFoundDelegate"); + + + this.auxiliaryDatabaseObjects = GetSerialedObject<IList<IAuxiliaryDatabaseObject>>(info, "auxiliaryDatabaseObjects"); + this.classes = GetSerialedObject<IDictionary<string, PersistentClass>>(info, "classes"); + this.collections = GetSerialedObject<IDictionary<string, NHibernate.Mapping.Collection>>(info, "collections"); + + this.columnNameBindingPerTable = GetSerialedObject<IDictionary<Table, Mappings.ColumnNames>>(info, + "columnNameBindingPerTable"); + this.defaultAssembly = GetSerialedObject<string>(info, "defaultAssembly"); + this.defaultNamespace = GetSerialedObject<string>(info, "defaultNamespace"); + this.eventListeners = GetSerialedObject<EventListeners>(info, "eventListeners"); + //this.extendsQueue = GetSerialedObject<ISet<ExtendsQueueEntry>>(info, "extendsQueue"); + this.FilterDefinitions = GetSerialedObject<IDictionary<string, FilterDefinition>>(info, "filterDefinitions"); + this.Imports = GetSerialedObject<IDictionary<string, string>>(info, "imports"); + this.interceptor = GetSerialedObject<IInterceptor>(info, "interceptor"); + this.mapping = GetSerialedObject<IMapping>(info, "mapping"); + this.NamedQueries = GetSerialedObject<IDictionary<string, NamedQueryDefinition>>(info, "namedQueries"); + this.NamedSQLQueries = GetSerialedObject<IDictionary<string, NamedSQLQueryDefinition>>(info, "namedSqlQueries"); + this.namingStrategy = GetSerialedObject<INamingStrategy>(info, "namingStrategy"); + this.properties = GetSerialedObject<IDictionary<string, string>>(info, "properties"); + this.propertyReferences = GetSerialedObject<IList<Mappings.PropertyReference>>(info, "propertyReferences"); + this.settingsFactory = GetSerialedObject<SettingsFactory>(info, "settingsFactory"); + this.SqlFunctions = GetSerialedObject<IDictionary<string, ISQLFunction>>(info, "sqlFunctions"); + this.SqlResultSetMappings = GetSerialedObject<IDictionary<string, ResultSetMappingDefinition>>(info, "sqlResultSetMappings"); + this.tableNameBinding = GetSerialedObject<IDictionary<string, Mappings.TableDescription>>(info, "tableNameBinding"); + this.tables = GetSerialedObject<IDictionary<string, Table>>(info, "tables"); + this.typeDefs = GetSerialedObject<IDictionary<string, TypeDef>>(info, "typeDefs"); + + + + + + + } + private T GetSerialedObject<T>(SerializationInfo info, string name) + { + return (T)info.GetValue(name, typeof(T)); + } + public void GetObjectData(SerializationInfo info, StreamingContext context) + { + ConfigureProxyFactoryFactory(); + SecondPassCompile(); + Validate(); + + + info.AddValue("entityNotFoundDelegate", this.EntityNotFoundDelegate); + + + info.AddValue("auxiliaryDatabaseObjects", this.auxiliaryDatabaseObjects); + info.AddValue("classes", this.classes); + info.AddValue("collections", this.collections); + info.AddValue("columnNameBindingPerTable", this.columnNameBindingPerTable); + info.AddValue("defaultAssembly", this.defaultAssembly); + info.AddValue("defaultNamespace", this.defaultNamespace); + info.AddValue("eventListeners", this.eventListeners); + //info.AddValue("extendsQueue", this.extendsQueue); + info.AddValue("filterDefinitions", this.FilterDefinitions); + info.AddValue("imports", this.Imports); + info.AddValue("interceptor", this.interceptor); + info.AddValue("mapping", this.mapping); + info.AddValue("namedQueries", this.NamedQueries); + info.AddValue("namedSqlQueries", this.NamedSQLQueries); + info.AddValue("namingStrategy", this.namingStrategy); + info.AddValue("properties", this.properties); + info.AddValue("propertyReferences", this.propertyReferences); + info.AddValue("settingsFactory", this.settingsFactory); + info.AddValue("sqlFunctions", this.SqlFunctions); + info.AddValue("sqlResultSetMappings", this.SqlResultSetMappings); + info.AddValue("tableNameBinding", this.tableNameBinding); + info.AddValue("tables", this.tables); + info.AddValue("typeDefs", this.typeDefs); + } + #endregion + /// <summary> /// Clear the internal state of the <see cref="Configuration"/> object. /// </summary> @@ -101,8 +184,9 @@ extendsQueue = new HashedSet<ExtendsQueueEntry>(); tableNameBinding = new Dictionary<string, Mappings.TableDescription>(); columnNameBindingPerTable = new Dictionary<Table, Mappings.ColumnNames>(); + } - + [Serializable] private class Mapping : IMapping { private readonly Configuration configuration; @@ -155,7 +239,7 @@ } } - [NonSerialized] private IMapping mapping; + private IMapping mapping; protected Configuration(SettingsFactory settingsFactory) { @@ -969,13 +1053,7 @@ private string defaultAssembly; private string defaultNamespace; - /// <summary> - /// Instantiate a new <see cref="ISessionFactory" />, using the properties and mappings in this - /// configuration. The <see cref="ISessionFactory" /> will be immutable, so changes made to the - /// configuration after building the <see cref="ISessionFactory" /> will not affect it. - /// </summary> - /// <returns>An <see cref="ISessionFactory" /> instance.</returns> - public ISessionFactory BuildSessionFactory() + protected virtual void ConfigureProxyFactoryFactory() { #region Way for the user to specify their own ProxyFactory @@ -990,7 +1068,17 @@ } #endregion + } + /// <summary> + /// Instantiate a new <see cref="ISessionFactory" />, using the properties and mappings in this + /// configuration. The <see cref="ISessionFactory" /> will be immutable, so changes made to the + /// configuration after building the <see cref="ISessionFactory" /> will not affect it. + /// </summary> + /// <returns>An <see cref="ISessionFactory" /> instance.</returns> + public ISessionFactory BuildSessionFactory() + { + ConfigureProxyFactoryFactory(); SecondPassCompile(); Validate(); Environment.VerifyProperties(properties); @@ -2056,5 +2144,7 @@ return generators.Values; } + + } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Cfg/DefaultNamingStrategy.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/DefaultNamingStrategy.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/Cfg/DefaultNamingStrategy.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -1,4 +1,5 @@ using NHibernate.Util; +using System; namespace NHibernate.Cfg { @@ -6,6 +7,7 @@ /// The default <cref name="INamingStrategy"/> /// </summary> /// <remarks>See <cref name="ImprovedNamingStrategy"/> for a better alternative</remarks> + [Serializable] public class DefaultNamingStrategy : INamingStrategy { /// <summary> Modified: trunk/nhibernate/src/NHibernate/Cfg/SettingsFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/SettingsFactory.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/Cfg/SettingsFactory.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -17,6 +17,7 @@ /// <summary> /// Reads configuration properties and configures a <see cref="Settings"/> instance. /// </summary> + [Serializable] public sealed class SettingsFactory { private static readonly ILog log = LogManager.GetLogger(typeof(SettingsFactory)); Modified: trunk/nhibernate/src/NHibernate/Engine/ExecuteUpdateResultCheckStyle.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Engine/ExecuteUpdateResultCheckStyle.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/Engine/ExecuteUpdateResultCheckStyle.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -1,5 +1,6 @@ using System; using NHibernate.SqlCommand; +using System.Runtime.Serialization; namespace NHibernate.Engine { @@ -44,7 +45,6 @@ } return false; } - public override int GetHashCode() { return name.GetHashCode(); Modified: trunk/nhibernate/src/NHibernate/Engine/Query/Sql/NativeSQLQueryScalarReturn.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Engine/Query/Sql/NativeSQLQueryScalarReturn.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/Engine/Query/Sql/NativeSQLQueryScalarReturn.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -4,6 +4,7 @@ namespace NHibernate.Engine.Query.Sql { /// <summary> Describes a scalar return in a native SQL query. </summary> + [Serializable] public class NativeSQLQueryScalarReturn : INativeSQLQueryReturn { private readonly string columnAlias; Modified: trunk/nhibernate/src/NHibernate/Engine/ResultSetMappingDefinition.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Engine/ResultSetMappingDefinition.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/Engine/ResultSetMappingDefinition.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -1,9 +1,11 @@ using System.Collections.Generic; using NHibernate.Engine.Query.Sql; +using System; namespace NHibernate.Engine { + [Serializable] public class ResultSetMappingDefinition { private readonly string name; Modified: trunk/nhibernate/src/NHibernate/EntityModeEqualityComparer.cs =================================================================== --- trunk/nhibernate/src/NHibernate/EntityModeEqualityComparer.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/EntityModeEqualityComparer.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -1,7 +1,9 @@ using System.Collections.Generic; +using System; namespace NHibernate { + [Serializable] public class EntityModeEqualityComparer : IEqualityComparer<EntityMode> { public bool Equals(EntityMode x, EntityMode y) Modified: trunk/nhibernate/src/NHibernate/Event/Default/DefaultMergeEventListener.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Event/Default/DefaultMergeEventListener.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/Event/Default/DefaultMergeEventListener.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -341,7 +341,7 @@ { object[] copiedValues; - if (foreignKeyDirection == ForeignKeyDirection.ForeignKeyToParent) + if (foreignKeyDirection.Equals( ForeignKeyDirection.ForeignKeyToParent)) { // this is the second pass through on a merge op, so here we limit the // replacement to associations types (value types were already replaced Modified: trunk/nhibernate/src/NHibernate/Loader/JoinWalker.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Loader/JoinWalker.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/Loader/JoinWalker.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -464,7 +464,7 @@ string foreignKeyTable; string[] foreignKeyColumns; - if (type.ForeignKeyDirection == ForeignKeyDirection.ForeignKeyFromParent) + if (type.ForeignKeyDirection.Equals(ForeignKeyDirection.ForeignKeyFromParent)) { foreignKeyTable = lhsTable; foreignKeyColumns = lhsColumnNames; Modified: trunk/nhibernate/src/NHibernate/LockMode.cs =================================================================== --- trunk/nhibernate/src/NHibernate/LockMode.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/LockMode.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -101,6 +101,15 @@ /// </summary> public static readonly LockMode Force = new LockMode(15, "Force"); + public override bool Equals(object obj) + { + LockMode lm = obj as LockMode; + if(lm!=null) + { + return (lm.level == this.level) && (lm.name == this.name); + } + return base.Equals(obj); + } //TODO: need to implement .NET equivalent of readResolve - believe it is // the IObjectReference interface... Modified: trunk/nhibernate/src/NHibernate/Properties/BasicPropertyAccessor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Properties/BasicPropertyAccessor.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/Properties/BasicPropertyAccessor.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -160,6 +160,7 @@ /// <summary> /// An <see cref="IGetter"/> for a Property <c>get</c>. /// </summary> + [Serializable] public sealed class BasicGetter : IGetter, IOptimizableGetter { private readonly System.Type clazz; @@ -255,6 +256,7 @@ /// <summary> /// An <see cref="ISetter"/> for a Property <c>set</c>. /// </summary> + [Serializable] public sealed class BasicSetter : ISetter, IOptimizableSetter { private readonly System.Type clazz; Modified: trunk/nhibernate/src/NHibernate/Properties/FieldAccessor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Properties/FieldAccessor.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/Properties/FieldAccessor.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -151,6 +151,7 @@ /// <summary> /// An <see cref="IGetter"/> that uses a Field instead of the Property <c>get</c>. /// </summary> + [Serializable] public sealed class FieldGetter : IGetter, IOptimizableGetter { private readonly FieldInfo field; @@ -234,6 +235,7 @@ /// <summary> /// An <see cref="IGetter"/> that uses a Field instead of the Property <c>set</c>. /// </summary> + [Serializable] public sealed class FieldSetter : ISetter, IOptimizableSetter { private readonly FieldInfo field; Modified: trunk/nhibernate/src/NHibernate/Properties/MapAccessor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Properties/MapAccessor.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/Properties/MapAccessor.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -1,7 +1,7 @@ using System.Collections; using System.Reflection; using NHibernate.Engine; - +using System; namespace NHibernate.Properties { public class MapAccessor : IPropertyAccessor @@ -24,7 +24,7 @@ } #endregion - + [Serializable] public sealed class MapSetter : ISetter { private readonly string name; @@ -49,7 +49,7 @@ ((IDictionary)target)[name] = value; } } - + [Serializable] public sealed class MapGetter : IGetter { private readonly string name; Modified: trunk/nhibernate/src/NHibernate/Properties/PropertyAccessorFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Properties/PropertyAccessorFactory.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/Properties/PropertyAccessorFactory.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -273,7 +273,7 @@ throw new MappingException("could not instantiate PropertyAccessor class: " + accessorName, e); } } - + [NonSerialized] private static readonly IPropertyAccessor MapAccessor = new MapAccessor(); public static IPropertyAccessor DynamicMapPropertyAccessor { Modified: trunk/nhibernate/src/NHibernate/Tuple/Component/PocoComponentTuplizer.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Tuple/Component/PocoComponentTuplizer.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/Tuple/Component/PocoComponentTuplizer.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -4,6 +4,8 @@ namespace NHibernate.Tuple.Component { + using System.Runtime.Serialization; + /// <summary> /// A <see cref="IComponentTuplizer"/> specific to the POCO entity mode. /// </summary> @@ -13,8 +15,15 @@ private readonly System.Type componentClass; private readonly ISetter parentSetter; private readonly IGetter parentGetter; - private readonly IReflectionOptimizer optimizer; + [NonSerialized] + private IReflectionOptimizer optimizer; + + [OnDeserialized] + internal void OnDeserialized(StreamingContext context) + { + this.optimizer = Cfg.Environment.BytecodeProvider.GetReflectionOptimizer(componentClass, getters, setters); + } public PocoComponentTuplizer(Mapping.Component component) : base(component) { componentClass = component.ComponentClass; Modified: trunk/nhibernate/src/NHibernate/Tuple/Entity/PocoEntityTuplizer.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Tuple/Entity/PocoEntityTuplizer.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/Tuple/Entity/PocoEntityTuplizer.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -11,9 +11,11 @@ using NHibernate.Proxy; using NHibernate.Type; using NHibernate.Util; +using System.Runtime.Serialization; namespace NHibernate.Tuple.Entity { + /// <summary> An <see cref="IEntityTuplizer"/> specific to the POCO entity mode. </summary> public class PocoEntityTuplizer : AbstractEntityTuplizer { @@ -23,9 +25,23 @@ private readonly bool islifecycleImplementor; private readonly bool isValidatableImplementor; private readonly HashedSet<string> lazyPropertyNames = new HashedSet<string>(); - private readonly IReflectionOptimizer optimizer; + [NonSerialized] + private IReflectionOptimizer optimizer; private readonly IProxyValidator proxyValidator; + [OnDeserialized] + internal void OnDeserialized(StreamingContext context) + { + SetReflectionOptimizer(); + } + protected void SetReflectionOptimizer() + { + if (Cfg.Environment.UseReflectionOptimizer) + { + // NH different behavior fo NH-1587 + optimizer = Cfg.Environment.BytecodeProvider.GetReflectionOptimizer(mappedClass, getters, setters); + } + } public PocoEntityTuplizer(EntityMetamodel entityMetamodel, PersistentClass mappedEntity) : base(entityMetamodel, mappedEntity) { @@ -39,12 +55,8 @@ if (property.IsLazy) lazyPropertyNames.Add(property.Name); } + SetReflectionOptimizer(); - if (Cfg.Environment.UseReflectionOptimizer) - { - // NH different behavior fo NH-1587 - optimizer = Cfg.Environment.BytecodeProvider.GetReflectionOptimizer(mappedClass, getters, setters); - } Instantiator = BuildInstantiator(mappedEntity); if (hasCustomAccessors) Modified: trunk/nhibernate/src/NHibernate/Type/AbstractType.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Type/AbstractType.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/Type/AbstractType.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -208,7 +208,7 @@ } else { - include = ForeignKeyDirection.ForeignKeyFromParent == foreignKeyDirection; + include = ForeignKeyDirection.ForeignKeyFromParent.Equals(foreignKeyDirection); } return include ? Replace(original, target, session, owner, copyCache) : target; } Modified: trunk/nhibernate/src/NHibernate/Type/ForeignKeyDirection.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Type/ForeignKeyDirection.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/Type/ForeignKeyDirection.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -3,6 +3,7 @@ namespace NHibernate.Type { using System; + using System.Runtime.Serialization; /// <summary> /// Represents directionality of the foreign key constraint @@ -19,7 +20,10 @@ { public override bool CascadeNow(CascadePoint cascadePoint) { - return cascadePoint != CascadePoint.BeforeInsertAfterDelete; + return cascadePoint != CascadePoint.BeforeInsertAfterDelete;} + public override bool Equals(object obj) + { + return obj is ForeignKeyToParentClass; ; } } [Serializable] @@ -29,6 +33,10 @@ { return cascadePoint != CascadePoint.AfterInsertBeforeDelete; } + public override bool Equals(object obj) + { + return obj is ForeignKeyFromParentClass; ; + } } /// <summary> Modified: trunk/nhibernate/src/NHibernate/Type/OneToOneType.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Type/OneToOneType.cs 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate/Type/OneToOneType.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -113,7 +113,7 @@ public override bool IsNullable { - get { return foreignKeyDirection == ForeignKeyDirection.ForeignKeyToParent; } + get { return foreignKeyDirection.Equals(ForeignKeyDirection.ForeignKeyToParent); } } public override bool UseLHSPrimaryKey Added: trunk/nhibernate/src/NHibernate.Test/CfgTest/ConfigurationSerializationTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/CfgTest/ConfigurationSerializationTests.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/CfgTest/ConfigurationSerializationTests.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.Text; +using NUnit.Framework; +using NHibernate.Cfg; +using System.Runtime.Serialization.Formatters.Binary; +using System.Reflection; +using NHibernate.Tool.hbm2ddl; +using NHibernate.DomainModel; +using System.IO; +using NUnit.Framework.SyntaxHelpers; +namespace NHibernate.Test.CfgTest +{ + [TestFixture] + public class ConfigurationSerializationTests + { + [Test] + public void Configuration_should_be_serializable() + { + NHAssert.HaveSerializableAttribute(typeof (Configuration)); + } + + [Test] + public void Basic_CRUD_should_work() + { + Assembly assembly = Assembly.Load("NHibernate.DomainModel"); + Configuration cfg = new Configuration(); + cfg.AddResource("NHibernate.DomainModel.ParentChild.hbm.xml", assembly); + + BinaryFormatter formatter = new BinaryFormatter(); + var memoryStream = new MemoryStream(); + formatter.Serialize(memoryStream, cfg); + memoryStream.Position = 0; + cfg = formatter.Deserialize(memoryStream) as Configuration; + SchemaExport export = new SchemaExport(cfg); + export.Execute(true, true, false, true); + var sf = cfg.BuildSessionFactory(); + using(var session=sf.OpenSession()) + using(var tran=session.BeginTransaction()) + { + Parent parent = new Parent(); + Child child = new Child(); + parent.Child = child; + parent.X = 9; + parent.Count = 5; + child.Parent = parent; + child.Count = 3; + child.X = 4; + session.Save(parent); + session.Save(child); + tran.Commit(); + } + + using (var session = sf.OpenSession()) + using (var tran = session.BeginTransaction()) + { + Parent parent = session.Get<Parent>(1L); + Assert.That(parent.Count, Is.EqualTo(5)); + Assert.That(parent.X, Is.EqualTo(9)); + Assert.That(parent.Child, Is.Not.Null); + Assert.That(parent.Child.X, Is.EqualTo(4)); + Assert.That(parent.Child.Count, Is.EqualTo(3)); + Assert.That(parent.Child.Parent, Is.EqualTo(parent)); + } + + + using (var session = sf.OpenSession()) + using (var tran = session.BeginTransaction()) + { + var p = session.Get<Parent>(1L); + var c = session.Get<Child>(1L); + session.Delete(c); + session.Delete(p); + tran.Commit(); + } + using (var session = sf.OpenSession()) + using (var tran = session.BeginTransaction()) + { + var p = session.Get<Parent>(1L); + Assert.That(p, Is.Null); + } + export.Drop(true, true); + } + } +} Added: trunk/nhibernate/src/NHibernate.Test/EngineTest/NativeSqlQueryReturnTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/EngineTest/NativeSqlQueryReturnTest.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/EngineTest/NativeSqlQueryReturnTest.cs 2009-03-10 22:43:13 UTC (rev 4122) @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Text; +using NUnit.Framework; +using NHibernate.Engine.Query.Sql; + +namespace NHibernate.Test.EngineTest +{ + [TestFixture] + public class NativeSqlQueryReturnTest + { + [Test] + public void AllEmbeddedTypesAreMarkedSerializable() + { + NHAssert.InheritedAreMarkedSerializable(typeof(INativeSQLQueryReturn)); + } + } +} Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-10 17:54:00 UTC (rev 4121) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-10 22:43:13 UTC (rev 4122) @@ -91,6 +91,7 @@ <Compile Include="Cascade\RefreshFixture.cs" /> <Compile Include="CfgTest\ConfigurationFixture.cs" /> <Compile Include="CfgTest\ConfigurationSchemaFixture.cs" /> + <Compile Include="CfgTest\ConfigurationSerializationTests.cs" /> <Compile Include="CfgTest\DefaultNsAssmFixture.cs" /> <Compile Include="CfgTest\HbmBinderFixture.cs" /> <Compile Include="CfgTest\HbmOrderingFixture.cs" /> @@ -161,6 +162,7 @@ <Compile Include="DynamicEntity\Tuplizer\MyEntityInstantiator.cs" /> <Compile Include="DynamicEntity\Tuplizer\MyEntityTuplizer.cs" /> <Compile Include="DynamicEntity\Tuplizer\TuplizerDynamicEntity.cs" /> + <Compile Include="EngineTest\NativeSqlQueryReturnTest.cs" /> <Compile Include="EngineTest\TypedValueFixture.cs" /> <Compile Include="EntityModeTest\Map\Basic\DynamicClassFixture.cs" /> <Compile Include="EntityModeTest\Multi\MultiRepresentationFixture.cs" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-03-10 17:54:07
|
Revision: 4121 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4121&view=rev Author: tehlike Date: 2009-03-10 17:54:00 +0000 (Tue, 10 Mar 2009) Log Message: ----------- Marking SqlFunctions serializable. This is necessary for making Configuration serializable as it is possible to add custom sql functions. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs trunk/nhibernate/src/NHibernate/Dialect/FirebirdDialect.cs trunk/nhibernate/src/NHibernate/Dialect/Function/AnsiExtractFunction.cs trunk/nhibernate/src/NHibernate/Dialect/Function/AnsiSubstringFunction.cs trunk/nhibernate/src/NHibernate/Dialect/Function/AnsiTrimEmulationFunction.cs trunk/nhibernate/src/NHibernate/Dialect/Function/AnsiTrimFunction.cs trunk/nhibernate/src/NHibernate/Dialect/Function/CastFunction.cs trunk/nhibernate/src/NHibernate/Dialect/Function/CharIndexFunction.cs trunk/nhibernate/src/NHibernate/Dialect/Function/ClassicAggregateFunction.cs trunk/nhibernate/src/NHibernate/Dialect/Function/ClassicAvgFunction.cs trunk/nhibernate/src/NHibernate/Dialect/Function/ClassicCountFunction.cs trunk/nhibernate/src/NHibernate/Dialect/Function/ClassicSumFunction.cs trunk/nhibernate/src/NHibernate/Dialect/Function/CommonGrammar.cs trunk/nhibernate/src/NHibernate/Dialect/Function/NoArgSQLFunction.cs trunk/nhibernate/src/NHibernate/Dialect/Function/NvlFunction.cs trunk/nhibernate/src/NHibernate/Dialect/Function/PositionSubstringFunction.cs trunk/nhibernate/src/NHibernate/Dialect/Function/SQLFunctionTemplate.cs trunk/nhibernate/src/NHibernate/Dialect/Function/StandardSQLFunction.cs trunk/nhibernate/src/NHibernate/Dialect/Function/StandardSafeSQLFunction.cs trunk/nhibernate/src/NHibernate/Dialect/Function/VarArgsSQLFunction.cs trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs trunk/nhibernate/src/NHibernate/Dialect/Oracle8iDialect.cs trunk/nhibernate/src/NHibernate/Dialect/Oracle9Dialect.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/DialectTest/FunctionTests/ trunk/nhibernate/src/NHibernate.Test/DialectTest/FunctionTests/SerializableTypesFixture.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -1952,7 +1952,7 @@ #endregion #region Agregate function redefinition - + [Serializable] protected class CountQueryFunctionInfo : ClassicAggregateFunction { public CountQueryFunctionInfo() : base("count",true) @@ -1964,7 +1964,7 @@ return NHibernateUtil.Int64; } } - + [Serializable] protected class AvgQueryFunctionInfo : ClassicAggregateFunction { public AvgQueryFunctionInfo() : base("avg",false) @@ -1994,7 +1994,8 @@ return NHibernateUtil.Double; } } - + + [Serializable] protected class SumQueryFunctionInfo : ClassicAggregateFunction { public SumQueryFunctionInfo() : base("sum",false) Modified: trunk/nhibernate/src/NHibernate/Dialect/FirebirdDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/FirebirdDialect.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/FirebirdDialect.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -7,7 +7,8 @@ using NHibernate.Engine; using NHibernate.Type; using System.Data.Common; - +using System; +using Environment = NHibernate.Cfg.Environment; namespace NHibernate.Dialect { /// <summary> @@ -214,6 +215,7 @@ return -1; } + [Serializable] private class CastedFunction : NoArgSQLFunction { public CastedFunction(string name, IType returnType) @@ -233,6 +235,7 @@ } } + [Serializable] private class CurrentTimeStamp : NoArgSQLFunction { public CurrentTimeStamp() Modified: trunk/nhibernate/src/NHibernate/Dialect/Function/AnsiExtractFunction.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Function/AnsiExtractFunction.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Function/AnsiExtractFunction.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -27,6 +27,7 @@ /// TIMEZONE_MINUTE /// ]]> /// </remarks> + [Serializable] public class AnsiExtractFunction: SQLFunctionTemplate, IFunctionGrammar { public AnsiExtractFunction() Modified: trunk/nhibernate/src/NHibernate/Dialect/Function/AnsiSubstringFunction.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Function/AnsiSubstringFunction.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Function/AnsiSubstringFunction.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -21,6 +21,7 @@ /// [ FOR <string length> ] <right paren> ///]]> /// </remarks> + [Serializable] public class AnsiSubstringFunction : ISQLFunction { #region ISQLFunction Members Modified: trunk/nhibernate/src/NHibernate/Dialect/Function/AnsiTrimEmulationFunction.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Function/AnsiTrimEmulationFunction.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Function/AnsiTrimEmulationFunction.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -17,6 +17,7 @@ /// which it uses in various combinations to emulate the desired ANSI trim() /// functionality. /// </summary> + [Serializable] public class AnsiTrimEmulationFunction : ISQLFunction, IFunctionGrammar { private static readonly ISQLFunction LeadingSpaceTrim = new SQLFunctionTemplate(NHibernateUtil.String, "ltrim( ?1 )"); Modified: trunk/nhibernate/src/NHibernate/Dialect/Function/AnsiTrimFunction.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Function/AnsiTrimFunction.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Function/AnsiTrimFunction.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -3,6 +3,7 @@ namespace NHibernate.Dialect.Function { + [Serializable] public class AnsiTrimFunction : SQLFunctionTemplate, IFunctionGrammar { public AnsiTrimFunction() Modified: trunk/nhibernate/src/NHibernate/Dialect/Function/CastFunction.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Function/CastFunction.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Function/CastFunction.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -10,6 +10,7 @@ /// <summary> /// ANSI-SQL style cast(foo as type) where the type is a NHibernate type /// </summary> + [Serializable] public class CastFunction : ISQLFunction, IFunctionGrammar { #region ISQLFunction Members Modified: trunk/nhibernate/src/NHibernate/Dialect/Function/CharIndexFunction.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Function/CharIndexFunction.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Function/CharIndexFunction.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -10,6 +10,7 @@ /// <summary> /// Emulation of locate() on Sybase /// </summary> + [Serializable] public class CharIndexFunction : ISQLFunction { public CharIndexFunction() Modified: trunk/nhibernate/src/NHibernate/Dialect/Function/ClassicAggregateFunction.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Function/ClassicAggregateFunction.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Function/ClassicAggregateFunction.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -8,6 +8,7 @@ namespace NHibernate.Dialect.Function { + [Serializable] public class ClassicAggregateFunction : ISQLFunction, IFunctionGrammar { private IType returnType = null; Modified: trunk/nhibernate/src/NHibernate/Dialect/Function/ClassicAvgFunction.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Function/ClassicAvgFunction.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Function/ClassicAvgFunction.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -9,6 +9,7 @@ /// <summary> /// Classic AVG sqlfunction that return types as it was done in Hibernate 3.1 /// </summary> + [Serializable] public class ClassicAvgFunction : ClassicAggregateFunction { public ClassicAvgFunction() : base("avg", false) Modified: trunk/nhibernate/src/NHibernate/Dialect/Function/ClassicCountFunction.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Function/ClassicCountFunction.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Function/ClassicCountFunction.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -7,6 +7,7 @@ /// <summary> /// Classic COUNT sqlfunction that return types as it was done in Hibernate 3.1 /// </summary> + [Serializable] public class ClassicCountFunction : ClassicAggregateFunction { public ClassicCountFunction() : base("count", true) Modified: trunk/nhibernate/src/NHibernate/Dialect/Function/ClassicSumFunction.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Function/ClassicSumFunction.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Function/ClassicSumFunction.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -5,6 +5,7 @@ /// <summary> /// Classic SUM sqlfunction that return types as it was done in Hibernate 3.1 /// </summary> + [Serializable] public class ClassicSumFunction : ClassicAggregateFunction { public ClassicSumFunction() : base("sum", false) Modified: trunk/nhibernate/src/NHibernate/Dialect/Function/CommonGrammar.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Function/CommonGrammar.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Function/CommonGrammar.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -3,6 +3,7 @@ namespace NHibernate.Dialect.Function { + [Serializable] public class CommonGrammar: IFunctionGrammar { #region IFunctionGrammar Members Modified: trunk/nhibernate/src/NHibernate/Dialect/Function/NoArgSQLFunction.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Function/NoArgSQLFunction.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Function/NoArgSQLFunction.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -2,12 +2,14 @@ using NHibernate.Engine; using NHibernate.SqlCommand; using NHibernate.Type; +using System; namespace NHibernate.Dialect.Function { /// <summary> /// Summary description for NoArgSQLFunction. /// </summary> + [Serializable] public class NoArgSQLFunction : ISQLFunction { public NoArgSQLFunction(string name, IType returnType) Modified: trunk/nhibernate/src/NHibernate/Dialect/Function/NvlFunction.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Function/NvlFunction.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Function/NvlFunction.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -9,6 +9,7 @@ /// <summary> /// Emulation of coalesce() on Oracle, using multiple nvl() calls /// </summary> + [Serializable] public class NvlFunction : ISQLFunction { public NvlFunction() Modified: trunk/nhibernate/src/NHibernate/Dialect/Function/PositionSubstringFunction.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Function/PositionSubstringFunction.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Function/PositionSubstringFunction.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -10,6 +10,7 @@ /// <summary> /// Emulation of locate() on PostgreSQL /// </summary> + [Serializable] public class PositionSubstringFunction : ISQLFunction { public PositionSubstringFunction() Modified: trunk/nhibernate/src/NHibernate/Dialect/Function/SQLFunctionTemplate.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Function/SQLFunctionTemplate.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Function/SQLFunctionTemplate.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -5,6 +5,7 @@ using NHibernate.Engine; using NHibernate.SqlCommand; using NHibernate.Type; +using System; namespace NHibernate.Dialect.Function { @@ -16,6 +17,7 @@ /// Each dialect will define a template as a string (exactly like above) marking function /// parameters with '?' followed by parameter's index (first index is 1). /// </summary> + [Serializable] public class SQLFunctionTemplate : ISQLFunction { private const int InvalidArgumentIndex = -1; Modified: trunk/nhibernate/src/NHibernate/Dialect/Function/StandardSQLFunction.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Function/StandardSQLFunction.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Function/StandardSQLFunction.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -3,6 +3,7 @@ using NHibernate.Engine; using NHibernate.SqlCommand; using NHibernate.Type; +using System; namespace NHibernate.Dialect.Function { @@ -14,6 +15,7 @@ /// The Dialect and its sub-classes use this class to provide details required /// for processing of the associated function. /// </remarks> + [Serializable] public class StandardSQLFunction : ISQLFunction { private IType returnType = null; Modified: trunk/nhibernate/src/NHibernate/Dialect/Function/StandardSafeSQLFunction.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Function/StandardSafeSQLFunction.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Function/StandardSafeSQLFunction.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -14,6 +14,7 @@ /// The Dialect and its sub-classes use this class to provide details required /// for processing of the associated function. /// </remarks> + [Serializable] public class StandardSafeSQLFunction : StandardSQLFunction { private int allowedArgsCount = 1; Modified: trunk/nhibernate/src/NHibernate/Dialect/Function/VarArgsSQLFunction.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Function/VarArgsSQLFunction.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Function/VarArgsSQLFunction.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -11,6 +11,7 @@ /// Support for slightly more general templating than StandardSQLFunction, /// with an unlimited number of arguments. /// </summary> + [Serializable] public class VarArgsSQLFunction : ISQLFunction { private readonly string begin; Modified: trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -430,7 +430,7 @@ string selectExistingObject = GetSelectExistingObject(name, table); return string.Format(@"if not exists ({0})", selectExistingObject); } - + [Serializable] protected class CountBigQueryFunction : ClassicAggregateFunction { public CountBigQueryFunction() Modified: trunk/nhibernate/src/NHibernate/Dialect/Oracle8iDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Oracle8iDialect.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Oracle8iDialect.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -445,7 +445,7 @@ #endregion #region Functions - + [Serializable] private class CurrentTimeStamp : NoArgSQLFunction { public CurrentTimeStamp() : base("current_timestamp", NHibernateUtil.DateTime, true) {} @@ -455,7 +455,7 @@ return new SqlString(Name); } } - + [Serializable] private class LocateFunction : ISQLFunction { private static readonly ISQLFunction LocateWith2Params = new SQLFunctionTemplate(NHibernateUtil.Int32, Modified: trunk/nhibernate/src/NHibernate/Dialect/Oracle9Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Oracle9Dialect.cs 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate/Dialect/Oracle9Dialect.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -254,6 +254,7 @@ return new OracleDataBaseSchema(connection); } + [Serializable] private class CurrentTimeStamp : NoArgSQLFunction { public CurrentTimeStamp() Added: trunk/nhibernate/src/NHibernate.Test/DialectTest/FunctionTests/SerializableTypesFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/DialectTest/FunctionTests/SerializableTypesFixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/DialectTest/FunctionTests/SerializableTypesFixture.cs 2009-03-10 17:54:00 UTC (rev 4121) @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Text; +using NUnit.Framework; +using NHibernate.Dialect.Function; +using System.Reflection; + +namespace NHibernate.Test.DialectTest.FunctionTests +{ + [TestFixture] + public class SerializableTypesFixture + { + [Test] + public void AllEmbeddedTypesAreMarkedSerializable() + { + NHAssert.InheritedAreMarkedSerializable(typeof(ISQLFunction)); + } + } +} Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-09 22:16:12 UTC (rev 4120) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-10 17:54:00 UTC (rev 4121) @@ -140,6 +140,7 @@ <Compile Include="DialectTest\DB2DialectFixture.cs" /> <Compile Include="DialectTest\DialectFixture.cs" /> <Compile Include="DialectTest\FirebirdDialectFixture.cs" /> + <Compile Include="DialectTest\FunctionTests\SerializableTypesFixture.cs" /> <Compile Include="DialectTest\MsSql2005DialectFixture.cs" /> <Compile Include="DialectTest\MsSqlDialectFixture.cs" /> <Compile Include="DialectTest\SqlCEDialectFixture.cs" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-03-09 22:16:17
|
Revision: 4120 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4120&view=rev Author: tehlike Date: 2009-03-09 22:16:12 +0000 (Mon, 09 Mar 2009) Log Message: ----------- Marking some UserTypes serializable. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.DomainModel/DoubleStringType.cs trunk/nhibernate/src/NHibernate.DomainModel/MultiplicityType.cs trunk/nhibernate/src/NHibernate.DomainModel/NHSpecific/NullInt32UserType.cs trunk/nhibernate/src/NHibernate.DomainModel/NHSpecific/NullableInt32Type.cs trunk/nhibernate/src/NHibernate.DomainModel/NHSpecific/NullableTypesType.cs trunk/nhibernate/src/NHibernate.DomainModel/NHSpecific/ParentComparer.cs Modified: trunk/nhibernate/src/NHibernate.DomainModel/DoubleStringType.cs =================================================================== --- trunk/nhibernate/src/NHibernate.DomainModel/DoubleStringType.cs 2009-03-07 21:45:52 UTC (rev 4119) +++ trunk/nhibernate/src/NHibernate.DomainModel/DoubleStringType.cs 2009-03-09 22:16:12 UTC (rev 4120) @@ -7,6 +7,7 @@ namespace NHibernate.DomainModel { + [Serializable] public class DoubleStringType : ICompositeUserType { public System.Type ReturnedClass Modified: trunk/nhibernate/src/NHibernate.DomainModel/MultiplicityType.cs =================================================================== --- trunk/nhibernate/src/NHibernate.DomainModel/MultiplicityType.cs 2009-03-07 21:45:52 UTC (rev 4119) +++ trunk/nhibernate/src/NHibernate.DomainModel/MultiplicityType.cs 2009-03-09 22:16:12 UTC (rev 4120) @@ -7,6 +7,7 @@ namespace NHibernate.DomainModel { + [Serializable] public class MultiplicityType : ICompositeUserType { private static readonly string[] PROP_NAMES = new String[] Modified: trunk/nhibernate/src/NHibernate.DomainModel/NHSpecific/NullInt32UserType.cs =================================================================== --- trunk/nhibernate/src/NHibernate.DomainModel/NHSpecific/NullInt32UserType.cs 2009-03-07 21:45:52 UTC (rev 4119) +++ trunk/nhibernate/src/NHibernate.DomainModel/NHSpecific/NullInt32UserType.cs 2009-03-09 22:16:12 UTC (rev 4120) @@ -10,6 +10,7 @@ /// <summary> /// Converts a value of 0 to a DbNull /// </summary> + [Serializable] public class NullInt32UserType : IUserType { private static NullableType _int32Type = NHibernateUtil.Int32; Modified: trunk/nhibernate/src/NHibernate.DomainModel/NHSpecific/NullableInt32Type.cs =================================================================== --- trunk/nhibernate/src/NHibernate.DomainModel/NHSpecific/NullableInt32Type.cs 2009-03-07 21:45:52 UTC (rev 4119) +++ trunk/nhibernate/src/NHibernate.DomainModel/NHSpecific/NullableInt32Type.cs 2009-03-09 22:16:12 UTC (rev 4120) @@ -9,6 +9,7 @@ /// <summary> /// A NHibernate <see cref="IType"/> for a <see cref="NullableInt32"/>. /// </summary> + [Serializable] public class NullableInt32Type : NullableTypesType { public NullableInt32Type() : base(SqlTypeFactory.Int32) Modified: trunk/nhibernate/src/NHibernate.DomainModel/NHSpecific/NullableTypesType.cs =================================================================== --- trunk/nhibernate/src/NHibernate.DomainModel/NHSpecific/NullableTypesType.cs 2009-03-07 21:45:52 UTC (rev 4119) +++ trunk/nhibernate/src/NHibernate.DomainModel/NHSpecific/NullableTypesType.cs 2009-03-09 22:16:12 UTC (rev 4120) @@ -10,6 +10,7 @@ /// Abstract type used for implementing NHibernate <see cref="IType"/>s for /// the Nullables library. /// </summary> + [Serializable] public abstract class NullableTypesType : ImmutableType { public NullableTypesType(SqlType type) : base(type) Modified: trunk/nhibernate/src/NHibernate.DomainModel/NHSpecific/ParentComparer.cs =================================================================== --- trunk/nhibernate/src/NHibernate.DomainModel/NHSpecific/ParentComparer.cs 2009-03-07 21:45:52 UTC (rev 4119) +++ trunk/nhibernate/src/NHibernate.DomainModel/NHSpecific/ParentComparer.cs 2009-03-09 22:16:12 UTC (rev 4120) @@ -6,6 +6,7 @@ /// <summary> /// Summary description for ParentComparer. /// </summary> + [Serializable] public class ParentComparer : IComparer { public ParentComparer() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-03-07 21:46:02
|
Revision: 4119 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4119&view=rev Author: tehlike Date: 2009-03-07 21:45:52 +0000 (Sat, 07 Mar 2009) Log Message: ----------- Removing inconclusive Linq Provider. The working one can be found from the following location: https://nhcontrib.svn.sourceforge.net/svnroot/nhcontrib/trunk/src/NHibernate.Linq/ Removed Paths: ------------- trunk/nhibernate/src/NHibernate.Linq/ trunk/nhibernate/src/NHibernate.Linq.Test/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |