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
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/NHibernate.Tool.Net2Hbm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7309/src/NHibernate.Tool.Net2Hbm Removed Files: .cvsignore AssemblyInfo.cs CascadeType.cs ClassAttribute.cs ClassPolymorphismType.cs CollectionCompositeElementAttribute.cs CollectionIndexAttribute.cs CollectionKeyAttribute.cs CollectionManyToManyAttribute.cs CollectionOneToManyAttribute.cs DiscriminatorAttribute.cs GeneratorParameterAttribute.cs IdAttribute.cs JoinedSubclassAttribute.cs JoinedSubclassKeyAttribute.cs ListAttribute.cs ManyToOneAttribute.cs MapGenerator.cs NHibernate.Tool.Net2Hbm-1.1.csproj NHibernate.Tool.Net2Hbm.build OuterJoinType.cs PropertyAttribute.cs SetAttribute.cs Size.cs SubclassAttribute.cs TypeKey.cs TypeNode.cs TypeNodeCollection.cs UnsavedValueType.cs VersionAttribute.cs readme.txt Log Message: Removed old project. --- ListAttribute.cs DELETED --- --- TypeKey.cs DELETED --- --- PropertyAttribute.cs DELETED --- --- IdAttribute.cs DELETED --- --- SetAttribute.cs DELETED --- --- CollectionManyToManyAttribute.cs DELETED --- --- Size.cs DELETED --- --- AssemblyInfo.cs DELETED --- --- CollectionKeyAttribute.cs DELETED --- --- UnsavedValueType.cs DELETED --- --- ClassPolymorphismType.cs DELETED --- --- NHibernate.Tool.Net2Hbm-1.1.csproj DELETED --- --- CascadeType.cs DELETED --- --- NHibernate.Tool.Net2Hbm.build DELETED --- --- CollectionIndexAttribute.cs DELETED --- --- readme.txt DELETED --- --- TypeNode.cs DELETED --- --- .cvsignore DELETED --- --- JoinedSubclassAttribute.cs DELETED --- --- OuterJoinType.cs DELETED --- --- ClassAttribute.cs DELETED --- --- CollectionOneToManyAttribute.cs DELETED --- --- JoinedSubclassKeyAttribute.cs DELETED --- --- GeneratorParameterAttribute.cs DELETED --- --- CollectionCompositeElementAttribute.cs DELETED --- --- DiscriminatorAttribute.cs DELETED --- --- ManyToOneAttribute.cs DELETED --- --- MapGenerator.cs DELETED --- --- VersionAttribute.cs DELETED --- --- SubclassAttribute.cs DELETED --- --- TypeNodeCollection.cs DELETED --- |
From: John M. <joh...@us...> - 2005-04-28 23:42:39
|
Update of /cvsroot/nhibernate/NHibernateContrib/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5203/src Modified Files: NHibernateContrib-1.1.sln Log Message: Moved the Net2Hbm project into the NHibernate.Mapping.Attributes project. Index: NHibernateContrib-1.1.sln =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/NHibernateContrib-1.1.sln,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NHibernateContrib-1.1.sln 4 Apr 2005 04:25:13 -0000 1.4 --- NHibernateContrib-1.1.sln 28 Apr 2005 23:42:30 -0000 1.5 *************** *** 20,24 **** EndProjectSection EndProject ! Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.Tool.Net2Hbm-1.1", "NHibernate.Tool.Net2Hbm\NHibernate.Tool.Net2Hbm-1.1.csproj", "{FD72BBE4-AA77-459A-9F1D-6B7C7143CF2A}" ProjectSection(ProjectDependencies) = postProject EndProjectSection --- 20,24 ---- EndProjectSection EndProject ! Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.Mapping.Attributes-1.1", "NHibernate.Mapping.Attributes\NHibernate.Mapping.Attributes-1.1.csproj", "{FD72BBE4-AA77-459A-9F1D-6B7C7143CF2A}" ProjectSection(ProjectDependencies) = postProject EndProjectSection |
From: John M. <joh...@us...> - 2005-04-28 23:42:39
|
Update of /cvsroot/nhibernate/NHibernateContrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5203 Modified Files: NHibernateContribSolution.build Log Message: Moved the Net2Hbm project into the NHibernate.Mapping.Attributes project. Index: NHibernateContribSolution.build =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/NHibernateContribSolution.build,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** NHibernateContribSolution.build 25 Apr 2005 03:34:14 -0000 1.13 --- NHibernateContribSolution.build 28 Apr 2005 23:42:30 -0000 1.14 *************** *** 140,144 **** <nant target="build" buildfile="src/Nullables.Tests/Nullables.Tests.build" /> <nant target="build" buildfile="src/NHibernate.Caches/SysCache/syscache.build" /> ! <nant target="build" buildfile="src/NHibernate.Tool.Net2Hbm/NHibernate.Tool.Net2Hbm.build" /> <nant target="build" buildfile="src/NHibernate.Tool.hbm2net/NHibernate.Tool.hbm2net.build" /> <nant target="build" buildfile="src/NHibernate.Tasks/NHibernate.Tasks.build" /> --- 140,144 ---- <nant target="build" buildfile="src/Nullables.Tests/Nullables.Tests.build" /> <nant target="build" buildfile="src/NHibernate.Caches/SysCache/syscache.build" /> ! <nant target="build" buildfile="src/NHibernate.Mapping.Attributes/NHibernate.Mapping.Attributes.build" /> <nant target="build" buildfile="src/NHibernate.Tool.hbm2net/NHibernate.Tool.hbm2net.build" /> <nant target="build" buildfile="src/NHibernate.Tasks/NHibernate.Tasks.build" /> *************** *** 222,226 **** <include name="NHibernate.Tool.hbm2ddl.dll" /> <include name="NHibernate.Tool.hbm2net.dll" /> ! <include name="NHibernate.Tool.Net2Hbm.dll" /> </assemblies> --- 222,226 ---- <include name="NHibernate.Tool.hbm2ddl.dll" /> <include name="NHibernate.Tool.hbm2net.dll" /> ! <include name="NHibernate.Mapping.Attributes.dll" /> </assemblies> |
Update of /cvsroot/nhibernate/NHibernateContrib/src/NHibernate.Mapping.Attributes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4811/src/NHibernate.Mapping.Attributes Added Files: .cvsignore AssemblyInfo.cs CascadeType.cs ClassAttribute.cs ClassPolymorphismType.cs CollectionCompositeElementAttribute.cs CollectionIndexAttribute.cs CollectionKeyAttribute.cs CollectionManyToManyAttribute.cs CollectionOneToManyAttribute.cs DiscriminatorAttribute.cs GeneratorParameterAttribute.cs IdAttribute.cs JoinedSubclassAttribute.cs JoinedSubclassKeyAttribute.cs ListAttribute.cs ManyToOneAttribute.cs MapGenerator.cs NHibernate.Mapping.Attributes-1.1.csproj NHibernate.Mapping.Attributes.build OuterJoinType.cs PropertyAttribute.cs SetAttribute.cs Size.cs SubclassAttribute.cs TypeKey.cs TypeNode.cs TypeNodeCollection.cs UnsavedValueType.cs VersionAttribute.cs readme.txt Log Message: Moved the Net2Hbm project into the NHibernate.Mapping.Attributes project. --- NEW FILE: ListAttribute.cs --- using System; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for ListAttribute. /// </summary> [AttributeUsage(AttributeTargets.Property)] public class ListAttribute : Attribute { #region Member Variables private string m_Table; private string m_Schema; private bool m_IsLazy; private bool m_IsInverse; private CascadeType m_Cascade = CascadeType.None; private string m_SqlWhere; private string m_Access = MapGenerator.DefaultAccessStrategy; #endregion /// <summary> /// Class constructor. /// </summary> public ListAttribute( string table ) { this.Table = table; } /// <summary> /// Gets and sets the Table. /// </summary> public string Table { get { return m_Table; } set { m_Table = value; } } /// <summary> /// Gets and sets the IsInverse. /// </summary> public bool IsInverse { get { return m_IsInverse; } set { m_IsInverse = value; } } /// <summary> /// Gets and sets the Schema. /// </summary> public string Schema { get { return m_Schema; } set { m_Schema = value; } } /// <summary> /// Gets and sets the IsLazy. /// </summary> public bool IsLazy { get { return m_IsLazy; } set { m_IsLazy = value; } } /// <summary> /// Gets and sets the Cascade. /// </summary> public CascadeType Cascade { get { return m_Cascade; } set { m_Cascade = value; } } /// <summary> /// Gets and sets the SqlWhere. /// </summary> public string SqlWhere { get { return m_SqlWhere; } set { m_SqlWhere = value; } } /// <summary> /// Gets and sets the Access. /// </summary> public string Access { get { return m_Access; } set { m_Access = value; } } /// <summary> /// Get and sets the access type. /// </summary> public Type AccessType { get { return Type.GetType( m_Access ); } set { m_Access = String.Format( "{0}, {1}", value.FullName, value.Assembly.GetName().Name ); } } } } --- NEW FILE: TypeKey.cs --- using System; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for TypeKey. /// </summary> internal class TypeKey : IComparable { #region Member Variables private System.Type m_Type; private System.Type m_ExtendsType; #endregion /// <summary> /// Class constructor. /// </summary> public TypeKey( System.Type type ) { m_Type = type; m_ExtendsType = FindExtendsType( type ); } /// <summary> /// Searchs the class hieracrhy for the first class with an attribute that we are looking for. /// </summary> /// <param name="type"></param> /// <returns></returns> private System.Type FindExtendsType( System.Type type ) { //check for joined subclass JoinedSubclassAttribute joinedSubclassAttr = (JoinedSubclassAttribute)Attribute.GetCustomAttribute( type, typeof(JoinedSubclassAttribute), false ); if( joinedSubclassAttr != null ) { if( joinedSubclassAttr.Extends != null ) { return joinedSubclassAttr.Extends; } else { return type.BaseType; } } else //check for subclass { SubclassAttribute subclassAttr = (SubclassAttribute)Attribute.GetCustomAttribute( type, typeof(SubclassAttribute), false ); if( subclassAttr != null ) { if( subclassAttr.Extends != null ) { return subclassAttr.Extends; } else { return type.BaseType; } } else //look to the base class { if( type.BaseType != null ) return FindExtendsType( type.BaseType ); else return null; } } } /// <summary> /// Gets and sets the Type. /// </summary> public System.Type Type { get { return m_Type; } } /// <summary> /// Gets and sets the ExtendsType. /// </summary> public System.Type ExtendsType { get { return m_ExtendsType; } } #region IComparable Members /// <summary> /// Compares the two objects. /// </summary> /// <param name="obj"></param> /// <returns></returns> public int CompareTo( object obj ) { if( obj is TypeKey ) { TypeKey other = (TypeKey)obj; if( this.Type == other.Type ) { return 0; } else if( this.ExtendsType == other.Type ) { return 1; } else if( other.ExtendsType == this.Type ) { return -1; } else { return -1; } } else { throw new ArgumentException(); } } #endregion } } --- NEW FILE: PropertyAttribute.cs --- using System; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for PropertyAttribute. /// </summary> [AttributeUsage(AttributeTargets.Property)] public class PropertyAttribute : Attribute { #region Member Variables private string m_Column; private System.Type m_Type; private string m_Access = MapGenerator.DefaultAccessStrategy; private bool m_Update = true; private bool m_Insert = true; private string m_Formula; private int m_Size; #endregion /// <summary> /// Class constructor. /// </summary> public PropertyAttribute() { } /// <summary> /// Class constructor. /// </summary> /// <param name="type"></param> public PropertyAttribute( System.Type type ) { this.Type = type; } /// <summary> /// Class constructor. /// </summary> /// <param name="column"></param> /// <param name="type"></param> public PropertyAttribute( string column, System.Type type ) : this( column ) { this.Type = type; } /// <summary> /// Class constructor. /// </summary> /// <param name="column"></param> /// <param name="type"></param> /// <param name="size"></param> public PropertyAttribute( string column, System.Type type, int size ) : this( column, size ) { this.Type = type; } /// <summary> /// Class constructor. /// </summary> /// <param name="size"></param> public PropertyAttribute( int size ) { this.Size = size; } /// <summary> /// Class constructor. /// </summary> public PropertyAttribute( string column ) { this.Column = column; } /// <summary> /// Class constructor. /// </summary> /// <param name="column"></param> /// <param name="size"></param> public PropertyAttribute( string column, int size ) : this( column ) { this.Size = size; } /// <summary> /// Gets and sets the Size. /// </summary> public int Size { get { return m_Size; } set { m_Size = value; } } /// <summary> /// Gets and sets the Access. /// </summary> public string Access { get { return m_Access; } set { m_Access = value; } } /// <summary> /// Get and sets the access type. /// </summary> public Type AccessType { get { return Type.GetType( m_Access ); } set { m_Access = String.Format( "{0}, {1}", value.FullName, value.Assembly.GetName().Name ); } } /// <summary> /// Gets and sets the Column. /// </summary> public string Column { get { return m_Column; } set { m_Column = value; } } /// <summary> /// Gets and sets the Type. /// </summary> public System.Type Type { get { return m_Type; } set { m_Type = value; } } /// <summary> /// Gets and sets the Update. /// </summary> public bool Update { get { return m_Update; } set { m_Update = value; } } /// <summary> /// Gets and sets the Insert. /// </summary> public bool Insert { get { return m_Insert; } set { m_Insert = value; } } /// <summary> /// Gets and sets the Formula. /// </summary> public string Formula { get { return m_Formula; } set { m_Formula = value; } } } } --- NEW FILE: IdAttribute.cs --- using System; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for IdAttribute. /// </summary> [AttributeUsage(AttributeTargets.Property)] public class IdAttribute : Attribute { #region Member Variables private string m_Column; private string m_Access = MapGenerator.DefaultAccessStrategy; private UnsavedValueType m_UnsavedValueType = UnsavedValueType.Null; private string m_UnsavedValue; private System.Type m_Generator; #endregion /// <summary> /// Class constructor. /// </summary> public IdAttribute( string column, System.Type generator ) { this.Column = column; this.Generator = generator; } /// <summary> /// Gets and sets the Column. /// </summary> public string Column { get { return m_Column; } set { m_Column = value; } } /// <summary> /// Gets and sets the Access. /// </summary> public string Access { get { return m_Access; } set { m_Access = value; } } /// <summary> /// Get and sets the access type. /// </summary> public Type AccessType { get { return Type.GetType( m_Access ); } set { m_Access = String.Format( "{0}, {1}", value.FullName, value.Assembly.GetName().Name ); } } /// <summary> /// Gets and sets the UnsavedValueType. /// </summary> public UnsavedValueType UnsavedValueType { get { return m_UnsavedValueType; } set { m_UnsavedValueType = value; } } /// <summary> /// Gets and sets the UnsavedValue. /// </summary> public string UnsavedValue { get { return m_UnsavedValue; } set { m_UnsavedValue = value; } } /// <summary> /// Gets and sets the Generator. /// </summary> public System.Type Generator { get { return m_Generator; } set { m_Generator = value; } } } } --- NEW FILE: SetAttribute.cs --- using System; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for SetAttribute. /// </summary> [AttributeUsage(AttributeTargets.Property)] public class SetAttribute : Attribute { #region Member Variables private string m_Table; private string m_Schema; private bool m_IsLazy; private CascadeType m_Cascade = CascadeType.None; private string m_SqlWhere; private string m_Access = MapGenerator.DefaultAccessStrategy; #endregion /// <summary> /// Class constructor. /// </summary> public SetAttribute( string table ) { this.Table = table; } /// <summary> /// Gets and sets the Table. /// </summary> public string Table { get { return m_Table; } set { m_Table = value; } } /// <summary> /// Gets and sets the Schema. /// </summary> public string Schema { get { return m_Schema; } set { m_Schema = value; } } /// <summary> /// Gets and sets the IsLazy. /// </summary public bool IsLazy { get { return m_IsLazy; } set { m_IsLazy = value; } } /// <summary> /// Gets and sets the Cascade. /// </summary> public CascadeType Cascade { get { return m_Cascade; } set { m_Cascade = value; } } /// <summary> /// Gets and sets the SqlWhere. /// </summary> public string SqlWhere { get { return m_SqlWhere; } set { m_SqlWhere = value; } } /// <summary> /// Gets and sets the Access. /// </summary> public string Access { get { return m_Access; } set { m_Access = value; } } /// <summary> /// Get and sets the access type. /// </summary> public Type AccessType { get { return Type.GetType( m_Access ); } set { m_Access = String.Format( "{0}, {1}", value.FullName, value.Assembly.GetName().Name ); } } } } --- NEW FILE: CollectionManyToManyAttribute.cs --- using System; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for CollectionManyToManyAttribute. /// </summary> [AttributeUsage(AttributeTargets.Property)] public class CollectionManyToManyAttribute : Attribute { #region Member Variables private string m_Column; private OuterJoinType m_OuterJoin; private System.Type m_Type; #endregion /// <summary> /// Class constructor. /// </summary> public CollectionManyToManyAttribute( string column, System.Type type ) { this.Column = column; this.Type = type; } /// <summary> /// Gets and sets the Column. /// </summary> public string Column { get { return m_Column; } set { m_Column = value; } } /// <summary> /// Gets and sets the OuterJoin. /// </summary> public OuterJoinType OuterJoin { get { return m_OuterJoin; } set { m_OuterJoin = value; } } /// <summary> /// Gets and sets the Type. /// </summary> public System.Type Type { get { return m_Type; } set { m_Type = value; } } } } --- NEW FILE: NHibernate.Mapping.Attributes.build --- <?xml version="1.0" ?> <project name="NHibernate.Mapping.Attributes" default="build" xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd" > <!-- Required properties: * build.dir - (path) root level to build to, assemblies will go in ${build.dir}/bin * build.debug - (true|false) debug build? * current.build.defines - framework-specific build defines * project.version - full project version * project.version.major - the major number of the build * project.version.minor - the minor number of the build * project.version.build - the build number * sign - (true|false)indicates if the Assembly should be signed. * clover.enabled - (true|false) indicates if Clover.NET should handle the build * clover.src - location of the clovered source to be stored at from the root of NHibernateContrib * clover.db - location of the coverage db from the root of NHibernateContrib * clover.assembly - assembly that contains clover tasks for this version of NAnt --> <if test="${clover.enabled}"> <loadtasks assembly="${clover.home}/${clover.assembly}" /> </if> <property name="keyFile" value="..\NHibernate.snk" /> <target name="build" description="Build NHibernate.Mapping.Attributes"> <if test="${clover.enabled}"> <clover-setup initstring="..\..\${clover.db}" builddir="..\..\${clover.src}\${nant.project.name}" enabled="${clover.enabled}" flushinterval="1000" /> </if> <!-- ensure the AssemblyInfo is writable --> <attrib file="AssemblyInfo.cs" readonly="false" /> <asminfo output="AssemblyInfo.cs" language="CSharp"> <imports> <import namespace="System" /> <import namespace="System.Reflection" /> <import namespace="System.Runtime.CompilerServices" /> </imports> <attributes> <attribute type="CLSCompliantAttribute" value="true" /> <attribute type="AssemblyTitleAttribute" value="${nant.project.name} for ${current.runtime.description}" /> <attribute type="AssemblyDescriptionAttribute" value="An attribute library which provides support for custom attributes that can be used in the generation of NHibernate ${project.version} mapping files." /> <attribute type="AssemblyCompanyAttribute" value="nhibernate.sourceforge.net" /> <attribute type="AssemblyProductAttribute" value="${nant.project.name}" /> <attribute type="AssemblyCopyrightAttribute" value="Licensed under LGPL." /> <attribute type="AssemblyVersionAttribute" value="0.5.0.0" /> <attribute type="AssemblyInformationalVersionAttribute" value="0.5" /> <attribute type="AssemblyFileVersionAttribute" value="0.5.0.0" /> <attribute type="AssemblyKeyFileAttribute" value="${keyFile}" if="${sign}"/> </attributes> </asminfo> <csc target="library" define="${current.build.defines}" debug="${build.debug}" output="${build.dir}/bin/${nant.project.name}.dll" doc="${build.dir}/bin/${nant.project.name}.xml" > <sources failonempty="true"> <include name="**/*.cs" /> </sources> <references basedir="${build.dir}/bin"> <include name="${nant.settings.currentframework.frameworkassemblydirectory}/System.dll" /> <include name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Data.dll" /> <include name="${nant.settings.currentframework.frameworkassemblydirectory}/System.XML.dll" /> </references> </csc> </target> </project> --- NEW FILE: Size.cs --- using System; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for Size. /// </summary> public class Size { #region Member Variables public const int Max = 2147483647; #endregion /// <summary> /// Class constructor. /// </summary> private Size() { } } } --- NEW FILE: AssemblyInfo.cs --- using System; using System.Reflection; using System.Runtime.CompilerServices; //------------------------------------------------------------------------------ // <autogenerated> // This code was generated by a tool. // Runtime Version: 1.1.4322.573 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </autogenerated> //------------------------------------------------------------------------------ [assembly: CLSCompliantAttribute(true)] [assembly: AssemblyTitleAttribute("NHibernate.Mapping.Attributes for Microsoft .NET Framework 1.1")] [assembly: AssemblyDescriptionAttribute("An attribute library which provides support for custom attributes that can be use" + "d in the generation of NHibernate 0.8.0.0 mapping files.")] [assembly: AssemblyCompanyAttribute("nhibernate.sourceforge.net")] [assembly: AssemblyProductAttribute("NHibernate.Mapping.Attributes")] [assembly: AssemblyCopyrightAttribute("Licensed under LGPL.")] [assembly: AssemblyVersionAttribute("0.8.0.0")] [assembly: AssemblyInformationalVersionAttribute("0.8")] [assembly: AssemblyFileVersionAttribute("0.8.0.0")] --- NEW FILE: CollectionKeyAttribute.cs --- using System; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for CollectionKeyAttribute. /// </summary> [AttributeUsage(AttributeTargets.Property)] public class CollectionKeyAttribute : Attribute { #region Member Variables private string m_Column; #endregion /// <summary> /// Class constructor. /// </summary> public CollectionKeyAttribute( string column ) { this.Column = column; } /// <summary> /// Gets and sets the Column. /// </summary> public string Column { get { return m_Column; } set { m_Column = value; } } } } --- NEW FILE: UnsavedValueType.cs --- using System; using System.Xml.Serialization; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for UnsavedValueType. /// </summary> public enum UnsavedValueType { [XmlEnum("null")] Null, [XmlEnum("any")] Any, [XmlEnum("none")] None, Specified } } --- NEW FILE: ClassPolymorphismType.cs --- using System; using System.Xml.Serialization; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for ClassPolymorphismType. /// </summary> public enum ClassPolymorphismType { [XmlEnum("implicit")] Implicit = 0, [XmlEnum("explicit")] Explicit = 1 } } --- NEW FILE: NHibernate.Mapping.Attributes-1.1.csproj --- <VisualStudioProject> <CSHARP ProjectType = "Local" ProductVersion = "7.10.3077" SchemaVersion = "2.0" ProjectGuid = "{FD72BBE4-AA77-459A-9F1D-6B7C7143CF2A}" > <Build> <Settings ApplicationIcon = "" AssemblyKeyContainerName = "" AssemblyName = "NHibernate.Mapping.Attributes" AssemblyOriginatorKeyFile = "" DefaultClientScript = "JScript" DefaultHTMLPageLayout = "Grid" DefaultTargetSchema = "IE50" DelaySign = "false" OutputType = "Library" PreBuildEvent = "" PostBuildEvent = "" RootNamespace = "NHibernate.Mapping.Attributes" RunPostBuildEvent = "OnBuildSuccess" StartupObject = "" > <Config Name = "Debug" AllowUnsafeBlocks = "false" BaseAddress = "285212672" CheckForOverflowUnderflow = "false" ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" DocumentationFile = "" DebugSymbols = "true" FileAlignment = "4096" IncrementalBuild = "false" NoStdLib = "false" NoWarn = "" Optimize = "false" OutputPath = "bin\Debug\" RegisterForComInterop = "false" RemoveIntegerChecks = "false" TreatWarningsAsErrors = "false" WarningLevel = "4" /> <Config Name = "Release" AllowUnsafeBlocks = "false" BaseAddress = "285212672" CheckForOverflowUnderflow = "false" ConfigurationOverrideFile = "" DefineConstants = "TRACE" DocumentationFile = "" DebugSymbols = "false" FileAlignment = "4096" IncrementalBuild = "false" NoStdLib = "false" NoWarn = "" Optimize = "true" OutputPath = "bin\Release\" RegisterForComInterop = "false" RemoveIntegerChecks = "false" TreatWarningsAsErrors = "false" WarningLevel = "4" /> </Settings> <References> <Reference Name = "System" AssemblyName = "System" HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll" /> <Reference Name = "System.Data" AssemblyName = "System.Data" HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" /> <Reference Name = "System.XML" AssemblyName = "System.Xml" HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" /> </References> </Build> <Files> <Include> <File RelPath = "AssemblyInfo.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "CascadeType.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "ClassAttribute.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "ClassPolymorphismType.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "CollectionCompositeElementAttribute.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "CollectionIndexAttribute.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "CollectionKeyAttribute.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "CollectionManyToManyAttribute.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "CollectionOneToManyAttribute.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "DiscriminatorAttribute.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "GeneratorParameterAttribute.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "IdAttribute.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "JoinedSubclassAttribute.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "JoinedSubclassKeyAttribute.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "ListAttribute.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "ManyToOneAttribute.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "MapGenerator.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "NHibernate.Mapping.Attributes.build" BuildAction = "None" /> <File RelPath = "OuterJoinType.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "PropertyAttribute.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "readme.txt" BuildAction = "Content" /> <File RelPath = "SetAttribute.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "Size.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "SubclassAttribute.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "TypeKey.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "TypeNode.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "TypeNodeCollection.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "UnsavedValueType.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "VersionAttribute.cs" SubType = "Code" BuildAction = "Compile" /> </Include> </Files> </CSHARP> </VisualStudioProject> --- NEW FILE: CascadeType.cs --- using System; using System.Xml.Serialization; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for Cascade. /// </summary> public enum CascadeType { [XmlEnum("none")] None, [XmlEnum("all")] All, [XmlEnum("save-update")] SaveUpdate, [XmlEnum("delete")] Delete } } --- NEW FILE: CollectionIndexAttribute.cs --- using System; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for CollectionIndexAttribute. /// </summary> [AttributeUsage(AttributeTargets.Property)] public class CollectionIndexAttribute : Attribute { #region Member Variables private string m_Column; #endregion /// <summary> /// Class constructor. /// </summary> public CollectionIndexAttribute( string column ) { this.Column = column; } /// <summary> /// Gets and sets the Column. /// </summary> public string Column { get { return m_Column; } set { m_Column = value; } } } } --- NEW FILE: readme.txt --- NHibernate.Mapping.Attributes ---------------------------------------------------- The NHibernate.Mapping.Attributes tool can be used to generate NHibernate mapping documents. The tool uses .NET attributes to allow the programmer to decorate their code with attributes. These attributes are interpreted by the MapGenerator class. The resulting map stream can be used to configure the NHibernate configuration object. --- NEW FILE: TypeNode.cs --- using System; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for TypeNode. /// </summary> internal class TypeNode { #region Member Variables private System.Type m_Type; private TypeNodeCollection m_Nodes; #endregion /// <summary> /// Class constructor. /// </summary> public TypeNode( System.Type type ) { m_Type = type; m_Nodes = new TypeNodeCollection(); } /// <summary> /// Gets and sets the Nodes. /// </summary> public TypeNodeCollection Nodes { get { return m_Nodes; } } /// <summary> /// Gets and sets the Type. /// </summary> public System.Type Type { get { return m_Type; } set { m_Type = value; } } } } --- NEW FILE: .cvsignore --- bin obj .#* *.user *.xsx --- NEW FILE: JoinedSubclassAttribute.cs --- using System; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for JoinedSubclassAttribute. /// </summary> [AttributeUsage(AttributeTargets.Class)] public class JoinedSubclassAttribute : Attribute { #region Member Variables private System.Type m_Extends; // private System.Type m_Proxy; private bool m_DynamicUpdate; private bool m_DynamicInsert; private string m_Table; #endregion /// <summary> /// Class constructor. /// </summary> public JoinedSubclassAttribute( string table ) { this.Table = table; } /// <summary> /// Class constructor. /// </summary> /// <param name="table"></param> /// <param name="extends"></param> public JoinedSubclassAttribute( string table, System.Type extends ) : this( table ) { this.Extends = extends; } /// <summary> /// Gets and sets the Table. /// </summary> public string Table { get { return m_Table; } set { m_Table = value; } } /// <summary> /// Gets and sets the Extends. /// </summary> public System.Type Extends { get { return m_Extends; } set { m_Extends = value; } } /// <summary> /// Gets and sets the DynamicUpdate. /// </summary> public bool DynamicUpdate { get { return m_DynamicUpdate; } set { m_DynamicUpdate = value; } } /// <summary> /// Gets and sets the DynamicInsert. /// </summary> public bool DynamicInsert { get { return m_DynamicInsert; } set { m_DynamicInsert = value; } } // /// <summary> // /// Gets and sets the Proxy. // /// </summary> // public System.Type Proxy // { // get { return m_Proxy; } // set { m_Proxy = value; } // } } } --- NEW FILE: OuterJoinType.cs --- using System; using System.Xml.Serialization; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for OuterJoinType. /// </summary> public enum OuterJoinType { [XmlEnum("auto")] Auto, [XmlEnum("true")] True, [XmlEnum("false")] False } } --- NEW FILE: ClassAttribute.cs --- using System; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for ClassAttribute. /// </summary> [AttributeUsage(AttributeTargets.Class)] public class ClassAttribute : Attribute { #region Member Variables private string m_Table; private bool m_Mutable; private string m_Schema; private string m_DiscriminatorValue; // private System.Type m_Proxy; private bool m_DynamicUpdate; private bool m_DynamicInsert; private ClassPolymorphismType m_Polymorphism = ClassPolymorphismType.Implicit; private string m_SqlWhere; private System.Type m_Persister; #endregion /// <summary> /// Class constructor. /// </summary> public ClassAttribute( string table ) { this.Table = table; } /// <summary> /// Gets and sets the Table. /// </summary> public string Table { get { return m_Table; } set { m_Table = value; } } /// <summary> /// Gets and sets the DiscriminatorValue. /// </summary> public string DiscriminatorValue { get { return m_DiscriminatorValue; } set { m_DiscriminatorValue = value; } } /// <summary> /// Gets and sets the Mutable. /// </summary> public bool Mutable { get { return m_Mutable; } set { m_Mutable = value; } } /// <summary> /// Gets and sets the DynamicUpdate. /// </summary> public bool DynamicUpdate { get { return m_DynamicUpdate; } set { m_DynamicUpdate = value; } } /// <summary> /// Gets and sets the DynamicInsert. /// </summary> public bool DynamicInsert { get { return m_DynamicInsert; } set { m_DynamicInsert = value; } } /// <summary> /// Gets and sets the Polymorphism. /// </summary> public ClassPolymorphismType Polymorphism { get { return m_Polymorphism; } set { m_Polymorphism = value; } } /// <summary> /// Gets and sets the SqlWhere. /// </summary> public string SqlWhere { get { return m_SqlWhere; } set { m_SqlWhere = value; } } /// <summary> /// Gets and sets the Persister. /// </summary> public System.Type Persister { get { return m_Persister; } set { m_Persister = value; } } /// <summary> /// Gets and sets the Schema. /// </summary> public string Schema { get { return m_Schema; } set { m_Schema = value; } } // /// <summary> // /// Gets and sets the Proxy. // /// </summary> // public System.Type Proxy // { // get { return m_Proxy; } // set { m_Proxy = value; } // } } } --- NEW FILE: CollectionOneToManyAttribute.cs --- using System; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for CollectionOneToManyAttribute. /// </summary> [AttributeUsage(AttributeTargets.Property)] public class CollectionOneToManyAttribute : Attribute { #region Member Variables private System.Type m_Type; #endregion /// <summary> /// Class constructor. /// </summary> public CollectionOneToManyAttribute( System.Type type ) { this.Type = type; } /// <summary> /// Gets and sets the Type. /// </summary> public System.Type Type { get { return m_Type; } set { m_Type = value; } } } } --- NEW FILE: JoinedSubclassKeyAttribute.cs --- using System; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for JoinedSubclassKeyAttribute. /// </summary> [AttributeUsage(AttributeTargets.Class)] public class JoinedSubclassKeyAttribute : Attribute { #region Member Variables private string m_Column; #endregion /// <summary> /// Class constructor. /// </summary> public JoinedSubclassKeyAttribute( string column ) { this.Column = column; } /// <summary> /// Gets and sets the Column. /// </summary> public string Column { get { return m_Column; } set { m_Column = value; } } } } --- NEW FILE: GeneratorParameterAttribute.cs --- using System; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for GeneratorParameterAttribute. /// </summary> [AttributeUsage(AttributeTargets.Property, AllowMultiple=true)] public class GeneratorParameterAttribute : Attribute { #region Member Variables private string m_Name; private string m_Value; #endregion /// <summary> /// Class constructor. /// </summary> public GeneratorParameterAttribute( string name, string value ) { m_Name = name; m_Value = value; } /// <summary> /// Gets and sets the Name. /// </summary> public string Name { get { return m_Name; } set { m_Name = value; } } /// <summary> /// Gets and sets the Value. /// </summary> public string Value { get { return m_Value; } set { m_Value = value; } } } } --- NEW FILE: CollectionCompositeElementAttribute.cs --- using System; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for CollectionCompositeElementAttribute. /// </summary> [AttributeUsage(AttributeTargets.Property)] public class CollectionCompositeElementAttribute : Attribute { #region Member Variables private System.Type m_Type; #endregion /// <summary> /// Class constructor. /// </summary> public CollectionCompositeElementAttribute( System.Type type ) { this.Type = type; } /// <summary> /// Gets and sets the Type. /// </summary> public System.Type Type { get { return m_Type; } set { m_Type = value; } } } } --- NEW FILE: DiscriminatorAttribute.cs --- using System; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for DiscriminatorAttribute. /// </summary> [AttributeUsage(AttributeTargets.Class)] public class DiscriminatorAttribute : Attribute { #region Member Variables private string m_Column; private System.Type m_Type; private bool m_Force; #endregion /// <summary> /// Class constructor. /// </summary> public DiscriminatorAttribute( string column, System.Type type ) { m_Column = column; m_Type = type; } /// <summary> /// Class constructor. /// </summary> /// <param name="column"></param> /// <param name="force"></param> public DiscriminatorAttribute( string column, System.Type type, bool force ) : this( column, type ) { m_Force = force; } /// <summary> /// Gets and sets the Column. /// </summary> public string Column { get { return m_Column; } set { m_Column = value; } } /// <summary> /// Gets and sets the Force. /// </summary> public bool Force { get { return m_Force; } set { m_Force = value; } } /// <summary> /// Gets and sets the Type. /// </summary> public System.Type Type { get { return m_Type; } set { m_Type = value; } } } } --- NEW FILE: ManyToOneAttribute.cs --- using System; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for ManyToOneAttribute. /// </summary> [AttributeUsage(AttributeTargets.Property)] public class ManyToOneAttribute : Attribute { #region Member Variables private string m_Column; private System.Type m_Type; private bool m_Update = true; private bool m_Insert = true; private OuterJoinType m_OuterJoin; private CascadeType m_Cascade; private bool m_Inheritable = true; private string m_Access = MapGenerator.DefaultAccessStrategy; #endregion /// <summary> /// Class constructor. /// </summary> /// <param name="type"></param> public ManyToOneAttribute( System.Type type ) { this.Type = type; } /// <summary> /// Class constructor. /// </summary> public ManyToOneAttribute( string column ) { this.Column = column; } /// <summary> /// Class constructor. /// </summary> public ManyToOneAttribute( string column, System.Type type ) : this( column ) { this.Type = type; } /// <summary> /// Gets and sets the Column. /// </summary> public string Column { get { return m_Column; } set { m_Column = value; } } /// <summary> /// Gets and sets the Update. /// </summary> public bool Update { get { return m_Update; } set { m_Update = value; } } /// <summary> /// Gets and sets the Insert. /// </summary> public bool Insert { get { return m_Insert; } set { m_Insert = value; } } /// <summary> /// Gets and sets the OuterJoin. /// </summary> public OuterJoinType OuterJoin { get { return m_OuterJoin; } set { m_OuterJoin = value; } } /// <summary> /// Gets and sets the Cascade. /// </summary> public CascadeType Cascade { get { return m_Cascade; } set { m_Cascade = value; } } /// <summary> /// Gets and sets the Inheritable. /// </summary> public bool Inheritable { get { return m_Inheritable; } set { m_Inheritable = value; } } /// <summary> /// Gets and sets the Type. /// </summary> public System.Type Type { get { return m_Type; } set { m_Type = value; } } /// <summary> /// Gets and sets the Access. /// </summary> public string Access { get { return m_Access; } set { m_Access = value; } } /// <summary> /// Get and sets the access type. /// </summary> public Type AccessType { get { return Type.GetType( m_Access ); } set { m_Access = String.Format( "{0}, {1}", value.FullName, value.Assembly.GetName().Name ); } } } } --- NEW FILE: MapGenerator.cs --- using System; using System.Collections; using System.Reflection; using System.IO; using System.Xml; using System.Xml.Serialization; using System.Text.RegularExpressions; namespace NHibernate.Mapping.Attributes { /// <summary> /// Summary description for MapGenerator. /// </summary> public sealed class MapGenerator { #region Constants public const string DefaultAccessStrategy = "property"; #endregion #region Member Variables private SortedList m_Types; #endregion /// <summary> /// Class constructor. /// </summary> public MapGenerator() { m_Types = new SortedList(); } /// <summary> /// Adds the assembly's types to the generator. /// </summary> /// <param name="assembly"></param> public void AddAssembly( string assembly ) { this.AddAssembly( Assembly.Load( assembly ) ); } /// <summary> /// Adds the assembly's types to the generator. /// </summary> /// <param name="assembly"></param> public void AddAssembly( Assembly assembly ) { System.Type[] types = assembly.GetTypes(); foreach( System.Type type in types ) { if( type.IsClass ) { AddClass( type ); } } } /// <summary> /// Adds the class type to the generator. /// </summary> /// <param name="type"></param> public void AddClass( System.Type type ) { if( type.IsClass ) { if( type.IsDefined( typeof(ClassAttribute), true ) || type.IsDefined( typeof(JoinedSubclassAttribute), true ) || type.IsDefined( typeof(SubclassAttribute), true ) ) { m_Types.Add( new TypeKey( type ), type ); } } else { throw new ArgumentException( "Invalid type. Only class types can be added to the generator.", "type" ); } } /// <summary> /// Generates the mapping. /// </summary> /// <param name="map"></param> public void Generate( Stream map ) { // //create the stream we will use to write the xml into // XmlWriter writer = new XmlTextWriter( map, System.Text.Encoding.UTF8 ); writer.WriteComment( String.Format( "Generated on {0}.", DateTime.Now ) ); writer.WriteStartElement("hibernate-mapping", "urn:nhibernate-mapping-2.0" ); // //write each type into the stream // TypeNodeCollection nodes = BuildTypeDependencyTree( m_Types ); foreach( TypeNode node in nodes ) { WriteTypeNode( writer, node ); } writer.WriteEndElement(); //</hibernate-mapping> writer.Flush(); } /// <summary> /// Writes the type's map information into the xml writer. /// </summary> /// <param name="writer"></param> /// <param name="node"></param> private void WriteTypeNode( XmlWriter writer, TypeNode node ) { bool looking = true; System.Type type = node.Type; while( looking ) { if( Attribute.IsDefined( type, typeof(ClassAttribute), false ) ) { writer.WriteComment( GetShortTypeName( node.Type ) ); WriteClass( writer, node, type ); looking = false; } else if( Attribute.IsDefined( type, typeof(JoinedSubclassAttribute), false ) ) { writer.WriteComment( GetShortTypeName( node.Type ) ); WriteJoinedSubclass( writer, node, type ); looking = false; } else if( Attribute.IsDefined( type, typeof(SubclassAttribute), false ) ) { writer.WriteComment( GetShortTypeName( node.Type ) ); WriteSubclass( writer, node, type ); looking = false; } else { type = type.BaseType; looking = true; } } } /// <summary> /// Writes the collection. /// </summary> /// <param name="writer"></param> /// <param name="type"></param> private void WriteCollections( XmlWriter writer, System.Type type ) { PropertyInfo[] listProps = FindAttributedProperties( typeof(ListAttribute), type ); foreach( PropertyInfo listProp in listProps ) { WriteList( writer, listProp ); } PropertyInfo[] setProps = FindAttributedProperties( typeof(SetAttribute), type ); foreach( PropertyInfo setProp in setProps ) { WriteSet( writer, setProp ); } } /// <summary> /// Writes the list. /// </summary> /// <param name="writer"></param> /// <param name="parentNode"></param> private void WriteList( XmlWriter writer, PropertyInfo property ) { ListAttribute attribute = (ListAttribute)Attribute.GetCustomAttribute( property, typeof(ListAttribute) ); writer.WriteStartElement( "list" ); writer.WriteAttributeString( "name", property.Name ); writer.WriteAttributeString( "table", attribute.Table ); writer.WriteAttributeString( "access", attribute.Access ); if( attribute.IsLazy ) writer.WriteAttributeString( "lazy", "true" ); if( attribute.IsInverse ) writer.WriteAttributeString( "inverse", "true" ); WriteCollectionKey( writer, property ); WriteCollectionIndex( writer, property ); WriteCollectionOneToMany( writer, property ); WriteCollectionCompositeElement( writer, property ); WriteCollectionManyToMany( writer, property ); writer.WriteEndElement(); //<list> } /// <summary> /// Writes the list. /// </summary> /// <param name="writer"></param> /// <param name="parentNode"></param> private void WriteSet( XmlWriter writer, PropertyInfo property ) { SetAttribute attribute = (SetAttribute)Attribute.GetCustomAttribute( property, typeof(SetAttribute) ); writer.WriteStartElement( "set" ); writer.WriteAttributeString( "name", property.Name ); writer.WriteAttributeString( "table", attribute.Table ); writer.WriteAttributeString( "access", attribute.Access ); if( attribute.IsLazy ) writer.WriteAttributeString( "lazy", "true" ); WriteCollectionKey( writer, property ); WriteCollectionOneToMany( writer, property ); WriteCollectionCompositeElement( writer, property ); writer.WriteEndElement(); //<list> } /// <summary> /// Writes the collection key. /// </summary> /// <param name="writer"></param> /// <param name="property"></param> private void WriteCollectionKey( XmlWriter writer, PropertyInfo property ) { CollectionKeyAttribute attribute = (CollectionKeyAttribute)Attribute.GetCustomAttribute( property, typeof(CollectionKeyAttribute) ); if( attribute != null ) { writer.WriteStartElement( "key" ); writer.WriteAttributeString( "column", attribute.Column ); writer.WriteEndElement(); //</key> } } /// <summary> /// Writes the collection index. /// </summary> /// <param name="writer"></param> /// <param name="type"></param> private void WriteDiscriminator( XmlWriter writer, System.Type type ) { DiscriminatorAttribute attribute = (DiscriminatorAttribute)Attribute.GetCustomAttribute( type, typeof(DiscriminatorAttribute) ); if( attribute != null ) { writer.WriteStartElement( "discriminator" ); writer.WriteAttributeString( "column", attribute.Column ); writer.WriteAttributeString( "type", GetShortTypeName( attribute.Type ) ); if( attribute.Force ) writer.WriteAttributeString( "force", "true" ); writer.WriteEndElement(); //</discriminator> } } /// <summary> /// Writes the collection index. /// </summary> /// <param name="writer"></param> /// <param name="property"></param> private void WriteCollectionIndex( XmlWriter writer, PropertyInfo property ) { CollectionIndexAttribute attribute = (CollectionIndexAttribute)Attribute.GetCustomAttribute( property, typeof(CollectionIndexAttribute) ); if( attribute != null ) { writer.WriteStartElement( "index" ); writer.WriteAttributeString( "column", attribute.Column ); writer.WriteEndElement(); //</index> } } /// <summary> /// Writes the collection composite element. /// </summary> /// <param name="writer"></param> /// <param name="property"></param> private void WriteCollectionCompositeElement( XmlWriter writer, PropertyInfo property ) { CollectionCompositeElementAttribute attribute = (CollectionCompositeElementAttribute)Attribute.GetCustomAttribute( property, typeof(CollectionCompositeElementAttribute) ); if( attribute != null ) { writer.WriteStartElement( "composite-element" ); writer.WriteAttributeString( "class", GetShortTypeName( attribute.Type ) ); WriteProperties( writer, attribute.Type ); writer.WriteEndElement(); //</composite-element> } } /// <summary> /// Writes the collection many to many. /// </summary> /// <param name="writer"></param> /// <param name="property"></param> private void WriteCollectionManyToMany( XmlWriter writer, PropertyInfo property ) { CollectionManyToManyAttribute attribute = (CollectionManyToManyAttribute)Attribute.GetCustomAttribute( property, typeof(CollectionManyToManyAttribute) ); if( attribute != null ) { writer.WriteStartElement( "many-to-many" ); writer.WriteAttributeString( "column", attribute.Column ); writer.WriteAttributeString( "class", GetShortTypeName( attribute.Type ) ); writer.WriteEndElement(); //</many-to-many> } } /// <summary> /// Writes the collection one to many tag. /// </summary> /// <param name="writer"></param> /// <param name="property"></param> private void WriteCollectionOneToMany( XmlWriter writer, PropertyInfo property ) { CollectionOneToManyAttribute attribute = (CollectionOneToManyAttribute)Attribute.GetCustomAttribute( property, typeof(CollectionOneToManyAttribute) ); if( attribute != null ) { writer.WriteStartElement( "one-to-many" ); writer.WriteAttributeString( "class", GetShortTypeName( attribute.Type ) ); writer.WriteEndElement(); //<one-to-many> } } /// <summary> /// Writes the subclass. /// </summary> private void WriteSubclass( XmlWriter writer, TypeNode node, System.Type type ) { SubclassAttribute attribute = (SubclassAttribute)Attribute.GetCustomAttribute( type, typeof(SubclassAttribute), true ); writer.WriteStartElement( "subclass" ); writer.WriteAttributeString( "name", GetShortTypeName( node.Type ) ); if( attribute.DiscriminatorValue != null ) writer.WriteAttributeString( "discriminator-value", attribute.DiscriminatorValue ); if( attribute.DynamicInsert ) writer.WriteAttributeString( "dynamic-insert", "true" ); if( attribute.DynamicUpdate ) writer.WriteAttributeString( "dynamic-update", "true" ); WriteProperties( writer, type ); WriteCollections( writer, type ); WriteAssociations( writer, type ); foreach( TypeNode childNode in node.Nodes ) { WriteTypeNode( writer, childNode ); } writer.WriteEndElement(); //</subclass> } /// <summary> /// Writes the class. /// </summary> private void WriteClass( XmlWriter writer, TypeNode node, System.Type type ) { ClassAttribute attribute = (ClassAttribute)Attribute.GetCustomAttribute( type, typeof(ClassAttribute), true ); writer.WriteStartElement( "class" ); writer.WriteAttributeString( "name", GetShortTypeName( node.Type ) ); writer.WriteAttributeString( "table", attribute.Table ); if( attribute.Polymorphism != ClassPolymorphismType.Implicit ) writer.WriteAttributeString( "polymorphism", GetXmlEnumValue( typeof(ClassPolymorphismType), attribute.Polymorphism ) ); if( attribute.DiscriminatorValue != null ) writer.WriteAttributeString( "discriminator-value", attribute.DiscriminatorValue ); if( attribute.SqlWhere != null ) writer.WriteAttributeString( "where", attribute.SqlWhere ); WriteId( writer, node.Type ); WriteDiscriminator( writer, type ); WriteVersion( writer, type ); WriteProperties( writer, type ); WriteCollections( writer, type ); WriteAssociations( writer, type ); foreach( TypeNode childNode in node.Nodes ) { WriteTypeNode( writer, childNode ); } writer.WriteEndElement(); //</class> } /// <summary> /// Writes the property. /// </summary> /// <param name="writer"></param> /// <param name="property"></param> private void WriteProperty( XmlWriter writer, PropertyInfo property ) { PropertyAttribute attribute = (PropertyAttribute)Attribute.GetCustomAttribute( property, typeof(PropertyAttribute) ); writer.WriteStartElement( "property" ); writer.WriteAttributeString( "name", property.Name ); writer.WriteAttributeString( "column", attribute.Column == null ? property.Name : attribute.Column ); writer.WriteAttributeString( "access", attribute.Access ); string typeName = null; if( attribute.Type != null ) typeName = GetShortTypeName( attribute.Type ); else typeName = GetShortTypeName( property.PropertyType ); if( attribute.Size > 0 ) { writer.WriteAttributeString( "type", String.Format( "{0}({1})", typeName, attribute.Size ) ); } else { writer.WriteAttributeString( "type", typeName ); } if( !attribute.Insert ) writer.WriteAttributeString( "insert", "false" ); if( !attribute.Update ) writer.WriteAttributeString( "update", "false" ); //if( attribute.Size > 0 ) // writer.WriteAttributeString( "length", attribute.Size.ToString() ); writer.WriteEndElement(); //</property> } /// <summary> /// Writers the properties. /// </summary> /// <param name="writer"></param> /// <param name="parentNode"></param> private void WriteProperties( XmlWriter writer, System.Type type ) { PropertyInfo[] properties = FindAttributedProperties( typeof(PropertyAttribute), type ); foreach( PropertyInfo property in properties ) { WriteProperty( writer, property ); } } /// <summary> /// Writes the assoications. /// </summary> /// <param name="writer"></param> /// <param name="type"></param> private void WriteAssociations( XmlWriter writer, System.Type type ) { PropertyInfo[] properties = FindAttributedProperties( typeof(ManyToOneAttribute), type ); foreach( PropertyInfo property in properties ) { WriteManyToOne( writer, property ); } } /// <summary> /// Writes the many to one association. /// </summary> /// <param name="writer"></param> /// <param name="property"></param> private void WriteManyToOne( XmlWriter writer, PropertyInfo property ) { ManyToOneAttribute attribute = (ManyToOneAttribute)Attribute.GetCustomAttribute( property, typeof(ManyToOneAttribute) ); if( attribute.Inheritable || ( !attribute.Inheritable && ( property.DeclaringType == property.ReflectedType ) ) ) { writer.WriteStartElement( "many-to-one" ); writer.WriteAttributeString( "name", property.Name ); writer.WriteAttributeString( "column", attribute.Column == null ? property.Name : attribute.Column ); writer.WriteAttributeString( "access", attribute.Access ); string typeName = null; if( attribute.Type != null ) typeName = GetShortTypeName( attribute.Type ); else typeName = GetShortTypeName( property.PropertyType ); writer.WriteAttributeString( "class", typeName ); if( attribute.Cascade != CascadeType.None ) writer.WriteAttributeString( "cascade", GetXmlEnumValue( typeof(CascadeType), attribute.Cascade ) ); if( attribute.OuterJoin != OuterJoinType.Auto ) writer.WriteAttributeString( "outer-join", GetXmlEnumValue( typeof(OuterJoinType), attribute.OuterJoin ) ); if( !attribute.Insert ) writer.WriteAttributeString( "insert", "false" ); if( !attribute.Update ) writer.WriteAttributeString( "update", "false" ); writer.WriteEndElement(); //</many-to-one> } } /// <summary> /// Writes the version. /// </summary> /// <param name="writer"></param> /// <param name="parentNode"></param> private void WriteVersion( XmlWriter writer, System.Type type ) { PropertyInfo property = FindAttributedProperty( typeof(VersionAttribute), type ); if( property != null ) { VersionAttribute attribute = (VersionAttribute)Attribute.GetCustomAttribute( property, typeof(VersionAttribute), false ); writer.WriteStartElement( "version" ); writer.WriteAttributeString( "name", property.Name ); writer.WriteAttributeString( "column", attribute.Column ); writer.WriteAttributeString( "type", GetShortTypeName( property.PropertyType ) ); writer.WriteAttributeString( "access", attribute.Access ); writer.WriteEndElement(); //</version> } } /// <summary> /// Writes the id. /// </summary> /// <param name="writer"></param> /// <param name="parentNode"></param> private void WriteId( XmlWriter writer, System.Type type ) { PropertyInfo property = FindAttributedProperty( typeof(IdAttribute), type ); if( property == null ) throw new Exception( "Missing required IdAttribute." ); IdAttribute attribute = (IdAttribute)Attribute.GetCustomAttribute( property, typeof(IdAttribute), false ); writer.WriteStartElement( "id" ); writer.WriteAttributeString( "name", property.Name ); writer.WriteAttributeString( "type", GetShortTypeName( property.PropertyType ) ); writer.WriteAttributeString( "column", attribute.Column ); writer.WriteAttributeString( "access", attribute.Access ); if( attribute.UnsavedValueType == UnsavedValueType.Specified ) writer.WriteAttributeString( "unsaved-value", attribute.UnsavedValue ); else writer.WriteAttributeString( "unsaved-value", GetXmlEnumValue( typeof(UnsavedValueType), attribute.UnsavedValueType ) ); writer.WriteStartElement("generator"); writer.WriteAttributeString( "class", GetShortTypeName( attribute.Generator ) ); WriteGeneratorParameters( writer, property ); writer.WriteEndElement(); //</generator> writer.WriteEndElement(); //</id> } /// <summary> /// Writes the generator parameters. /// </summary> /// <param name="writer"></param> /// <param name="property"></param> private void WriteGeneratorParameters( XmlWriter writer, PropertyInfo property ) { GeneratorParameterAttribute[] attributes = (GeneratorParameterAttribute[])Attribute.GetCustomAttributes( property, typeof(GeneratorParameterAttribute), true ); foreach( GeneratorParameterAttribute attribute in attributes ) { writer.WriteStartElement( "param" ); writer.WriteAttributeString( "name", attribute.Name ); writer.WriteString( attribute.Value ); writer.WriteEndElement(); //</param> } } /// <summary> /// Writes the joined subclass. /// </summary> private void WriteJ... [truncated message content] |
From: John M. <joh...@us...> - 2005-04-28 23:39:42
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/NHibernate.Mapping.Attributes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3493/NHibernate.Mapping.Attributes Log Message: Directory /cvsroot/nhibernate/NHibernateContrib/src/NHibernate.Mapping.Attributes added to the repository |
From: Donald L M. Jr. <lu...@us...> - 2005-04-28 18:51:47
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10798/src/Nullables Modified Files: Nullables-1.1.csproj Added Files: NullableChar.cs Log Message: Added NullableChar Index: Nullables-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/Nullables-1.1.csproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Nullables-1.1.csproj 16 Dec 2004 15:26:12 -0000 1.2 --- Nullables-1.1.csproj 28 Apr 2005 18:51:38 -0000 1.3 *************** *** 95,98 **** --- 95,103 ---- /> <File + RelPath = "NullableChar.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "NullableDateTime.cs" SubType = "Code" *************** *** 154,157 **** --- 159,167 ---- /> <File + RelPath = "TypeConverters\NullableCharConverter.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "TypeConverters\NullableDateTimeConverter.cs" SubType = "Code" --- NEW FILE: NullableChar.cs --- using System; namespace Nullables { [System.ComponentModel.TypeConverter(typeof(Nullables.TypeConverters.NullableCharConverter)), Serializable()] public struct NullableChar : INullableType, IComparable { public static readonly NullableChar Default = new NullableChar(); Char _value; bool hasValue; #region Constructors public NullableChar(Char value) { _value = value; hasValue = true; } #endregion #region INullable Members object INullableType.Value { get { return Value; } } public bool HasValue { get { return hasValue; } } #endregion public Char Value { get { if (hasValue) return _value; else throw new InvalidOperationException("Nullable type must have a value."); } } #region Casts public static explicit operator Char(NullableChar nullable) { if (!nullable.HasValue) throw new NullReferenceException(); return nullable.Value; } public static implicit operator NullableChar(Char value) { return new NullableChar(value); } public static implicit operator NullableChar(DBNull value) { return NullableChar.Default; } #endregion public override string ToString() { if (HasValue) return Value.ToString(); else return string.Empty; } public override bool Equals(object obj) { if (obj is DBNull && !HasValue) return true; else if (obj is NullableChar) return Equals((NullableChar)obj); else return false; //if this is reached, it is either some other type, or DBnull is compared with this and we have a Value. } public bool Equals(NullableChar x) { return Equals(this, x); } public static bool Equals(NullableChar x, NullableChar y) { if (x.HasValue != y.HasValue) //one is null return false; else if (x.HasValue) //therefor y also HasValue return x.Value == y.Value; else //both are null return true; } public static bool operator ==(NullableChar x, NullableChar y) { return x.Equals(y); } public static bool operator ==(NullableChar x, object y) { return x.Equals(y); } public static bool operator !=(NullableChar x, NullableChar y) { return !x.Equals(y); } public static bool operator !=(NullableChar x, object y) { return !x.Equals(y); } public static NullableInt32 operator +(NullableChar x, NullableChar y) { if (!x.HasValue || !y.HasValue) //one or both are null return NullableInt32.Default; return new NullableInt32(x.Value + y.Value); } public static NullableInt32 operator -(NullableChar x, NullableChar y) { if (!x.HasValue || !y.HasValue) //one or both are null return NullableInt32.Default; return new NullableInt32(x.Value - y.Value); } public static NullableInt32 operator *(NullableChar x, NullableChar y) { if (!x.HasValue || !y.HasValue) //one or both are null return NullableInt32.Default; return new NullableInt32(x.Value * y.Value); } public static NullableInt32 operator /(NullableChar x, NullableChar y) { if (!x.HasValue || !y.HasValue) //one or both are null return NullableInt32.Default; return new NullableInt32(x.Value / y.Value); } public override int GetHashCode() { if (HasValue) return Value.GetHashCode(); else return 0; //GetHashCode() doesn't garantee uniqueness, and neither do we. } #region IComparable Members public int CompareTo(object obj) { if (obj is NullableChar) //chack and unbox { NullableChar value = (NullableChar)obj; if (value.HasValue == this.HasValue) //both null or not null { if (this.HasValue) //this has a value, so they both do return Value.CompareTo(value.Value); else return 0; //both null, so they are equal; } else //one is null { if (HasValue) //he have a value, so we are greater. return 1; else return -1; } } else if (obj is Char) { Char value = (Char)obj; if (HasValue) //not null, so compare the real values. return Value.CompareTo(value); else return -1; //this is null, so less that the real value; } throw new ArgumentException("NullableChar can only compare to another NullableChar or a System.Char"); } #endregion } } |
From: Donald L M. Jr. <lu...@us...> - 2005-04-28 18:51:47
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables/TypeConverters In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10798/src/Nullables/TypeConverters Added Files: NullableCharConverter.cs Log Message: Added NullableChar --- NEW FILE: NullableCharConverter.cs --- using System; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Reflection; namespace Nullables.TypeConverters { public class NullableCharConverter : TypeConverter { public NullableCharConverter() { } public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { if (sourceType == typeof(string)) return true; else return base.CanConvertFrom (context, sourceType); } public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { if (destinationType == typeof(InstanceDescriptor)) return true; else return base.CanConvertTo (context, destinationType); } public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) { if (value == null) { return NullableChar.Default; } if (value is string) { string stringValue = ((string)value).Trim(); if (stringValue == string.Empty) return NullableChar.Default; //get underlying types converter TypeConverter converter = TypeDescriptor.GetConverter(typeof(Char)); Char newValue = (Char)converter.ConvertFromString(context, culture, stringValue); return new NullableChar(newValue); } else { return base.ConvertFrom (context, culture, value); } } public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(InstanceDescriptor) && value is NullableChar) { NullableChar nullable = (NullableChar)value; Type[] constructorArgTypes = new Type[1] { typeof(Char) } ; ConstructorInfo constructor = typeof(NullableChar).GetConstructor(constructorArgTypes); if (constructor != null) { object[] constructorArgValues = new object[1] { nullable.Value } ; return new InstanceDescriptor(constructor, constructorArgValues); } } return base.ConvertTo (context, culture, value, destinationType); } public override object CreateInstance(ITypeDescriptorContext context, System.Collections.IDictionary propertyValues) { return new NullableChar((Char)propertyValues["Value"]); } public override bool GetCreateInstanceSupported(ITypeDescriptorContext context) { return true; } public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) { return TypeDescriptor.GetProperties(typeof(NullableChar), attributes); } public override bool GetPropertiesSupported(ITypeDescriptorContext context) { return true; } } } |
From: Donald L M. Jr. <lu...@us...> - 2005-04-28 18:51:46
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables.Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10798/src/Nullables.Tests Modified Files: Nullables.Tests-1.1.csproj Added Files: NullableCharFixture.cs Log Message: Added NullableChar --- NEW FILE: NullableCharFixture.cs --- using System; using Nullables; using NUnit.Framework; namespace Nullables.Tests { /// <summary> /// Summary description for NullableCharFixture. /// </summary> [TestFixture] public class NullableCharFixture { [Test] public void BasicTestChar() { NullableChar v1 = 'd'; //chould take a char literal Assert.IsTrue( v1.HasValue ); //should have a value; Assert.IsTrue( v1.Equals( 'd' ) ); //implicit casting should make this result in true. Assert.IsTrue( v1.Value == 'd' ); Assert.IsFalse( v1.Equals( NullableChar.Default ) ); Assert.IsTrue( v1.Equals( new NullableChar( 'd' ) ) ); //should == a new instance with the same inner value. //same thing, but with == instead of .Equals() Assert.IsTrue( v1 == 'd' ); Assert.IsFalse( v1 == 'g' ); Assert.IsFalse( v1 == NullableChar.Default ); Assert.IsTrue( v1 == new NullableChar( 'd' ) ); //now null v1. v1 = DBNull.Value; Assert.IsTrue( v1 == NullableChar.Default ); v1 = NullableChar.Default; Assert.IsTrue( v1 == NullableChar.Default ); NullableChar v2 = NullableChar.Default; //should start as "null" Assert.IsFalse( v2.HasValue ); Assert.IsFalse( v2.Equals( '2' ) ); Assert.IsTrue( v2.Equals( NullableChar.Default ) ); Assert.IsTrue( v2.Equals( DBNull.Value ) ); } [Test, ExpectedException(typeof(InvalidOperationException))] public void CharMissingValueTest() { NullableChar x = NullableChar.Default; Char y = x.Value; } [Test] public void CharIComparableTest() { NullableChar x; NullableChar y; //one null, one not x = NullableChar.Default; y = new NullableChar( 'y' ); Assert.IsTrue( x.CompareTo( y ) < 0 ); Assert.IsTrue( y.CompareTo( x ) > 0 ); //now both null x = NullableChar.Default; y = NullableChar.Default; Assert.IsTrue( x.CompareTo( y ) == 0 ); Assert.IsTrue( y.CompareTo( x ) == 0 ); //now both with a value x = new NullableChar( 'a' ); y = new NullableChar( 'u' ); Assert.IsTrue( x.CompareTo( y ) < 0 ); Assert.IsTrue( y.CompareTo( x ) > 0 ); } } } Index: Nullables.Tests-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables.Tests/Nullables.Tests-1.1.csproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Nullables.Tests-1.1.csproj 16 Dec 2004 15:26:13 -0000 1.3 --- Nullables.Tests-1.1.csproj 28 Apr 2005 18:51:38 -0000 1.4 *************** *** 129,132 **** --- 129,137 ---- /> <File + RelPath = "NullableCharFixture.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "NullableDateTimeFixture.cs" SubType = "Code" |
From: Donald L M. Jr. <lu...@us...> - 2005-04-28 18:51:46
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables.NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10798/src/Nullables.NHibernate Modified Files: Nullables.NHibernate-1.1.csproj Added Files: NullableCharType.cs Log Message: Added NullableChar Index: Nullables.NHibernate-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables.NHibernate/Nullables.NHibernate-1.1.csproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Nullables.NHibernate-1.1.csproj 17 Feb 2005 14:03:05 -0000 1.2 --- Nullables.NHibernate-1.1.csproj 28 Apr 2005 18:51:37 -0000 1.3 *************** *** 115,118 **** --- 115,123 ---- /> <File + RelPath = "NullableCharType.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "NullableDateTimeType.cs" SubType = "Code" --- NEW FILE: NullableCharType.cs --- using System; using NHibernate.Type; using NHibernate.SqlTypes; using Nullables; namespace Nullables.NHibernate { public class NullableCharType : NullableTypesType { public NullableCharType() : base(new StringFixedLengthSqlType(1)) { } public override bool Equals(object x, object y) { //get boxed values. NullableChar xTyped = (NullableChar)x; return xTyped.Equals(y); } public override object NullValue { get { return NullableChar.Default; } } public override bool HasNiceEquals { get { return true; } } public override bool IsMutable { get { return true; } } public override string Name { get { return "NullableChar"; } } public override System.Type ReturnedClass { get { return typeof(Nullables.NullableChar); } } public override object DeepCopyNotNull(object val) { return val; } public override object Get(System.Data.IDataReader rs, int index) { //TODO: perhaps NullableChar has a method/operator/contructor that will take an object. object value = rs[index]; if( value==DBNull.Value ) { return NullableChar.Default; } else { return new NullableChar(Convert.ToChar(value)); } } public override void Set(System.Data.IDbCommand cmd, object value, int index) { System.Data.IDataParameter parameter = (System.Data.IDataParameter)cmd.Parameters[index]; NullableChar nullableValue = (NullableChar)value; if( nullableValue.HasValue ) { parameter.Value = nullableValue.Value; } else { parameter.Value = DBNull.Value; } } public override string ToXML(object val) { return val.ToString(); } } } |
From: Sergey K. <jus...@us...> - 2005-04-27 09:19:52
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/QueryTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5607/src/NHibernate.Test/QueryTest Modified Files: QueryParametersFixture.cs Log Message: A few more tests for QueryParameters Index: QueryParametersFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/QueryTest/QueryParametersFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** QueryParametersFixture.cs 27 Apr 2005 09:08:52 -0000 1.1 --- QueryParametersFixture.cs 27 Apr 2005 09:19:31 -0000 1.2 *************** *** 1,3 **** --- 1,6 ---- + using NHibernate; using NHibernate.Engine; + using NHibernate.Type; + using NUnit.Framework; *************** *** 8,16 **** { [Test] ! public void NullParameters() { QueryParameters qp = new QueryParameters( null, null ); qp.ValidateParameters(); } } } --- 11,39 ---- { [Test] ! public void ValidateNullParameters() { QueryParameters qp = new QueryParameters( null, null ); qp.ValidateParameters(); } + + [Test] + public void ValidateOk() + { + QueryParameters qp = new QueryParameters( + new IType[] { NHibernateUtil.String }, + new object[] { "string" }); + + qp.ValidateParameters(); + } + + [Test, ExpectedException(typeof(QueryException))] + public void ValidateFailureDifferentLengths() + { + QueryParameters qp = new QueryParameters( + new IType[] { NHibernateUtil.String }, + new object[] { }); + + qp.ValidateParameters(); + } } } |
From: Sergey K. <jus...@us...> - 2005-04-27 09:09:01
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31389/src/NHibernate.Test Modified Files: NHibernate.Test-1.1.csproj Log Message: Test for NH-254 fix Index: NHibernate.Test-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHibernate.Test-1.1.csproj,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** NHibernate.Test-1.1.csproj 12 Apr 2005 12:51:13 -0000 1.71 --- NHibernate.Test-1.1.csproj 27 Apr 2005 09:08:38 -0000 1.72 *************** *** 679,682 **** --- 679,687 ---- /> <File + RelPath = "QueryTest\QueryParametersFixture.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "SqlCommandTest\InFragmentFixture.cs" SubType = "Code" |
From: Sergey K. <jus...@us...> - 2005-04-27 09:09:01
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/QueryTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31389/src/NHibernate.Test/QueryTest Added Files: QueryParametersFixture.cs Log Message: Test for NH-254 fix --- NEW FILE: QueryParametersFixture.cs --- using NHibernate.Engine; using NUnit.Framework; namespace NHibernate.Test.QueryTest { [TestFixture] public class QueryParametersFixture { [Test] public void NullParameters() { QueryParameters qp = new QueryParameters( null, null ); qp.ValidateParameters(); } } } |
From: Sergey K. <jus...@us...> - 2005-04-27 09:04:49
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Engine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29459/src/NHibernate/Engine Modified Files: QueryParameters.cs Log Message: Fixed NH-254 Index: QueryParameters.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Engine/QueryParameters.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** QueryParameters.cs 31 Dec 2004 17:36:41 -0000 1.2 --- QueryParameters.cs 27 Apr 2005 09:04:39 -0000 1.3 *************** *** 115,118 **** --- 115,124 ---- } + private int SafeLength( System.Array array ) + { + if( array == null ) return 0; + return array.Length; + } + /// <summary> /// Ensure the Types and Values are the same length. *************** *** 124,129 **** public void ValidateParameters() { ! int typesLength = PositionalParameterTypes != null ? 0 : PositionalParameterTypes.Length; ! int valuesLength = PositionalParameterValues != null ? 0 : PositionalParameterValues.Length; if( typesLength != valuesLength ) --- 130,135 ---- public void ValidateParameters() { ! int typesLength = SafeLength( PositionalParameterTypes ); ! int valuesLength = SafeLength( PositionalParameterValues ); if( typesLength != valuesLength ) |
From: Sergey K. <jus...@us...> - 2005-04-25 13:19:35
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18357/src/NHibernate Modified Files: ICriteria.cs Log Message: Added a few more tests Implemented ICriteria.UniqueResult() Index: ICriteria.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ICriteria.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ICriteria.cs 17 Apr 2005 17:16:04 -0000 1.9 --- ICriteria.cs 25 Apr 2005 13:19:07 -0000 1.10 *************** *** 130,133 **** --- 130,143 ---- /// <returns></returns> ICriteria SetLockMode( string alias, LockMode lockMode ); + + /// <summary> + /// Convenience method to return a single instance that matches + /// the query, or null if the query returns no results. + /// </summary> + /// <returns>the single result or <c>null</c></returns> + /// <exception cref="HibernateException"> + /// If there is more than one matching result + /// </exception> + object UniqueResult(); } } \ No newline at end of file |
From: Sergey K. <jus...@us...> - 2005-04-25 13:19:35
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18357/src/NHibernate/Impl Modified Files: AbstractQueryImpl.cs CriteriaImpl.cs Log Message: Added a few more tests Implemented ICriteria.UniqueResult() Index: AbstractQueryImpl.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/AbstractQueryImpl.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AbstractQueryImpl.cs 30 Mar 2005 16:28:49 -0000 1.4 --- AbstractQueryImpl.cs 25 Apr 2005 13:19:07 -0000 1.5 *************** *** 96,100 **** } ! static object UniqueElement( IList list ) { int size = list.Count; --- 96,100 ---- } ! internal static object UniqueElement( IList list ) { int size = list.Count; Index: CriteriaImpl.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/CriteriaImpl.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** CriteriaImpl.cs 17 Apr 2005 17:16:06 -0000 1.10 --- CriteriaImpl.cs 25 Apr 2005 13:19:07 -0000 1.11 *************** *** 406,409 **** --- 406,414 ---- return ( (IAssociationType) type).GetAssociatedClass( factory ); } + + public object UniqueResult() + { + return AbstractQueryImpl.UniqueElement( List() ); + } } } \ No newline at end of file |
From: Sergey K. <jus...@us...> - 2005-04-25 13:19:32
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18357/src/NHibernate/Collection Modified Files: BasicCollectionPersister.cs Log Message: Added a few more tests Implemented ICriteria.UniqueResult() Index: BasicCollectionPersister.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/BasicCollectionPersister.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** BasicCollectionPersister.cs 14 Mar 2005 22:41:14 -0000 1.4 --- BasicCollectionPersister.cs 25 Apr 2005 13:19:07 -0000 1.5 *************** *** 211,215 **** public override SqlString FromJoinFragment( string alias, bool innerJoin, bool includeSubclasses ) { ! return null; } --- 211,215 ---- public override SqlString FromJoinFragment( string alias, bool innerJoin, bool includeSubclasses ) { ! return new SqlString(string.Empty); } |
From: Sergey K. <jus...@us...> - 2005-04-25 13:19:22
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18357/src/NHibernate.DomainModel Modified Files: Fum.cs Fum.hbm.xml Simple.cs Simple.hbm.xml Log Message: Added a few more tests Implemented ICriteria.UniqueResult() Index: Simple.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Simple.hbm.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Simple.hbm.xml 23 Aug 2004 02:11:53 -0000 1.7 --- Simple.hbm.xml 25 Apr 2005 13:19:06 -0000 1.8 *************** *** 10,13 **** --- 10,14 ---- <property name="Count" column="count_" not-null="true" unique="true"/> <property name="Date" column="date_"/> + <property name="Pay" /> <many-to-one name="Other" access="field.camelcase"/> </class> Index: Fum.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Fum.hbm.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Fum.hbm.xml 30 Mar 2005 16:28:11 -0000 1.7 --- Fum.hbm.xml 25 Apr 2005 13:19:06 -0000 1.8 *************** *** 33,36 **** --- 33,57 ---- <one-to-many class="NHibernate.DomainModel.Qux, NHibernate.DomainModel"/> </array> + <component name="MapComponent"> + <property name="Count" column="count_"/> + <map name="Fummap" lazy="true"> + <key> + <column name="fum_str_" length="10"/> + <column name="fum_sho_"/> + <column name="fum_dat_"/> + </key> + <index column="fummapindex" type="string"/> + <one-to-many class="NHibernate.DomainModel.Fum, NHibernate.DomainModel"/> + </map> + <map name="Stringmap" outer-join="true"> + <key> + <column name="fum_str_" length="10"/> + <column name="fum_sho_"/> + <column name="fum_dat_"/> + </key> + <index column="mapindex" type="string"/> + <element column="mapelement" type="string"/> + </map> + </component> </class> </hibernate-mapping> Index: Fum.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Fum.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Fum.cs 30 Mar 2005 16:28:10 -0000 1.9 --- Fum.cs 25 Apr 2005 13:19:06 -0000 1.10 *************** *** 4,7 **** --- 4,33 ---- namespace NHibernate.DomainModel { + [Serializable] + public class MapComponent + { + private IDictionary _fummap = new Hashtable(); + private IDictionary _stringmap = new Hashtable(); + private int _count; + + public IDictionary Fummap + { + get { return _fummap; } + set { _fummap = value; } + } + + public int Count + { + get { return _count; } + set { _count = value; } + } + + public IDictionary Stringmap + { + get { return _stringmap; } + set { _stringmap = value; } + } + } + public class Fum : ILifecycle { *************** *** 12,16 **** private Iesi.Collections.ISet _friends; // <set> mapping private DateTime m_LastUpdated; ! public Fum() { --- 38,43 ---- private Iesi.Collections.ISet _friends; // <set> mapping private DateTime m_LastUpdated; ! private MapComponent _mapComponent = new MapComponent(); ! public Fum() { *************** *** 124,127 **** --- 151,159 ---- } + public MapComponent MapComponent + { + get { return _mapComponent; } + set { _mapComponent = value; } + } } } \ No newline at end of file Index: Simple.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Simple.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Simple.cs 17 Jan 2005 03:31:52 -0000 1.4 --- Simple.cs 25 Apr 2005 13:19:06 -0000 1.5 *************** *** 2,6 **** namespace NHibernate.DomainModel ! { public class Simple { --- 2,7 ---- namespace NHibernate.DomainModel ! { ! [Serializable] public class Simple { *************** *** 12,15 **** --- 13,17 ---- private DateTime date = new DateTime( 2004, 01, 01, 12, 00, 00, 00 ); private Simple other; + private float pay; public Simple(int c) *************** *** 57,60 **** --- 59,67 ---- } + public float Pay + { + get { return pay; } + set { pay = value; } + } } } |
From: Sergey K. <jus...@us...> - 2005-04-25 13:19:22
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18357/src/NHibernate.Test Modified Files: FumTest.cs Log Message: Added a few more tests Implemented ICriteria.UniqueResult() Index: FumTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/FumTest.cs,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** FumTest.cs 31 Mar 2005 12:42:39 -0000 1.19 --- FumTest.cs 25 Apr 2005 13:19:07 -0000 1.20 *************** *** 1,4 **** --- 1,6 ---- using System; using System.Collections; + using System.IO; + using System.Runtime.Serialization.Formatters.Binary; using NHibernate.DomainModel; *************** *** 66,78 **** [Test] - [Ignore("Test not written")] public void CriteriaCollection() { } [Test] ! [Ignore("Test not written")] public void Criteria() { } --- 68,205 ---- [Test] public void CriteriaCollection() { + //if( dialect is Dialect.HSQLDialect ) return; + if( dialect is Dialect.MsSql2000Dialect ) return; + + using( ISession s = sessions.OpenSession() ) + { + Fum fum = new Fum( FumTest.FumKey("fum") ); + fum.FumString = "a value"; + fum.MapComponent.Fummap["self"] = fum; + fum.MapComponent.Stringmap["string"] = "a staring"; + fum.MapComponent.Stringmap["string2"] = "a notha staring"; + fum.MapComponent.Count = 1; + s.Save(fum); + s.Flush(); + } + + using( ISession s = sessions.OpenSession() ) + { + Fum b = (Fum) s.CreateCriteria( typeof( Fum ) ) + .Add( Expression.Expression.In( + "FumString", new string[] { "a value", "no value" } ) ) + .UniqueResult(); + //assertTrue( Hibernate.isInitialized( b.getMapComponent().getFummap() ) ); + Assert.IsTrue( NHibernateUtil.IsInitialized( b.MapComponent.Stringmap ) ); + Assert.IsTrue( b.MapComponent.Fummap.Count == 1 ); + Assert.IsTrue( b.MapComponent.Stringmap.Count == 2 ); + + /*int none = s.CreateCriteria(typeof(Fum)).add( + Expression.Expression.In( "FumString", new String[0] ) + ).List().Count; + assertTrue(none==0);*/ + s.Delete( b ); + s.Flush(); + } } [Test] ! [Ignore("Requires ICriteria.CreateCriteria")] public void Criteria() { + if( dialect is Dialect.MsSql2000Dialect ) return; + + /* + using( ISession s = sessions.OpenSession() ) + { + Fum fum = new Fum( FumKey("fum") ); + fum.Fo = new Fum( FumKey("fo") ); + fum.FumString = "fo fee fi"; + fum.Fo.FumString = "stuff"; + Fum fr = new Fum( FumKey( "fr" ) ); + fr.FumString = "goo"; + Fum fr2 = new Fum( FumKey( "fr2" ) ); + fr2.FumString = "soo"; + fum.Friends = new Iesi.Collections.HashedSet(); + fum.Friends.Add( fr ); + fum.Friends.Add( fr2 ); + + s.Save( fr ); + s.Save( fr2 ); + s.Save( fum.Fo ); + s.Save( fum ); + + ICriteria baseCriteria = s.createCriteria(typeof(Fum)) + .Add( Expression.Expression.Like( "FumString", "f", MatchMode.START) ); + baseCriteria.CreateCriteria("Fo") + .Add( Expression.Expression.IsNotNull("FumString") ); + baseCriteria.createCriteria("Friends") + .Add( Expression.Expression.Like( "FumString", "g%" ) ); + IList list = baseCriteria.List(); + + Assert.AreEqual( 1, list.Count ); + Assert.AreSame( fum, list[0] ); + + baseCriteria = s.CreateCriteria(typeof(Fum)) + .Add( Expression.Expression.Like( "FumString", "f%" ) ) + .SetResultTransformer( Criteria.ALIAS_TO_ENTITY_MAP ); + baseCriteria.CreateCriteria( "Fo", "fo" ) + .Add( Expression.Expression.IsNotNull( "FumString" ) ); + baseCriteria.createCriteria( "Friends", "fum" ) + .Add( Expression.Expression.Like("FumString", "g", MatchMode.START) ); + IDictionary map = (IDictionary) baseCriteria.UniqueResult(); + + Assert.AreSame( fum, map["this"] ); + Assert.AreSame( fum.Fo, map["fo"] ); + Assert.IsTrue( fum.Friends.Contains( map["fum"] ) ); + Assert.AreEqual( 3, map.Count ); + + baseCriteria = s.CreateCriteria(typeof(Fum)) + .Add( Expression.like("fum", "f%") ) + .SetResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP) + .SetFetchMode("friends", FetchMode.EAGER); + baseCriteria.CreateCriteria("fo", "fo") + .Add( Expression.eq( "FumString", fum.Fo.FumString ) ); + map = (IDictionary) baseCriteria.List()[0]; + + Assert.AreSame( fum, map["this"] ); + Assert.AreSame( fum.Fo, map["fo"] ); + Assert.AreEqual( 2, map.Count ); + + list = s.CreateCriteria(typeof(Fum)) + .CreateAlias("Friends", "fr") + .CreateAlias("Fo", "fo") + .Add( Expression.Expression.Like("FumString", "f%") ) + .Add( Expression.Expression.IsNotNull("fo") ) + .Add( Expression.Expression.IsNotNull("fo.FumString") ) + .Add( Expression.Expression.Like("fr.FumString", "g%") ) + .Add( Expression.Expression.EqProperty("fr.id.Short", "id.Short") ) + .List(); + Assert.AreEqual( 1, list.Count ); + Assert.AreSame( fum, list[0] ); + s.Flush(); + } + + using( ISession s = sessions.OpenSession() ) + { + ICriteria baseCriteria = s.CreateCriteria( typeof(Fum) ) + .Add( Expression.Expression.Like( "fum", "f%" ) ); + baseCriteria.CreateCriteria( "Fo" ) + .Add( Expression.Expression.IsNotNull( "FumString" ) ); + baseCriteria.CreateCriteria( "Friends" ) + .Add( Expression.Like( "fum", "g%" ) ); + Fum fum = (Fum) baseCriteria.List()[0]; + Assert.AreEqual( 2, fum.Friends.Count ); + s.Delete(fum); + s.Delete( fum.Fo ); + + foreach( object friend in fum.Friends ) + { + s.Delete( friend ); + } + s.Flush(); + } + */ } *************** *** 431,435 **** [Test] - [Ignore("HQL can't parse a class named 'Order' - http://jira.nhibernate.org:8080/browse/NH-81, this test passes when changed to NHibernate.DomainModel")] public void KeyManyToOne() { --- 558,561 ---- *************** *** 484,503 **** [Test] - [Ignore("Test not written")] public void CompositeKeyPathExpressions() { } ! [Test] ! [Ignore("Test not written")] public void UnflushedSessionSerialization() { } private ISession SpoofSerialization( ISession session) { ! // TODO: Not test method - implement details ! return null; } } --- 610,735 ---- [Test] public void CompositeKeyPathExpressions() { + using( ISession s = sessions.OpenSession() ) + { + s.Find("select fum1.Fo from fum1 in class Fum where fum1.Fo.FumString is not null"); + s.Find("from fum1 in class Fum where fum1.Fo.FumString is not null order by fum1.Fo.FumString"); + if ( !(dialect is Dialect.MySQLDialect) + //&& !(dialect is HSQLDialect) + //&& !(dialect is MckoiDialect) + //&& !(dialect is PointbaseDialect) + ) + { + s.Find("from fum1 in class Fum where exists elements(fum1.Friends)"); + s.Find("from fum1 in class Fum where size(fum1.Friends) = 0"); + } + s.Find("select fum1.Friends.elements from fum1 in class Fum"); + s.Find("from fum1 in class Fum, fr in elements( fum1.Friends )"); + } } ! [Test, Ignore("TODO: Requires serializable ScheduledActions")] public void UnflushedSessionSerialization() { + /////////////////////////////////////////////////////////////////////////// + // Test insertions across serializations + + ISession s2; + + // NOTE: H2.1 has getSessions().openSession() here (and below), + // instead of just the usual openSession() + using( ISession s = sessions.OpenSession() ) + { + s.FlushMode = FlushMode.Never; + + Simple simple = new Simple(); + simple.Address = "123 Main St. Anytown USA"; + simple.Count = 1; + simple.Date = new DateTime(); + simple.Name = "My UnflushedSessionSerialization Simple"; + simple.Pay = 5000.0f; + + s.Save( simple, 10L ); + + // Now, try to serialize session without flushing... + s.Disconnect(); + + s2 = SpoofSerialization(s); + } + + Simple check, other; + + using( ISession s = s2 ) + { + s.Reconnect(); + + Simple simple = (Simple) s.Load( typeof( Simple ), 10L ); + other = new Simple(); + other.Init(); + s.Save( other, 11L ); + + simple.Other = other; + s.Flush(); + + check = simple; + } + + /////////////////////////////////////////////////////////////////////////// + // Test updates across serializations + + using( ISession s = sessions.OpenSession() ) + { + s.FlushMode = FlushMode.Never; + Simple simple = (Simple) s.Get( typeof( Simple ), 10L ); + Assert.AreEqual( check.Name, simple.Name, "Not same parent instances" ); + Assert.AreEqual( check.Other.Name, other.Name, "Not same child instances" ); + + simple.Name = "My updated name"; + + s.Disconnect(); + s2 = SpoofSerialization(s); + + check = simple; + } + + using( ISession s = s2 ) + { + s.Reconnect(); + s.Flush(); + } + + /////////////////////////////////////////////////////////////////////////// + // Test deletions across serializations + using( ISession s = sessions.OpenSession() ) + { + s.FlushMode = FlushMode.Never; + Simple simple = (Simple) s.Get( typeof( Simple ), 10L ); + Assert.AreEqual( check.Name, simple.Name, "Not same parent instances" ); + Assert.AreEqual( check.Other.Name, other.Name, "Not same child instances" ); + + // Now, lets delete across serialization... + s.Delete(simple); + + s.Disconnect(); + s2 = SpoofSerialization(s); + } + + using( ISession s = s2 ) + { + s.Reconnect(); + s.Flush(); + } } private ISession SpoofSerialization( ISession session) { ! BinaryFormatter formatter = new BinaryFormatter(); ! MemoryStream stream = new MemoryStream(); ! formatter.Serialize( stream, session ); ! stream.Position = 0; ! ! return ( ISession )formatter.Deserialize( stream ); } } |
From: Michael D. <mik...@us...> - 2005-04-25 03:34:22
|
Update of /cvsroot/nhibernate/NHibernateContrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8621 Modified Files: NHibernateContribSolution.build Log Message: upgraded to nant-0.85-rc3 Index: NHibernateContribSolution.build =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/NHibernateContribSolution.build,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** NHibernateContribSolution.build 4 Apr 2005 04:24:47 -0000 1.12 --- NHibernateContribSolution.build 25 Apr 2005 03:34:14 -0000 1.13 *************** *** 4,8 **** name="NHibernateContribSolution" default="build" ! xmlns="http://nant.sf.net/schemas/nant-0.84.win32.net-1.0.xsd" > <!-- --- 4,8 ---- name="NHibernateContribSolution" default="build" ! xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd" > <!-- *************** *** 26,30 **** <property name="clover.src" value="src\CloverSrc" /> <property name="clover.db" value="${clover.src}\clover.cdb" /> ! <property name="clover.home" value="C:/Program Files/Cenqua/Clover.NET" /> <!-- --- 26,32 ---- <property name="clover.src" value="src\CloverSrc" /> <property name="clover.db" value="${clover.src}\clover.cdb" /> ! <property name="clover.home" value="C:/Program Files/Cenqua/Clover.NET for Visual Studio" /> ! <property name="clover.assembly" value="CloverNAnt-0.85.dll" /> ! <!-- *************** *** 114,122 **** <copy todir="${build.dir}/bin"> <fileset basedir="lib"> ! <includes name="Commons.*" /> ! <includes name="HashCodeProvider.*" /> ! <includes name="NAnt.Core.*" /> ! <includes name="NVelocity.*" /> ! <includes name="Bamboo.*" /> </fileset> </copy> --- 116,124 ---- <copy todir="${build.dir}/bin"> <fileset basedir="lib"> ! <include name="Commons.*" /> ! <include name="HashCodeProvider.*" /> ! <include name="NAnt.Core.*" /> ! <include name="NVelocity.*" /> ! <include name="Bamboo.*" /> </fileset> </copy> *************** *** 125,134 **** <copy todir="${build.dir}/bin"> <fileset basedir="${lib.dir}"> ! <includes name="HashCodeProvider.*" /> ! <includes name="Iesi.Collections.*" /> ! <includes name="log4net.*" /> ! <includes name="NHibernate.*" /> ! <includes name="nunit.framework.*" /> ! <includes name="Castle.*" /> </fileset> </copy> --- 127,136 ---- <copy todir="${build.dir}/bin"> <fileset basedir="${lib.dir}"> ! <include name="HashCodeProvider.*" /> ! <include name="Iesi.Collections.*" /> ! <include name="log4net.*" /> ! <include name="NHibernate.*" /> ! <include name="nunit.framework.*" /> ! <include name="Castle.*" /> </fileset> </copy> *************** *** 193,203 **** > <fileset basedir="src"> ! <excludes name="**/*Fixture.cs"/> ! <includes name="**/*.cs"/> </fileset> </clover-setup> <clover-report> <current title="NHibernateContrib" output="${build.dir}/clover" > ! <format type="html" orderBy="Alpha" /> </current> </clover-report> --- 195,205 ---- > <fileset basedir="src"> ! <exclude name="**/*Fixture.cs"/> ! <include name="**/*.cs"/> </fileset> </clover-setup> <clover-report> <current title="NHibernateContrib" output="${build.dir}/clover" > ! <format type="html" orderby="Alpha" /> </current> </clover-report> *************** *** 214,224 **** <ndoc> <assemblies basedir="${build.dir}/bin"> ! <includes name="NHibernate.Caches.SysCache.dll" /> ! <includes name="NHibernate.Caches.Prevalence.dll" /> ! <includes name="Nullables.dll" /> ! <includes name="Nullables.NHibernate.dll" /> ! <includes name="NHibernate.Tool.hbm2ddl.dll" /> ! <includes name="NHibernate.Tool.hbm2net.dll" /> ! <includes name="NHibernate.Tool.Net2Hbm.dll" /> </assemblies> --- 216,226 ---- <ndoc> <assemblies basedir="${build.dir}/bin"> ! <include name="NHibernate.Caches.SysCache.dll" /> ! <include name="NHibernate.Caches.Prevalence.dll" /> ! <include name="Nullables.dll" /> ! <include name="Nullables.NHibernate.dll" /> ! <include name="NHibernate.Tool.hbm2ddl.dll" /> ! <include name="NHibernate.Tool.hbm2net.dll" /> ! <include name="NHibernate.Tool.Net2Hbm.dll" /> </assemblies> *************** *** 271,276 **** <!-- remove all of the html, gif, etc... files and leave only the chm --> <fileset basedir="${build.dir}/doc/sdk"> ! <includes name="*" /> ! <excludes name="*SDK.chm" /> </fileset> </delete> --- 273,278 ---- <!-- remove all of the html, gif, etc... files and leave only the chm --> <fileset basedir="${build.dir}/doc/sdk"> ! <include name="*" /> ! <exclude name="*SDK.chm" /> </fileset> </delete> *************** *** 282,311 **** <fileset> <!-- copy framework nuetral dlls --> ! <includes name="lib/*" /> ! <includes name="${lib.dir}/**" /> <!-- exclude the Clover modified source files. --> ! <excludes name="${clover.src}/**" /> <!-- exclude ReSharper stuff --> ! <excludes name="**/_ReSharper*" /> ! <excludes name="**/*.resharperoptions" /> <!-- copy all of the source --> ! <includes name="src/**" /> ! <includes name="NHibernateContribSolution.build" /> ! <includes name="lgpl.txt" /> ! <includes name="releasenotes.txt" /> ! <includes name="readme.html" /> <!-- exclude VS.NET stuff --> ! <excludes name="**/*.suo" /> ! <excludes name="**/*j.user" /> ! <excludes name="**/bin/**" /> ! <excludes name="**/obj/**" /> <!-- exclude any keys that exist on the build machine --> ! <excludes name="**/*.snk" /> </fileset> --- 284,313 ---- <fileset> <!-- copy framework nuetral dlls --> ! <include name="lib/*" /> ! <include name="${lib.dir}/**" /> <!-- exclude the Clover modified source files. --> ! <exclude name="${clover.src}/**" /> <!-- exclude ReSharper stuff --> ! <exclude name="**/_ReSharper*" /> ! <exclude name="**/*.resharperoptions" /> <!-- copy all of the source --> ! <include name="src/**" /> ! <include name="NHibernateContribSolution.build" /> ! <include name="lgpl.txt" /> ! <include name="releasenotes.txt" /> ! <include name="readme.html" /> <!-- exclude VS.NET stuff --> ! <exclude name="**/*.suo" /> ! <exclude name="**/*j.user" /> ! <exclude name="**/bin/**" /> ! <exclude name="**/obj/**" /> <!-- exclude any keys that exist on the build machine --> ! <exclude name="**/*.snk" /> </fileset> *************** *** 315,319 **** <zip zipfile="${project.zip-path}"> <fileset basedir="${build.dir}"> ! <includes name="**/*" /> </fileset> </zip> --- 317,321 ---- <zip zipfile="${project.zip-path}"> <fileset basedir="${build.dir}"> ! <include name="**/*" /> </fileset> </zip> |
From: Michael D. <mik...@us...> - 2005-04-25 03:34:09
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables.Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8405/src/Nullables.Tests Modified Files: Nullables.Tests.build Log Message: upgraded to nant-0.85-rc3 Index: Nullables.Tests.build =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables.Tests/Nullables.Tests.build,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Nullables.Tests.build 6 Dec 2004 02:07:27 -0000 1.2 --- Nullables.Tests.build 25 Apr 2005 03:33:59 -0000 1.3 *************** *** 4,8 **** name="Nullables.Tests" default="build" ! xmlns="http://nant.sf.net/schemas/nant-0.84.win32.net-1.0.xsd" > <!-- --- 4,8 ---- name="Nullables.Tests" default="build" ! xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd" > <!-- *************** *** 24,29 **** <asminfo output="AssemblyInfo.cs" language="CSharp"> <imports> ! <import name="System.Reflection" /> ! <import name="System.Runtime.CompilerServices" /> </imports> <attributes> --- 24,29 ---- <asminfo output="AssemblyInfo.cs" language="CSharp"> <imports> ! <import namespace="System.Reflection" /> ! <import namespace="System.Runtime.CompilerServices" /> </imports> <attributes> *************** *** 48,68 **** <references basedir="${build.dir}/bin"> ! <includes name="System.dll" /> ! <includes name="System.Data.dll" /> ! <includes name="System.XML.dll" /> ! <includes name="log4net.dll" /> ! <includes name="NHibernate.dll" /> ! <includes name="Nullables.dll" /> ! <includes name="Nullables.NHibernate.dll" /> ! <includes name="nunit.framework.dll"/> </references> <resources prefix="Nullables.Tests" dynamicprefix="true"> ! <includes name="**/*.xml" /> ! <excludes name="bin/**/*.xml" /> </resources> <sources> ! <includes name="**/*.cs" /> </sources> </csc> --- 48,68 ---- <references basedir="${build.dir}/bin"> ! <include name="System.dll" /> ! <include name="System.Data.dll" /> ! <include name="System.XML.dll" /> ! <include name="log4net.dll" /> ! <include name="NHibernate.dll" /> ! <include name="Nullables.dll" /> ! <include name="Nullables.NHibernate.dll" /> ! <include name="nunit.framework.dll"/> </references> <resources prefix="Nullables.Tests" dynamicprefix="true"> ! <include name="**/*.xml" /> ! <exclude name="bin/**/*.xml" /> </resources> <sources> ! <include name="**/*.cs" /> </sources> </csc> *************** *** 89,97 **** </nunit2> ! <if propertytrue="nunit2report.installed"> <mkdir dir="${build.dir}/testresults" /> <nunit2report out="${build.dir}/testresults/index.html" format="Frames" todir="${build.dir}/testresults"> <fileset> ! <includes name="${build.dir}\bin\*results.xml" /> </fileset> </nunit2report> --- 89,97 ---- </nunit2> ! <if test="${nunit2report.installed}"> <mkdir dir="${build.dir}/testresults" /> <nunit2report out="${build.dir}/testresults/index.html" format="Frames" todir="${build.dir}/testresults"> <fileset> ! <include name="${build.dir}\bin\*results.xml" /> </fileset> </nunit2report> |
From: Michael D. <mik...@us...> - 2005-04-25 03:34:09
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/NHibernate.Caches/SysCache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8405/src/NHibernate.Caches/SysCache Modified Files: syscache.build Log Message: upgraded to nant-0.85-rc3 Index: syscache.build =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/NHibernate.Caches/SysCache/syscache.build,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** syscache.build 4 Apr 2005 12:35:38 -0000 1.2 --- syscache.build 25 Apr 2005 03:34:00 -0000 1.3 *************** *** 4,8 **** default="build" description="NHibernate pluggable cache provider using ASP.NET Cache object" ! xmlns="http://nant.sourceforge.net/schemas/nant-0.84.win32.net-1.0.xsd"> <!-- --- 4,8 ---- default="build" description="NHibernate pluggable cache provider using ASP.NET Cache object" ! xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd"> <!-- *************** *** 19,26 **** * clover.src - location of the clovered source to be stored at from the root of NHibernateContrib * clover.db - location of the coverage db from the root of NHibernateContrib --> ! <if propertytrue="clover.enabled"> ! <loadtasks assembly="${clover.home}/CloverNAnt-0.84.dll" /> </if> --- 19,27 ---- * clover.src - location of the clovered source to be stored at from the root of NHibernateContrib * clover.db - location of the coverage db from the root of NHibernateContrib + * clover.assembly - assembly that contains clover tasks for this version of NAnt --> ! <if test="${clover.enabled}"> ! <loadtasks assembly="${clover.home}/${clover.assembly}" /> </if> *************** *** 28,32 **** <target name="build"> ! <if propertytrue="clover.enabled"> <clover-setup initstring="..\..\${clover.db}" --- 29,33 ---- <target name="build"> ! <if test="${clover.enabled}"> <clover-setup initstring="..\..\${clover.db}" *************** *** 40,48 **** <asminfo output="AssemblyInfo.cs" language="CSharp"> <imports> ! <import name="System" /> ! <import name="System.Reflection" /> ! <import name="System.Runtime.CompilerServices" /> ! <import name="System.Runtime.InteropServices" /> ! <import name="System.Security.Permissions" /> </imports> <attributes> --- 41,49 ---- <asminfo output="AssemblyInfo.cs" language="CSharp"> <imports> ! <import namespace="System" /> ! <import namespace="System.Reflection" /> ! <import namespace="System.Runtime.CompilerServices" /> ! <import namespace="System.Runtime.InteropServices" /> ! <import namespace="System.Security.Permissions" /> </imports> <attributes> *************** *** 68,81 **** > <sources> ! <excludes name="**/*Fixture.cs" /> ! <includes name="**/*.cs" /> </sources> <references> ! <includes name="System.dll" /> ! <includes name="System.Data.dll" /> ! <includes name="System.Web.dll" /> ! <includes name="System.XML.dll" /> ! <includes name="${build.dir}/bin/NHibernate.dll" /> ! <includes name="${build.dir}/bin/log4net.dll" /> </references> </csc> --- 69,82 ---- > <sources> ! <exclude name="**/*Fixture.cs" /> ! <include name="**/*.cs" /> </sources> <references> ! <include name="System.dll" /> ! <include name="System.Data.dll" /> ! <include name="System.Web.dll" /> ! <include name="System.XML.dll" /> ! <include name="${build.dir}/bin/NHibernate.dll" /> ! <include name="${build.dir}/bin/log4net.dll" /> </references> </csc> *************** *** 88,102 **** > <sources> ! <includes name="**/AssemblyInfo.cs" /> ! <includes name="**/*Fixture.cs" /> </sources> <references> ! <includes name="System.dll" /> ! <includes name="System.Data.dll" /> ! <includes name="System.XML.dll" /> ! <includes name="${build.dir}/bin/${nant.project.name}.dll" /> ! <includes name="${build.dir}/bin/NHibernate.dll" /> ! <includes name="${build.dir}/bin/nunit.framework.dll" /> ! <includes name="${build.dir}/bin/log4net.dll" /> </references> </csc> --- 89,103 ---- > <sources> ! <include name="**/AssemblyInfo.cs" /> ! <include name="**/*Fixture.cs" /> </sources> <references> ! <include name="System.dll" /> ! <include name="System.Data.dll" /> ! <include name="System.XML.dll" /> ! <include name="${build.dir}/bin/${nant.project.name}.dll" /> ! <include name="${build.dir}/bin/NHibernate.dll" /> ! <include name="${build.dir}/bin/nunit.framework.dll" /> ! <include name="${build.dir}/bin/log4net.dll" /> </references> </csc> *************** *** 109,117 **** <test assemblyname="${build.dir}/bin/${nant.project.name}.Tests.dll" appconfig="${build.dir}/${nant.project.name}.Tests.dll.config" /> </nunit2> ! <if propertytrue="nunit2report.installed"> <mkdir dir="${build.dir}/testresults" /> <nunit2report out="${build.dir}/testresults/syscache.html" todir="${build.dir}/testresults"> <fileset> ! <includes name="${build.dir}\bin\${nant.project.name}.Tests.dll-results.xml" /> </fileset> </nunit2report> --- 110,118 ---- <test assemblyname="${build.dir}/bin/${nant.project.name}.Tests.dll" appconfig="${build.dir}/${nant.project.name}.Tests.dll.config" /> </nunit2> ! <if test="${nunit2report.installed}"> <mkdir dir="${build.dir}/testresults" /> <nunit2report out="${build.dir}/testresults/syscache.html" todir="${build.dir}/testresults"> <fileset> ! <include name="${build.dir}\bin\${nant.project.name}.Tests.dll-results.xml" /> </fileset> </nunit2report> |
From: Michael D. <mik...@us...> - 2005-04-25 03:34:08
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/NHibernate.Caches/Prevalence In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8405/src/NHibernate.Caches/Prevalence Modified Files: prevalencecache.build Log Message: upgraded to nant-0.85-rc3 Index: prevalencecache.build =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/NHibernate.Caches/Prevalence/prevalencecache.build,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** prevalencecache.build 4 Apr 2005 12:35:38 -0000 1.2 --- prevalencecache.build 25 Apr 2005 03:34:00 -0000 1.3 *************** *** 4,8 **** default="build" description="NHibernate pluggable cache provider using Bamboo.Prevalence engine" ! xmlns="http://nant.sourceforge.net/schemas/nant-0.84.win32.net-1.0.xsd"> <!-- --- 4,8 ---- default="build" description="NHibernate pluggable cache provider using Bamboo.Prevalence engine" ! xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd"> <!-- *************** *** 19,26 **** * clover.src - location of the clovered source to be stored at from the root of NHibernateContrib * clover.db - location of the coverage db from the root of NHibernateContrib --> ! <if propertytrue="clover.enabled"> ! <loadtasks assembly="${clover.home}/CloverNAnt-0.84.dll" /> </if> --- 19,27 ---- * clover.src - location of the clovered source to be stored at from the root of NHibernateContrib * clover.db - location of the coverage db from the root of NHibernateContrib + * clover.assembly - assembly that contains clover tasks for this version of NAnt --> ! <if test="${clover.enabled}"> ! <loadtasks assembly="${clover.home}/${clover.assembly}" /> </if> *************** *** 28,32 **** <target name="build"> ! <if propertytrue="clover.enabled"> <clover-setup initstring="..\..\${clover.db}" --- 29,33 ---- <target name="build"> ! <if test="${clover.enabled}"> <clover-setup initstring="..\..\${clover.db}" *************** *** 40,48 **** <asminfo output="AssemblyInfo.cs" language="CSharp"> <imports> ! <import name="System" /> ! <import name="System.Reflection" /> ! <import name="System.Runtime.CompilerServices" /> ! <import name="System.Runtime.InteropServices" /> ! <import name="System.Security.Permissions" /> </imports> <attributes> --- 41,49 ---- <asminfo output="AssemblyInfo.cs" language="CSharp"> <imports> ! <import namespace="System" /> ! <import namespace="System.Reflection" /> ! <import namespace="System.Runtime.CompilerServices" /> ! <import namespace="System.Runtime.InteropServices" /> ! <import namespace="System.Security.Permissions" /> </imports> <attributes> *************** *** 68,82 **** > <sources> ! <excludes name="**/*Fixture.cs" /> ! <includes name="**/*.cs" /> </sources> <references> ! <includes name="System.dll" /> ! <includes name="System.Data.dll" /> ! <includes name="System.Web.dll" /> ! <includes name="System.XML.dll" /> ! <includes name="${build.dir}/bin/NHibernate.dll" /> ! <includes name="${build.dir}/bin/log4net.dll" /> ! <includes name="${build.dir}/bin/Bamboo.Prevalence.dll" /> </references> </csc> --- 69,83 ---- > <sources> ! <exclude name="**/*Fixture.cs" /> ! <include name="**/*.cs" /> </sources> <references> ! <include name="System.dll" /> ! <include name="System.Data.dll" /> ! <include name="System.Web.dll" /> ! <include name="System.XML.dll" /> ! <include name="${build.dir}/bin/NHibernate.dll" /> ! <include name="${build.dir}/bin/log4net.dll" /> ! <include name="${build.dir}/bin/Bamboo.Prevalence.dll" /> </references> </csc> *************** *** 89,104 **** > <sources> ! <includes name="**/AssemblyInfo.cs" /> ! <includes name="**/*Fixture.cs" /> </sources> <references> ! <includes name="System.dll" /> ! <includes name="System.Data.dll" /> ! <includes name="System.XML.dll" /> ! <includes name="${build.dir}/bin/${nant.project.name}.dll" /> ! <includes name="${build.dir}/bin/NHibernate.dll" /> ! <includes name="${build.dir}/bin/nunit.framework.dll" /> ! <includes name="${build.dir}/bin/log4net.dll" /> ! <includes name="${build.dir}/bin/Bamboo.Prevalence.dll" /> </references> </csc> --- 90,105 ---- > <sources> ! <include name="**/AssemblyInfo.cs" /> ! <include name="**/*Fixture.cs" /> </sources> <references> ! <include name="System.dll" /> ! <include name="System.Data.dll" /> ! <include name="System.XML.dll" /> ! <include name="${build.dir}/bin/${nant.project.name}.dll" /> ! <include name="${build.dir}/bin/NHibernate.dll" /> ! <include name="${build.dir}/bin/nunit.framework.dll" /> ! <include name="${build.dir}/bin/log4net.dll" /> ! <include name="${build.dir}/bin/Bamboo.Prevalence.dll" /> </references> </csc> *************** *** 111,119 **** <test assemblyname="${build.dir}/bin/${nant.project.name}.Tests.dll" appconfig="${build.dir}/${nant.project.name}.Tests.dll.config" /> </nunit2> ! <if propertytrue="nunit2report.installed"> <mkdir dir="${build.dir}/testresults" /> <nunit2report out="${build.dir}/testresults/prevalencecache.html" todir="${build.dir}/testresults"> <fileset> ! <includes name="${build.dir}\bin\${nant.project.name}.Tests.dll-results.xml" /> </fileset> </nunit2report> --- 112,120 ---- <test assemblyname="${build.dir}/bin/${nant.project.name}.Tests.dll" appconfig="${build.dir}/${nant.project.name}.Tests.dll.config" /> </nunit2> ! <if test="${nunit2report.installed}"> <mkdir dir="${build.dir}/testresults" /> <nunit2report out="${build.dir}/testresults/prevalencecache.html" todir="${build.dir}/testresults"> <fileset> ! <include name="${build.dir}\bin\${nant.project.name}.Tests.dll-results.xml" /> </fileset> </nunit2report> |
From: Michael D. <mik...@us...> - 2005-04-25 03:34:08
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables.NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8405/src/Nullables.NHibernate Modified Files: Nullables.NHibernate.build Log Message: upgraded to nant-0.85-rc3 Index: Nullables.NHibernate.build =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables.NHibernate/Nullables.NHibernate.build,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Nullables.NHibernate.build 4 Apr 2005 12:35:41 -0000 1.3 --- Nullables.NHibernate.build 25 Apr 2005 03:33:59 -0000 1.4 *************** *** 4,8 **** name="Nullables.NHibernate" default="build" ! xmlns="http://nant.sf.net/schemas/nant-0.84.win32.net-1.0.xsd" > --- 4,8 ---- name="Nullables.NHibernate" default="build" ! xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd" > *************** *** 20,26 **** * clover.src - location of the clovered source to be stored at from the root of NHibernateContrib * clover.db - location of the coverage db from the root of NHibernateContrib --> ! <if propertytrue="clover.enabled"> ! <loadtasks assembly="${clover.home}/CloverNAnt-0.84.dll" /> </if> --- 20,28 ---- * clover.src - location of the clovered source to be stored at from the root of NHibernateContrib * clover.db - location of the coverage db from the root of NHibernateContrib + * clover.assembly - assembly that contains clover tasks for this version of NAnt --> ! ! <if test="${clover.enabled}"> ! <loadtasks assembly="${clover.home}/${clover.assembly}" /> </if> *************** *** 29,33 **** <target name="build" description="Build the NHibernate Types for the Nullables"> ! <if propertytrue="clover.enabled"> <clover-setup initstring="..\..\${clover.db}" --- 31,35 ---- <target name="build" description="Build the NHibernate Types for the Nullables"> ! <if test="${clover.enabled}"> <clover-setup initstring="..\..\${clover.db}" *************** *** 43,49 **** <asminfo output="AssemblyInfo.cs" language="CSharp"> <imports> ! <import name="System" /> ! <import name="System.Reflection" /> ! <import name="System.Runtime.CompilerServices" /> </imports> <attributes> --- 45,51 ---- <asminfo output="AssemblyInfo.cs" language="CSharp"> <imports> ! <import namespace="System" /> ! <import namespace="System.Reflection" /> ! <import namespace="System.Runtime.CompilerServices" /> </imports> <attributes> *************** *** 70,83 **** <references basedir="${build.dir}/bin"> ! <includes name="System.dll" /> ! <includes name="System.XML.dll" /> ! <includes name="System.Data.dll" /> ! <includes name="NHibernate.dll" /> ! <includes name="log4net.dll" /> ! <includes name="Nullables.dll" /> </references> <sources failonempty="true"> ! <includes name="**/*.cs" /> </sources> </csc> --- 72,85 ---- <references basedir="${build.dir}/bin"> ! <include name="System.dll" /> ! <include name="System.XML.dll" /> ! <include name="System.Data.dll" /> ! <include name="NHibernate.dll" /> ! <include name="log4net.dll" /> ! <include name="Nullables.dll" /> </references> <sources failonempty="true"> ! <include name="**/*.cs" /> </sources> </csc> |
From: Michael D. <mik...@us...> - 2005-04-25 03:34:08
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8405/src/Nullables Modified Files: Nullables.build Log Message: upgraded to nant-0.85-rc3 Index: Nullables.build =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/Nullables.build,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Nullables.build 4 Apr 2005 12:35:41 -0000 1.3 --- Nullables.build 25 Apr 2005 03:33:59 -0000 1.4 *************** *** 4,8 **** name="Nullables" default="build" ! xmlns="http://nant.sf.net/schemas/nant-0.84.win32.net-1.0.xsd" > --- 4,8 ---- name="Nullables" default="build" ! xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd" > *************** *** 20,27 **** * clover.src - location of the clovered source to be stored at from the root of NHibernateContrib * clover.db - location of the coverage db from the root of NHibernateContrib --> ! ! <if propertytrue="clover.enabled"> ! <loadtasks assembly="${clover.home}/CloverNAnt-0.84.dll" /> </if> --- 20,28 ---- * clover.src - location of the clovered source to be stored at from the root of NHibernateContrib * clover.db - location of the coverage db from the root of NHibernateContrib + * clover.assembly - assembly that contains clover tasks for this version of NAnt --> ! ! <if test="${clover.enabled}"> ! <loadtasks assembly="${clover.home}/${clover.assembly}" /> </if> *************** *** 30,34 **** <target name="build" description="Build Nullables"> ! <if propertytrue="clover.enabled"> <clover-setup initstring="..\..\${clover.db}" --- 31,35 ---- <target name="build" description="Build Nullables"> ! <if test="${clover.enabled}"> <clover-setup initstring="..\..\${clover.db}" *************** *** 44,50 **** <asminfo output="AssemblyInfo.cs" language="CSharp"> <imports> ! <import name="System" /> ! <import name="System.Reflection" /> ! <import name="System.Runtime.CompilerServices" /> </imports> <attributes> --- 45,51 ---- <asminfo output="AssemblyInfo.cs" language="CSharp"> <imports> ! <import namespace="System" /> ! <import namespace="System.Reflection" /> ! <import namespace="System.Runtime.CompilerServices" /> </imports> <attributes> *************** *** 71,79 **** <sources failonempty="true"> ! <includes name="**/*.cs" /> </sources> <references basedir="${build.dir}/bin"> ! <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.dll" /> </references> --- 72,80 ---- <sources failonempty="true"> ! <include name="**/*.cs" /> </sources> <references basedir="${build.dir}/bin"> ! <include name="${nant.settings.currentframework.frameworkassemblydirectory}/System.dll" /> </references> |
From: Michael D. <mik...@us...> - 2005-04-25 03:34:07
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/NHibernate.Tool.Net2Hbm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8405/src/NHibernate.Tool.Net2Hbm Modified Files: NHibernate.Tool.Net2Hbm.build Log Message: upgraded to nant-0.85-rc3 Index: NHibernate.Tool.Net2Hbm.build =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/NHibernate.Tool.Net2Hbm/NHibernate.Tool.Net2Hbm.build,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NHibernate.Tool.Net2Hbm.build 4 Apr 2005 12:35:40 -0000 1.2 --- NHibernate.Tool.Net2Hbm.build 25 Apr 2005 03:33:59 -0000 1.3 *************** *** 4,8 **** name="NHibernate.Tool.Net2Hbm" default="build" ! xmlns="http://nant.sf.net/schemas/nant-0.84.win32.net-1.0.xsd" > --- 4,8 ---- name="NHibernate.Tool.Net2Hbm" default="build" ! xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd" > *************** *** 20,27 **** * clover.src - location of the clovered source to be stored at from the root of NHibernateContrib * clover.db - location of the coverage db from the root of NHibernateContrib --> ! ! <if propertytrue="clover.enabled"> ! <loadtasks assembly="${clover.home}/CloverNAnt-0.84.dll" /> </if> --- 20,28 ---- * clover.src - location of the clovered source to be stored at from the root of NHibernateContrib * clover.db - location of the coverage db from the root of NHibernateContrib + * clover.assembly - assembly that contains clover tasks for this version of NAnt --> ! ! <if test="${clover.enabled}"> ! <loadtasks assembly="${clover.home}/${clover.assembly}" /> </if> *************** *** 30,34 **** <target name="build" description="Build NHibernate.Tool.Net2Hbm"> ! <if propertytrue="clover.enabled"> <clover-setup initstring="..\..\${clover.db}" --- 31,35 ---- <target name="build" description="Build NHibernate.Tool.Net2Hbm"> ! <if test="${clover.enabled}"> <clover-setup initstring="..\..\${clover.db}" *************** *** 44,50 **** <asminfo output="AssemblyInfo.cs" language="CSharp"> <imports> ! <import name="System" /> ! <import name="System.Reflection" /> ! <import name="System.Runtime.CompilerServices" /> </imports> <attributes> --- 45,51 ---- <asminfo output="AssemblyInfo.cs" language="CSharp"> <imports> ! <import namespace="System" /> ! <import namespace="System.Reflection" /> ! <import namespace="System.Runtime.CompilerServices" /> </imports> <attributes> *************** *** 71,81 **** <sources failonempty="true"> ! <includes name="**/*.cs" /> </sources> <references basedir="${build.dir}/bin"> ! <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.dll" /> ! <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Data.dll" /> ! <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.XML.dll" /> </references> --- 72,82 ---- <sources failonempty="true"> ! <include name="**/*.cs" /> </sources> <references basedir="${build.dir}/bin"> ! <include name="${nant.settings.currentframework.frameworkassemblydirectory}/System.dll" /> ! <include name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Data.dll" /> ! <include name="${nant.settings.currentframework.frameworkassemblydirectory}/System.XML.dll" /> </references> |