You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(248) |
May
(82) |
Jun
(90) |
Jul
(177) |
Aug
(253) |
Sep
(157) |
Oct
(151) |
Nov
(143) |
Dec
(278) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(152) |
Feb
(107) |
Mar
(177) |
Apr
(133) |
May
(259) |
Jun
(81) |
Jul
(119) |
Aug
(306) |
Sep
(416) |
Oct
(240) |
Nov
(329) |
Dec
(206) |
2006 |
Jan
(466) |
Feb
(382) |
Mar
(153) |
Apr
(162) |
May
(133) |
Jun
(21) |
Jul
(18) |
Aug
(37) |
Sep
(97) |
Oct
(114) |
Nov
(110) |
Dec
(28) |
2007 |
Jan
(74) |
Feb
(65) |
Mar
(49) |
Apr
(76) |
May
(43) |
Jun
(15) |
Jul
(68) |
Aug
(55) |
Sep
(63) |
Oct
(59) |
Nov
(70) |
Dec
(66) |
2008 |
Jan
(71) |
Feb
(60) |
Mar
(120) |
Apr
(31) |
May
(48) |
Jun
(81) |
Jul
(107) |
Aug
(51) |
Sep
(80) |
Oct
(83) |
Nov
(83) |
Dec
(79) |
2009 |
Jan
(83) |
Feb
(110) |
Mar
(97) |
Apr
(91) |
May
(291) |
Jun
(250) |
Jul
(197) |
Aug
(58) |
Sep
(54) |
Oct
(122) |
Nov
(68) |
Dec
(34) |
2010 |
Jan
(50) |
Feb
(17) |
Mar
(63) |
Apr
(61) |
May
(84) |
Jun
(81) |
Jul
(138) |
Aug
(144) |
Sep
(78) |
Oct
(26) |
Nov
(30) |
Dec
(61) |
2011 |
Jan
(33) |
Feb
(35) |
Mar
(166) |
Apr
(221) |
May
(109) |
Jun
(76) |
Jul
(27) |
Aug
(37) |
Sep
(1) |
Oct
(4) |
Nov
(2) |
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
(1) |
2014 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael D. <mik...@us...> - 2005-02-14 03:59:04
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26944/Dialect Added Files: SQLiteDialect.cs Log Message: NH161 - addition of SQLite driver and dialect. --- NEW FILE: SQLiteDialect.cs --- using System; using System.Data; namespace NHibernate.Dialect { /// <summary> /// A SQL dialect for SQLite. /// </summary> /// <remarks> /// <p> /// Author: <a href="mailto:ib...@st..."> Ioan Bizau </a> /// </p> /// </remarks> public class SQLiteDialect : Dialect { public SQLiteDialect() { Register(DbType.Binary, "BLOB"); Register(DbType.Byte, "INTEGER"); Register(DbType.Int16, "INTEGER"); Register(DbType.Int32, "INTEGER"); Register(DbType.Int64, "INTEGER"); Register(DbType.SByte, "INTEGER"); Register(DbType.UInt16, "INTEGER"); Register(DbType.UInt32, "INTEGER"); Register(DbType.UInt64, "INTEGER"); Register(DbType.Currency, "NUMERIC"); Register(DbType.Decimal, "NUMERIC"); Register(DbType.Double, "NUMERIC"); Register(DbType.Single, "NUMERIC"); Register(DbType.VarNumeric, "NUMERIC"); Register(DbType.String, "TEXT"); } public override string IdentitySelectString { get { return "select last_insert_rowid()"; } } } } |
From: Michael D. <mik...@us...> - 2005-02-14 03:59:04
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Driver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26944/Driver Added Files: SQLiteDriver.cs Log Message: NH161 - addition of SQLite driver and dialect. --- NEW FILE: SQLiteDriver.cs --- using System; namespace NHibernate.Driver { /// <summary> /// NHibernate driver for the SQLite.NET data provider. /// <p> /// Author: <a href="mailto:ib...@st..."> Ioan Bizau </a> /// </p> /// </summary> /// <remarks> /// <p> /// In order to use this Driver you must have the SQLite.NET.dll Assembly available for NHibernate to load it. /// You must also have the SQLite.dll and SQLite3.dll libraries. /// </p> /// <p> /// Please check <a href="http://www.sqlite.org/"> http://www.sqlite.org/ </a> for more information regarding SQLite. /// </p> /// </remarks> public class SQLiteDriver : DriverBase { System.Type _connectionType; System.Type _commandType; public SQLiteDriver() { _connectionType = System.Type.GetType("Finisar.SQLite.SQLiteConnection, SQLite.NET"); _commandType = System.Type.GetType("Finisar.SQLite.SQLiteCommand, SQLite.NET"); if( _connectionType == null || _commandType == null ) { throw new HibernateException( "The IDbCommand and IDbConnection implementation in the Assembly SQLite.dll could not be found. " + "Please ensure that the Assembly SQLite.dll is " + "in the Global Assembly Cache or in a location that NHibernate " + "can use System.Type.GetType(string) to load the types from." ); } } public override System.Type CommandType { get { return _commandType; } } public override System.Type ConnectionType { get { return _connectionType; } } public override bool UseNamedPrefixInSql { get { return true; } } public override bool UseNamedPrefixInParameter { get { return true; } } public override string NamedPrefix { get { return "@"; } } } } |
From: Michael D. <mik...@us...> - 2005-02-14 03:59:02
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26944 Modified Files: NHibernate-1.1.csproj Log Message: NH161 - addition of SQLite driver and dialect. Index: NHibernate-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/NHibernate-1.1.csproj,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** NHibernate-1.1.csproj 7 Feb 2005 01:34:39 -0000 1.72 --- NHibernate-1.1.csproj 14 Feb 2005 03:58:52 -0000 1.73 *************** *** 530,533 **** --- 530,538 ---- /> <File + RelPath = "Dialect\SQLiteDialect.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Dialect\SybaseDialect.cs" SubType = "Code" *************** *** 605,608 **** --- 610,618 ---- /> <File + RelPath = "Driver\SQLiteDriver.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Engine\Cascades.cs" SubType = "Code" |
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Type In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20103/NHibernate/Type Modified Files: ArrayType.cs BagType.cs IdentifierBagType.cs MapType.cs PersistentCollectionType.cs SetType.cs SortedMapType.cs SortedSetType.cs Log Message: Added documentation to Wrap method. Index: BagType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/BagType.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** BagType.cs 7 Feb 2005 01:34:41 -0000 1.5 --- BagType.cs 14 Feb 2005 03:39:31 -0000 1.6 *************** *** 34,42 **** /// <summary> ! /// /// </summary> ! /// <param name="session"></param> ! /// <param name="collection"></param> ! /// <returns></returns> public override PersistentCollection Wrap( ISessionImplementor session, object collection ) { --- 34,44 ---- /// <summary> ! /// Wraps an <see cref="IList"/> in a <see cref="Bag"/>. /// </summary> ! /// <param name="session">The <see cref="ISessionImplementor"/> for the collection to be a part of.</param> ! /// <param name="collection">The unwrapped <see cref="IList"/>.</param> ! /// <returns> ! /// An <see cref="Bag"/> that wraps the non NHibernate <see cref="IList"/>. ! /// </returns> public override PersistentCollection Wrap( ISessionImplementor session, object collection ) { Index: IdentifierBagType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/IdentifierBagType.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IdentifierBagType.cs 7 Feb 2005 01:34:41 -0000 1.3 --- IdentifierBagType.cs 14 Feb 2005 03:39:31 -0000 1.4 *************** *** 36,44 **** /// <summary> ! /// /// </summary> ! /// <param name="session"></param> ! /// <param name="collection"></param> ! /// <returns></returns> public override PersistentCollection Wrap( ISessionImplementor session, object collection ) { --- 36,46 ---- /// <summary> ! /// Wraps an <see cref="IList"/> in a <see cref="IdentifierBag"/>. /// </summary> ! /// <param name="session">The <see cref="ISessionImplementor"/> for the collection to be a part of.</param> ! /// <param name="collection">The unwrapped <see cref="IList"/>.</param> ! /// <returns> ! /// An <see cref="IdentifierBag"/> that wraps the non NHibernate <see cref="IList"/>. ! /// </returns> public override PersistentCollection Wrap( ISessionImplementor session, object collection ) { Index: ArrayType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/ArrayType.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ArrayType.cs 7 Feb 2005 01:34:41 -0000 1.8 --- ArrayType.cs 14 Feb 2005 03:39:31 -0000 1.9 *************** *** 78,86 **** /// <summary> ! /// /// </summary> ! /// <param name="session"></param> ! /// <param name="array"></param> ! /// <returns></returns> public override PersistentCollection Wrap( ISessionImplementor session, object array ) { --- 78,88 ---- /// <summary> ! /// Wraps a <see cref="System.Array"/> in a <see cref="ArrayHolder"/>. /// </summary> ! /// <param name="session">The <see cref="ISessionImplementor"/> for the collection to be a part of.</param> ! /// <param name="array">The unwrapped array.</param> ! /// <returns> ! /// An <see cref="ArrayHolder"/> that wraps the non NHibernate <see cref="System.Array"/>. ! /// </returns> public override PersistentCollection Wrap( ISessionImplementor session, object array ) { Index: MapType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/MapType.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MapType.cs 7 Feb 2005 01:34:41 -0000 1.6 --- MapType.cs 14 Feb 2005 03:39:31 -0000 1.7 *************** *** 44,52 **** /// <summary> ! /// /// </summary> ! /// <param name="session"></param> ! /// <param name="collection"></param> ! /// <returns></returns> public override PersistentCollection Wrap( ISessionImplementor session, object collection ) { --- 44,54 ---- /// <summary> ! /// Wraps an <see cref="IDictionary"/> in a <see cref="Map"/>. /// </summary> ! /// <param name="session">The <see cref="ISessionImplementor"/> for the collection to be a part of.</param> ! /// <param name="collection">The unwrapped <see cref="IDictionary"/>.</param> ! /// <returns> ! /// An <see cref="Map"/> that wraps the non NHibernate <see cref="IDictionary"/>. ! /// </returns> public override PersistentCollection Wrap( ISessionImplementor session, object collection ) { Index: SortedMapType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/SortedMapType.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SortedMapType.cs 7 Feb 2005 01:34:41 -0000 1.4 --- SortedMapType.cs 14 Feb 2005 03:39:31 -0000 1.5 *************** *** 39,47 **** /// <summary> ! /// /// </summary> ! /// <param name="session"></param> ! /// <param name="collection"></param> ! /// <returns></returns> public override PersistentCollection Wrap( ISessionImplementor session, object collection ) { --- 39,49 ---- /// <summary> ! /// Wraps an <see cref="IDictionary"/> in a <see cref="SortedMap"/>. /// </summary> ! /// <param name="session">The <see cref="ISessionImplementor"/> for the collection to be a part of.</param> ! /// <param name="collection">The unwrapped <see cref="IDictionary"/>.</param> ! /// <returns> ! /// An <see cref="SortedMap"/> that wraps the non NHibernate <see cref="IDictionary"/>. ! /// </returns> public override PersistentCollection Wrap( ISessionImplementor session, object collection ) { Index: SetType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/SetType.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SetType.cs 7 Feb 2005 01:34:41 -0000 1.6 --- SetType.cs 14 Feb 2005 03:39:31 -0000 1.7 *************** *** 1,7 **** using System.Collections; - using Iesi.Collections; using NHibernate.Collection; using NHibernate.Engine; - using Set = NHibernate.Collection.Set; namespace NHibernate.Type --- 1,5 ---- *************** *** 35,49 **** public override System.Type ReturnedClass { ! get { return typeof( ISet ); } } /// <summary> ! /// <see cref="PersistentCollectionType.Wrap"/> /// </summary> ! /// <param name="collection"></param> ! /// <param name="session"></param> public override PersistentCollection Wrap( ISessionImplementor session, object collection ) { ! return new Set( session, ( ISet ) collection ); } --- 33,50 ---- public override System.Type ReturnedClass { ! get { return typeof( Iesi.Collections.ISet ); } } /// <summary> ! /// Wraps an <see cref="Iesi.Collections.ISet"/> in a <see cref="Set"/>. /// </summary> ! /// <param name="session">The <see cref="ISessionImplementor"/> for the collection to be a part of.</param> ! /// <param name="collection">The unwrapped <see cref="Iesi.Collections.ISet"/>.</param> ! /// <returns> ! /// An <see cref="Set"/> that wraps the non NHibernate <see cref="Iesi.Collections.ISet"/>. ! /// </returns> public override PersistentCollection Wrap( ISessionImplementor session, object collection ) { ! return new Set( session, ( Iesi.Collections.ISet ) collection ); } Index: PersistentCollectionType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/PersistentCollectionType.cs,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** PersistentCollectionType.cs 7 Feb 2005 01:34:41 -0000 1.20 --- PersistentCollectionType.cs 14 Feb 2005 03:39:31 -0000 1.21 *************** *** 229,237 **** /// <summary> ! /// /// </summary> ! /// <param name="session"></param> ! /// <param name="collection"></param> ! /// <returns></returns> public abstract PersistentCollection Wrap( ISessionImplementor session, object collection ); --- 229,240 ---- /// <summary> ! /// Wraps a collection from System.Collections or Iesi.Collections inside one of the ! /// NHibernate collections. /// </summary> ! /// <param name="session">The <see cref="ISessionImplementor"/> for the collection to be a part of.</param> ! /// <param name="collection">The unwrapped collection.</param> ! /// <returns> ! /// A subclass of <see cref="PersistentCollection"/> that wraps the non NHibernate collection. ! /// </returns> public abstract PersistentCollection Wrap( ISessionImplementor session, object collection ); Index: SortedSetType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/SortedSetType.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SortedSetType.cs 7 Feb 2005 01:34:41 -0000 1.7 --- SortedSetType.cs 14 Feb 2005 03:39:31 -0000 1.8 *************** *** 1,7 **** using System.Collections; ! using Iesi.Collections; using NHibernate.Collection; using NHibernate.Engine; - using SortedSet = NHibernate.Collection.SortedSet; namespace NHibernate.Type --- 1,6 ---- using System.Collections; ! using NHibernate.Collection; using NHibernate.Engine; namespace NHibernate.Type *************** *** 41,52 **** /// <summary> ! /// /// </summary> ! /// <param name="session"></param> ! /// <param name="collection"></param> ! /// <returns></returns> public override PersistentCollection Wrap( ISessionImplementor session, object collection ) { ! return new SortedSet( session, ( ISet ) collection, comparer ); } --- 40,53 ---- /// <summary> ! /// Wraps an <see cref="Iesi.Collections.ISet"/> in a <see cref="SortedSet"/>. /// </summary> ! /// <param name="session">The <see cref="ISessionImplementor"/> for the collection to be a part of.</param> ! /// <param name="collection">The unwrapped <see cref="Iesi.Collections.ISet"/>.</param> ! /// <returns> ! /// An <see cref="SortedSet"/> that wraps the non NHibernate <see cref="Iesi.Collections.ISet"/>. ! /// </returns> public override PersistentCollection Wrap( ISessionImplementor session, object collection ) { ! return new SortedSet( session, ( Iesi.Collections.ISet ) collection, comparer ); } |
From: Michael D. <mik...@us...> - 2005-02-14 03:39:16
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Type In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19918/NHibernate/Type Modified Files: SerializationException.cs Log Message: Followed FxCops rules on creating custom exceptions and supporting serialization. However, they still inherit from ApplicationException. Index: SerializationException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/SerializationException.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SerializationException.cs 31 Dec 2004 23:55:34 -0000 1.5 --- SerializationException.cs 14 Feb 2005 03:39:07 -0000 1.6 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate.Type *************** *** 10,20 **** { /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="root"></param> ! public SerializationException( string message, Exception root ) : base( message, root ) { } } ! } \ No newline at end of file --- 11,56 ---- { /// <summary> ! /// Initializes a new instance of the <see cref="SerializationException"/> class. /// </summary> ! public SerializationException( ) : base( "The Property associated with a SerializableType threw an Exception during serialization or deserialization." ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="SerializationException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error.</param> ! public SerializationException( string message ) : base( message ) ! { ! ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="SerializationException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error.</param> ! /// <param name="e"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public SerializationException( string message, Exception e ) : base( message, e ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="SerializationException"/> class ! /// with serialized data. ! /// </summary> ! /// <param name="info"> ! /// The <see cref="SerializationInfo"/> that holds the serialized object ! /// data about the exception being thrown. ! /// </param> ! /// <param name="context"> ! /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. ! /// </param> ! protected SerializationException( SerializationInfo info, StreamingContext context ) : base( info, context ) { } } ! } |
From: Michael D. <mik...@us...> - 2005-02-14 03:38:54
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Type In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19711/NHibernate/Type Modified Files: BooleanType.cs ComponentType.cs Log Message: changed private static readonly to private const since don't need to worry about those getting compiled into other code. Modified InstantiationException ctor. Index: BooleanType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/BooleanType.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** BooleanType.cs 31 Dec 2004 23:51:19 -0000 1.11 --- BooleanType.cs 14 Feb 2005 03:38:45 -0000 1.12 *************** *** 11,16 **** public class BooleanType : ValueTypeType, IDiscriminatorType { ! private static readonly string TRUE = "1"; ! private static readonly string FALSE = "0"; /// <summary> --- 11,16 ---- public class BooleanType : ValueTypeType, IDiscriminatorType { ! private const string TRUE = "1"; ! private const string FALSE = "0"; /// <summary> Index: ComponentType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/ComponentType.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ComponentType.cs 31 Dec 2004 23:51:32 -0000 1.11 --- ComponentType.cs 14 Feb 2005 03:38:45 -0000 1.12 *************** *** 408,412 **** catch( Exception e ) { ! throw new InstantiationException( "Could not instantiate component: ", componentClass, e ); } } --- 408,412 ---- catch( Exception e ) { ! throw new InstantiationException( "Could not instantiate component: ", e, componentClass ); } } *************** *** 431,435 **** catch( Exception e ) { ! throw new InstantiationException( "Could not set component parent for: ", componentClass, e ); } } --- 431,435 ---- catch( Exception e ) { ! throw new InstantiationException( "Could not set component parent for: ", e, componentClass ); } } |
From: Michael D. <mik...@us...> - 2005-02-14 03:37:36
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19108/NHibernate/Mapping Modified Files: Bag.cs IdentifierBag.cs List.cs Map.cs Set.cs Log Message: replaced namespace and class aliasing with just using the fully qualified name. Index: Bag.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/Bag.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Bag.cs 31 Dec 2004 21:26:26 -0000 1.5 --- Bag.cs 14 Feb 2005 03:37:27 -0000 1.6 *************** *** 1,4 **** using NHibernate.Type; - using NHibernateBag=NHibernate.Collection.Bag; namespace NHibernate.Mapping --- 1,3 ---- *************** *** 26,30 **** public override System.Type WrapperClass { ! get { return typeof( NHibernateBag ); } } --- 25,29 ---- public override System.Type WrapperClass { ! get { return typeof( NHibernate.Collection.Bag ); } } Index: List.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/List.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** List.cs 31 Dec 2004 21:27:30 -0000 1.7 --- List.cs 14 Feb 2005 03:37:27 -0000 1.8 *************** *** 1,5 **** using NHibernate.Type; - using Collection_List = NHibernate.Collection.List; - using NHCollection = NHibernate.Collection; namespace NHibernate.Mapping --- 1,3 ---- *************** *** 27,31 **** public override System.Type WrapperClass { ! get { return typeof( Collection_List ); } } --- 25,29 ---- public override System.Type WrapperClass { ! get { return typeof( NHibernate.Collection.List ); } } Index: Map.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/Map.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Map.cs 31 Dec 2004 21:27:30 -0000 1.6 --- Map.cs 14 Feb 2005 03:37:27 -0000 1.7 *************** *** 1,6 **** - using NHibernate.Collection; using NHibernate.Type; - using Collection_Map = NHibernate.Collection.Map; - using NHCollection = NHibernate.Collection; namespace NHibernate.Mapping --- 1,3 ---- *************** *** 34,39 **** { return IsSorted ? ! typeof( SortedMap ) : ! typeof( Collection_Map ); } } --- 31,36 ---- { return IsSorted ? ! typeof( NHibernate.Collection.SortedMap ) : ! typeof( NHibernate.Collection.Map ); } } Index: Set.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/Set.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Set.cs 31 Dec 2004 21:27:54 -0000 1.6 --- Set.cs 14 Feb 2005 03:37:27 -0000 1.7 *************** *** 1,6 **** - using NHibernate.Collection; using NHibernate.Type; - using Collection_Set = NHibernate.Collection.Set; - using NCollection = NHibernate.Collection; namespace NHibernate.Mapping --- 1,3 ---- *************** *** 50,55 **** { return IsSorted ? ! typeof( SortedSet ) : ! typeof( Collection_Set ); } } --- 47,52 ---- { return IsSorted ? ! typeof( NHibernate.Collection.SortedSet ) : ! typeof( NHibernate.Collection.Set ); } } Index: IdentifierBag.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/IdentifierBag.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IdentifierBag.cs 31 Dec 2004 21:26:49 -0000 1.3 --- IdentifierBag.cs 14 Feb 2005 03:37:27 -0000 1.4 *************** *** 1,5 **** using NHibernate.Type; - using Collection_IdentifierBag = NHibernate.Collection.IdentifierBag; - using NHCollection = NHibernate.Collection; namespace NHibernate.Mapping --- 1,3 ---- *************** *** 28,32 **** public override System.Type WrapperClass { ! get { return typeof( Collection_IdentifierBag ); } } --- 26,30 ---- public override System.Type WrapperClass { ! get { return typeof( NHibernate.Collection.IdentifierBag ); } } |
From: Michael D. <mik...@us...> - 2005-02-14 03:35:29
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18205/NHibernate/Collection Modified Files: ArrayHolder.cs Bag.cs CollectionPersister.cs IdentifierBag.cs List.cs Map.cs Set.cs SortedMap.cs SortedSet.cs Log Message: changed ctors to internal reduced number of casts in ArrayHolder with snapshot fields. Index: Bag.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/Bag.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Bag.cs 7 Feb 2005 01:34:40 -0000 1.13 --- Bag.cs 14 Feb 2005 03:35:19 -0000 1.14 *************** *** 22,26 **** /// </summary> /// <param name="session"></param> ! public Bag( ISessionImplementor session ) : base( session ) { } --- 22,26 ---- /// </summary> /// <param name="session"></param> ! internal Bag( ISessionImplementor session ) : base( session ) { } *************** *** 31,35 **** /// <param name="session"></param> /// <param name="coll"></param> ! public Bag( ISessionImplementor session, ICollection coll ) : base( session ) { bag = coll as IList; --- 31,35 ---- /// <param name="session"></param> /// <param name="coll"></param> ! internal Bag( ISessionImplementor session, ICollection coll ) : base( session ) { bag = coll as IList; Index: Map.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/Map.cs,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Map.cs 7 Feb 2005 01:34:40 -0000 1.19 --- Map.cs 14 Feb 2005 03:35:19 -0000 1.20 *************** *** 73,77 **** /// </summary> /// <param name="session">The ISession the Map should be a part of.</param> ! public Map( ISessionImplementor session ) : base( session ) { } --- 73,77 ---- /// </summary> /// <param name="session">The ISession the Map should be a part of.</param> ! internal Map( ISessionImplementor session ) : base( session ) { } *************** *** 82,86 **** /// <param name="session">The ISession the Map should be a part of.</param> /// <param name="map">The IDictionary that contains the initial values.</param> ! public Map( ISessionImplementor session, IDictionary map ) : base( session ) { this.map = map; --- 82,86 ---- /// <param name="session">The ISession the Map should be a part of.</param> /// <param name="map">The IDictionary that contains the initial values.</param> ! internal Map( ISessionImplementor session, IDictionary map ) : base( session ) { this.map = map; Index: List.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/List.cs,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** List.cs 7 Feb 2005 01:34:40 -0000 1.18 --- List.cs 14 Feb 2005 03:35:19 -0000 1.19 *************** *** 70,74 **** /// </summary> /// <param name="session"></param> ! public List( ISessionImplementor session ) : base( session ) { } --- 70,74 ---- /// </summary> /// <param name="session"></param> ! internal List( ISessionImplementor session ) : base( session ) { } *************** *** 79,83 **** /// <param name="session"></param> /// <param name="list"></param> ! public List( ISessionImplementor session, IList list ) : base( session ) { this.list = list; --- 79,83 ---- /// <param name="session"></param> /// <param name="list"></param> ! internal List( ISessionImplementor session, IList list ) : base( session ) { this.list = list; Index: CollectionPersister.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/CollectionPersister.cs,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** CollectionPersister.cs 7 Feb 2005 01:34:40 -0000 1.32 --- CollectionPersister.cs 14 Feb 2005 03:35:19 -0000 1.33 *************** *** 336,340 **** if( sqlWhereStringTemplate != null ) { ! return StringHelper.Replace( sqlWhereStringTemplate, Template.PlaceHolder, alias ); } else --- 336,340 ---- if( sqlWhereStringTemplate != null ) { ! return StringHelper.Replace( sqlWhereStringTemplate, Template.Placeholder, alias ); } else *************** *** 354,358 **** if( sqlOrderByStringTemplate != null ) { ! return StringHelper.Replace( sqlOrderByStringTemplate, Template.PlaceHolder, alias ); } else --- 354,358 ---- if( sqlOrderByStringTemplate != null ) { ! return StringHelper.Replace( sqlOrderByStringTemplate, Template.Placeholder, alias ); } else Index: ArrayHolder.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/ArrayHolder.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ArrayHolder.cs 7 Feb 2005 01:34:40 -0000 1.16 --- ArrayHolder.cs 14 Feb 2005 03:35:19 -0000 1.17 *************** *** 14,18 **** public class ArrayHolder : PersistentCollection { ! private static readonly ILog log = LogManager.GetLogger( typeof( PersistentCollection ) ); /// <summary> --- 14,18 ---- public class ArrayHolder : PersistentCollection { ! private static readonly ILog log = LogManager.GetLogger( typeof( ArrayHolder ) ); /// <summary> *************** *** 37,41 **** /// <param name="session"></param> /// <param name="array"></param> ! public ArrayHolder( ISessionImplementor session, object array ) : base( session ) { this.array = (Array) array; --- 37,41 ---- /// <param name="session"></param> /// <param name="array"></param> ! internal ArrayHolder( ISessionImplementor session, object array ) : base( session ) { this.array = (Array) array; *************** *** 116,122 **** public override bool EqualsSnapshot( IType elementType ) { ! object snapshot = GetSnapshot(); ! int xlen = ( ( Array ) snapshot ).Length; ! if( xlen != ( ( Array ) array ).Length ) { return false; --- 116,123 ---- public override bool EqualsSnapshot( IType elementType ) { ! Array snapshot = GetSnapshot() as Array; ! ! int xlen = snapshot.Length; ! if( xlen != array.Length ) { return false; *************** *** 124,128 **** for( int i = 0; i < xlen; i++ ) { ! if( elementType.IsDirty( ( ( Array ) snapshot ).GetValue( i ), ( ( Array ) array ).GetValue( i ), session ) ) { return false; --- 125,129 ---- for( int i = 0; i < xlen; i++ ) { ! if( elementType.IsDirty( snapshot.GetValue( i ), array.GetValue( i ), session ) ) { return false; *************** *** 139,147 **** { //if (array==null) return tempList; ! int length = ( ( Array ) array ).Length; IList list = new ArrayList( length ); for( int i = 0; i < length; i++ ) { ! list.Add( ( ( Array ) array ).GetValue( i ) ); } return list; --- 140,148 ---- { //if (array==null) return tempList; ! int length = array.Length; IList list = new ArrayList( length ); for( int i = 0; i < length; i++ ) { ! list.Add( array.GetValue( i ) ); } return list; *************** *** 280,288 **** public override object Disassemble( CollectionPersister persister ) { ! int length = ( ( Array ) array ).Length; object[ ] result = new object[length]; for( int i = 0; i < length; i++ ) { ! result[ i ] = persister.ElementType.Disassemble( ( ( Array ) array ).GetValue( i ), session ); } return result; --- 281,289 ---- public override object Disassemble( CollectionPersister persister ) { ! int length = array.Length; object[ ] result = new object[length]; for( int i = 0; i < length; i++ ) { ! result[ i ] = persister.ElementType.Disassemble( array.GetValue( i ), session ); } return result; *************** *** 308,314 **** { IList deletes = new ArrayList(); ! object sn = GetSnapshot(); int snSize = ( ( Array ) sn ).Length; ! int arraySize = ( ( Array ) array ).Length; int end; if( snSize > arraySize ) --- 309,315 ---- { IList deletes = new ArrayList(); ! Array sn = GetSnapshot() as Array; int snSize = ( ( Array ) sn ).Length; ! int arraySize = array.Length; int end; if( snSize > arraySize ) *************** *** 326,330 **** for( int i = 0; i < end; i++ ) { ! if( ( ( Array ) array ).GetValue( i ) == null && ( ( Array ) sn ).GetValue( i ) != null ) { deletes.Add( i ); --- 327,331 ---- for( int i = 0; i < end; i++ ) { ! if( array.GetValue( i ) == null && sn.GetValue( i ) != null ) { deletes.Add( i ); *************** *** 343,348 **** public override bool NeedsInserting( object entry, int i, IType elemType ) { ! object sn = GetSnapshot(); ! return ( ( Array ) array ).GetValue( i ) != null && ( i >= ( ( Array ) sn ).Length || ( ( Array ) sn ).GetValue( i ) == null ); } --- 344,349 ---- public override bool NeedsInserting( object entry, int i, IType elemType ) { ! Array sn = GetSnapshot() as Array; ! return array.GetValue( i ) != null && ( i >= sn.Length || sn.GetValue( i ) == null ); } *************** *** 356,364 **** public override bool NeedsUpdating( object entry, int i, IType elemType ) { ! object sn = GetSnapshot(); ! return i < ( ( Array ) sn ).Length && ! ( ( Array ) sn ).GetValue( i ) != null && ! ( ( Array ) array ).GetValue( i ) != null && ! elemType.IsDirty( ( ( Array ) array ).GetValue( i ), ( ( Array ) sn ).GetValue( i ), session ); } --- 357,365 ---- public override bool NeedsUpdating( object entry, int i, IType elemType ) { ! Array sn = GetSnapshot() as Array; ! return i < sn.Length && ! sn.GetValue( i ) != null && ! array.GetValue( i ) != null && ! elemType.IsDirty( array.GetValue( i ), sn.GetValue( i ), session ); } *************** *** 392,396 **** public override void CopyTo( Array array, int index ) { ! ( ( Array ) this.array ).CopyTo( array, index ); } --- 393,397 ---- public override void CopyTo( Array array, int index ) { ! this.array.CopyTo( array, index ); } *************** *** 400,404 **** public override int Count { ! get { return ( ( Array ) array ).Length; } } --- 401,405 ---- public override int Count { ! get { return array.Length; } } *************** *** 409,413 **** public override IEnumerator GetEnumerator() { ! return ( ( Array ) array ).GetEnumerator(); } --- 410,414 ---- public override IEnumerator GetEnumerator() { ! return array.GetEnumerator(); } Index: SortedSet.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/SortedSet.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** SortedSet.cs 7 Feb 2005 01:34:40 -0000 1.13 --- SortedSet.cs 14 Feb 2005 03:35:19 -0000 1.14 *************** *** 55,59 **** /// <param name="session"></param> /// <param name="comparer">The IComparer to user for Sorting.</param> ! public SortedSet( ISessionImplementor session, IComparer comparer ) : base( session ) { this.comparer = comparer; --- 55,59 ---- /// <param name="session"></param> /// <param name="comparer">The IComparer to user for Sorting.</param> ! internal SortedSet( ISessionImplementor session, IComparer comparer ) : base( session ) { this.comparer = comparer; *************** *** 66,70 **** /// <param name="map">The initial values.</param> /// <param name="comparer">The IComparer to use for Sorting.</param> ! public SortedSet( ISessionImplementor session, ISet map, IComparer comparer ) : base( session, new Iesi.Collections.SortedSet( map, comparer ) ) { --- 66,70 ---- /// <param name="map">The initial values.</param> /// <param name="comparer">The IComparer to use for Sorting.</param> ! internal SortedSet( ISessionImplementor session, ISet map, IComparer comparer ) : base( session, new Iesi.Collections.SortedSet( map, comparer ) ) { Index: SortedMap.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/SortedMap.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SortedMap.cs 7 Feb 2005 01:34:40 -0000 1.8 --- SortedMap.cs 14 Feb 2005 03:35:19 -0000 1.9 *************** *** 48,52 **** /// </summary> /// <param name="session">The ISession the Map should be a part of.</param> ! public SortedMap( ISessionImplementor session ) : base( session ) { --- 48,52 ---- /// </summary> /// <param name="session">The ISession the Map should be a part of.</param> ! internal SortedMap( ISessionImplementor session ) : base( session ) { *************** *** 58,62 **** /// <param name="session"></param> /// <param name="comparer">The IComparer to user for Sorting.</param> ! public SortedMap( ISessionImplementor session, IComparer comparer ) : base( session ) { --- 58,62 ---- /// <param name="session"></param> /// <param name="comparer">The IComparer to user for Sorting.</param> ! internal SortedMap( ISessionImplementor session, IComparer comparer ) : base( session ) { *************** *** 70,74 **** /// <param name="map">The IDictionary that contains the initial values.</param> /// <param name="comparer">The IComparer to use for Sorting.</param> ! public SortedMap( ISessionImplementor session, IDictionary map, IComparer comparer ) : base( session, new SortedList( map, comparer ) ) { --- 70,74 ---- /// <param name="map">The IDictionary that contains the initial values.</param> /// <param name="comparer">The IComparer to use for Sorting.</param> ! internal SortedMap( ISessionImplementor session, IDictionary map, IComparer comparer ) : base( session, new SortedList( map, comparer ) ) { Index: Set.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/Set.cs,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Set.cs 10 Feb 2005 17:47:59 -0000 1.24 --- Set.cs 14 Feb 2005 03:35:19 -0000 1.25 *************** *** 98,102 **** /// </summary> /// <param name="session"></param> ! public Set( ISessionImplementor session ) : base( session ) { } --- 98,102 ---- /// </summary> /// <param name="session"></param> ! internal Set( ISessionImplementor session ) : base( session ) { } *************** *** 110,114 **** /// Only call this constructor if you consider the map initialized. /// </remarks> ! public Set( ISessionImplementor session, ISet collection ) : base( session ) { internalSet = collection; --- 110,114 ---- /// Only call this constructor if you consider the map initialized. /// </remarks> ! internal Set( ISessionImplementor session, ISet collection ) : base( session ) { internalSet = collection; Index: IdentifierBag.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/IdentifierBag.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** IdentifierBag.cs 7 Feb 2005 01:34:40 -0000 1.8 --- IdentifierBag.cs 14 Feb 2005 03:35:19 -0000 1.9 *************** *** 35,39 **** /// </summary> /// <param name="session"></param> ! public IdentifierBag( ISessionImplementor session ) : base( session ) { } --- 35,39 ---- /// </summary> /// <param name="session"></param> ! internal IdentifierBag( ISessionImplementor session ) : base( session ) { } *************** *** 44,52 **** /// <param name="session"></param> /// <param name="coll"></param> ! public IdentifierBag( ISessionImplementor session, ICollection coll ) : base( session ) { ! if( coll is IList ) { ! values = ( IList ) coll; } else --- 44,54 ---- /// <param name="session"></param> /// <param name="coll"></param> ! internal IdentifierBag( ISessionImplementor session, ICollection coll ) : base( session ) { ! IList list = coll as IList; ! ! if( list!=null ) { ! values = list; } else |
From: Michael D. <mik...@us...> - 2005-02-14 03:33:01
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17241/NHibernate/Persister Modified Files: AbstractEntityPersister.cs Log Message: modified order of InstantiationException custom ctor Index: AbstractEntityPersister.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister/AbstractEntityPersister.cs,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** AbstractEntityPersister.cs 3 Jan 2005 03:45:27 -0000 1.31 --- AbstractEntityPersister.cs 14 Feb 2005 03:32:53 -0000 1.32 *************** *** 394,398 **** catch( Exception e ) { ! throw new InstantiationException( "Could not instantiate entity: ", mappedClass, e ); } } --- 394,398 ---- catch( Exception e ) { ! throw new InstantiationException( "Could not instantiate entity: ", e, mappedClass ); } } *************** *** 1044,1048 **** protected string GetSQLWhereString( string alias ) { ! return StringHelper.Replace( sqlWhereStringTemplate, Template.PlaceHolder, alias ); } --- 1044,1048 ---- protected string GetSQLWhereString( string alias ) { ! return StringHelper.Replace( sqlWhereStringTemplate, Template.Placeholder, alias ); } |
From: Michael D. <mik...@us...> - 2005-02-14 03:32:01
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16844/NHibernate/Impl Modified Files: WrapVisitor.cs Log Message: reducing number of casts per FxCop recommendation. Index: WrapVisitor.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/WrapVisitor.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WrapVisitor.cs 7 Feb 2005 01:34:41 -0000 1.2 --- WrapVisitor.cs 14 Feb 2005 03:31:51 -0000 1.3 *************** *** 14,18 **** private static readonly ILog log = LogManager.GetLogger( typeof( WrapVisitor ) ); ! private bool _substitute = false; public bool IsSubstitutionRequired --- 14,19 ---- private static readonly ILog log = LogManager.GetLogger( typeof( WrapVisitor ) ); ! // set to false by default by the framework ! private bool _substitute; public bool IsSubstitutionRequired *************** *** 27,33 **** protected override object ProcessCollection(object collection, PersistentCollectionType collectionType) { ! if( collection is PersistentCollection ) { - PersistentCollection coll = (PersistentCollection)collection; if( coll.SetCurrentSession( Session ) ) { --- 28,34 ---- protected override object ProcessCollection(object collection, PersistentCollectionType collectionType) { ! PersistentCollection coll = collection as PersistentCollection; ! if( coll!=null ) { if( coll.SetCurrentSession( Session ) ) { |
From: Michael D. <mik...@us...> - 2005-02-14 03:30:59
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Connection In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16443/NHibernate/Connection Modified Files: ConnectionProvider.cs Log Message: removed explicit initialization since the framework is already initializing the fields to those values. Index: ConnectionProvider.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Connection/ConnectionProvider.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ConnectionProvider.cs 30 Jan 2005 19:36:15 -0000 1.10 --- ConnectionProvider.cs 14 Feb 2005 03:30:51 -0000 1.11 *************** *** 14,19 **** { private static readonly ILog log = LogManager.GetLogger( typeof( ConnectionProvider ) ); ! private string connString = null; ! private IDriver driver = null; /// <summary> --- 14,19 ---- { private static readonly ILog log = LogManager.GetLogger( typeof( ConnectionProvider ) ); ! private string connString; ! private IDriver driver; /// <summary> |
From: Michael D. <mik...@us...> - 2005-02-14 03:30:01
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15991/NHibernate/Util Modified Files: StringTokenizer.cs Log Message: changed private static readonly to private const since don't need to worry about those getting compiled into other code. Index: StringTokenizer.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Util/StringTokenizer.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** StringTokenizer.cs 1 Jan 2005 02:40:28 -0000 1.4 --- StringTokenizer.cs 14 Feb 2005 03:29:37 -0000 1.5 *************** *** 9,13 **** public class StringTokenizer : IEnumerable { ! private static readonly string _defaultDelim = " \t\n\r\f"; private string _origin; private string _delim; --- 9,13 ---- public class StringTokenizer : IEnumerable { ! private const string _defaultDelim = " \t\n\r\f"; private string _origin; private string _delim; |
From: Michael D. <mik...@us...> - 2005-02-14 03:29:14
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15806/NHibernate/Cfg Modified Files: Binder.cs Configuration.cs Log Message: changed private static readonly to private const since don't need to worry about those getting compiled into other code. Index: Binder.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg/Binder.cs,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** Binder.cs 17 Jan 2005 03:40:54 -0000 1.37 --- Binder.cs 14 Feb 2005 03:29:05 -0000 1.38 *************** *** 19,23 **** private static XmlNamespaceManager nsmgr; ! private static readonly string nsPrefix = "hbm"; internal static Dialect.Dialect dialect; --- 19,23 ---- private static XmlNamespaceManager nsmgr; ! private const string nsPrefix = "hbm"; internal static Dialect.Dialect dialect; Index: Configuration.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg/Configuration.cs,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Configuration.cs 23 Jan 2005 15:41:02 -0000 1.28 --- Configuration.cs 14 Feb 2005 03:29:05 -0000 1.29 *************** *** 51,55 **** /// </summary> public static readonly string MappingSchemaXMLNS = "urn:nhibernate-mapping-2.0"; ! private static readonly string MappingSchemaResource = "NHibernate.nhibernate-mapping-2.0.xsd"; /// <summary> --- 51,55 ---- /// </summary> public static readonly string MappingSchemaXMLNS = "urn:nhibernate-mapping-2.0"; ! private const string MappingSchemaResource = "NHibernate.nhibernate-mapping-2.0.xsd"; /// <summary> *************** *** 57,62 **** /// </summary> public static readonly string CfgSchemaXMLNS = "urn:nhibernate-configuration-2.0"; ! private static readonly string CfgSchemaResource = "NHibernate.nhibernate-configuration-2.0.xsd"; ! private static readonly string CfgNamespacePrefix = "cfg"; private static XmlNamespaceManager CfgNamespaceMgr; --- 57,62 ---- /// </summary> public static readonly string CfgSchemaXMLNS = "urn:nhibernate-configuration-2.0"; ! private const string CfgSchemaResource = "NHibernate.nhibernate-configuration-2.0.xsd"; ! private const string CfgNamespacePrefix = "cfg"; private static XmlNamespaceManager CfgNamespaceMgr; |
From: Michael D. <mik...@us...> - 2005-02-14 03:27:47
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15231/NHibernate/Hql Modified Files: QueryTranslator.cs Log Message: replaced a "throw me" with "throw" to avoid loosing call stack. Index: QueryTranslator.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/QueryTranslator.cs,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** QueryTranslator.cs 17 Jan 2005 03:40:57 -0000 1.53 --- QueryTranslator.cs 14 Feb 2005 03:27:39 -0000 1.54 *************** *** 158,164 **** throw; } ! catch( MappingException me ) { ! throw me; } catch( Exception e ) --- 158,164 ---- throw; } ! catch( MappingException ) { ! throw; } catch( Exception e ) |
From: Michael D. <mik...@us...> - 2005-02-14 03:26:30
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14723/NHibernate/SqlCommand Modified Files: SelectFragment.cs SqlStringBuilder.cs Template.cs Log Message: renamed PlaceHolder to Placeholder attempted to reduce duplicate casting in AddObject per FxCop suggestion. Index: SelectFragment.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/SelectFragment.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SelectFragment.cs 31 Dec 2004 22:25:33 -0000 1.7 --- SelectFragment.cs 14 Feb 2005 03:26:10 -0000 1.8 *************** *** 152,156 **** AddColumn( null, ! StringHelper.Replace( formula, Template.PlaceHolder, tableAlias ), formulaAlias ); --- 152,156 ---- AddColumn( null, ! StringHelper.Replace( formula, Template.Placeholder, tableAlias ), formulaAlias ); Index: SqlStringBuilder.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/SqlStringBuilder.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SqlStringBuilder.cs 31 Dec 2004 22:25:44 -0000 1.6 --- SqlStringBuilder.cs 14 Feb 2005 03:26:10 -0000 1.7 *************** *** 95,114 **** public SqlStringBuilder AddObject( object part ) { ! if( part is Parameter ) ! { ! return this.Add( ( Parameter ) part ); ! } ! else if( part is String ) { ! return this.Add( ( String ) part ); } ! else if( part is SqlString ) { ! return this.Add( ( SqlString ) part, null, null, null ); } ! else { ! throw new ArgumentException( "Part was not a Parameter, String, or SqlString." ); } } --- 95,119 ---- public SqlStringBuilder AddObject( object part ) { ! Parameter paramPart = part as Parameter; ! if( paramPart!=null ) { ! return this.Add( paramPart ); // EARLY EXIT } ! ! string stringPart = part as String; ! if( stringPart!=null ) { ! return this.Add( stringPart ); } ! ! SqlString sqlPart = part as SqlString; ! if( sqlPart!=null ) { ! return this.Add( sqlPart, null, null, null ); } + + // remarks - we should not get to here - this is a problem with the + // SQL being generated. + throw new ArgumentException( "Part was not a Parameter, String, or SqlString." ); } Index: Template.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/Template.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Template.cs 23 Jan 2005 15:48:00 -0000 1.12 --- Template.cs 14 Feb 2005 03:26:10 -0000 1.13 *************** *** 13,17 **** { /// <summary></summary> ! public const string PlaceHolder = "$PlaceHolder"; private static ISet Keywords = new HashedSet(); --- 13,17 ---- { /// <summary></summary> ! public const string Placeholder = "$PlaceHolder"; private static ISet Keywords = new HashedSet(); *************** *** 146,150 **** else if( isIdentifier && ( nextToken == null || !nextToken.Equals( "(" ) ) ) // not a function call { ! result.Append( PlaceHolder ) .Append( StringHelper.Dot ) .Append( Quote( token, dialect ) ); --- 146,150 ---- else if( isIdentifier && ( nextToken == null || !nextToken.Equals( "(" ) ) ) // not a function call { ! result.Append( Placeholder ) .Append( StringHelper.Dot ) .Append( Quote( token, dialect ) ); *************** *** 192,196 **** commaNeeded = true; ! result.Append( PlaceHolder ) .Append( StringHelper.Dot ) .Append( column ); --- 192,196 ---- commaNeeded = true; ! result.Append( Placeholder ) .Append( StringHelper.Dot ) .Append( column ); |
From: Michael D. <mik...@us...> - 2005-02-14 03:24:54
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Id In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14069/NHibernate/Id Modified Files: UUIDHexGenerator.cs Log Message: removed explicit initialization since the framework is already initializing the fields to those values. Index: UUIDHexGenerator.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Id/UUIDHexGenerator.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** UUIDHexGenerator.cs 15 Jan 2005 21:16:13 -0000 1.3 --- UUIDHexGenerator.cs 14 Feb 2005 03:24:43 -0000 1.4 *************** *** 55,59 **** private string format = FormatWithDigitsOnly; ! private string sep = null; //"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" --- 55,59 ---- private string format = FormatWithDigitsOnly; ! private string sep; //"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" |
From: Michael D. <mik...@us...> - 2005-02-14 03:24:54
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14069/NHibernate/Impl Modified Files: CollectionEntry.cs Log Message: removed explicit initialization since the framework is already initializing the fields to those values. Index: CollectionEntry.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/CollectionEntry.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CollectionEntry.cs 6 Feb 2005 01:59:02 -0000 1.5 --- CollectionEntry.cs 14 Feb 2005 03:24:44 -0000 1.6 *************** *** 151,157 **** public CollectionEntry( CollectionPersister loadedPersister, object loadedID, bool ignore ) { ! // dirty is initialized to false by runtime //this.dirty = false; ! this.initialized = false; this.loadedKey = loadedID; SetLoadedPersister( loadedPersister ); --- 151,157 ---- public CollectionEntry( CollectionPersister loadedPersister, object loadedID, bool ignore ) { ! // dirty & initialized are set to false by the runtime //this.dirty = false; ! //this.initialized = false; this.loadedKey = loadedID; SetLoadedPersister( loadedPersister ); |
From: Michael D. <mik...@us...> - 2005-02-14 03:24:54
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Engine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14069/NHibernate/Engine Modified Files: RowSelection.cs Log Message: removed explicit initialization since the framework is already initializing the fields to those values. Index: RowSelection.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Engine/RowSelection.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RowSelection.cs 31 Dec 2004 17:36:41 -0000 1.4 --- RowSelection.cs 14 Feb 2005 03:24:43 -0000 1.5 *************** *** 12,16 **** public static readonly int NoValue = -1; ! private int firstRow = 0; private int maxRows = RowSelection.NoValue; private int timeout = RowSelection.NoValue; --- 12,17 ---- public static readonly int NoValue = -1; ! // framework defaults value to 0 ! private int firstRow; private int maxRows = RowSelection.NoValue; private int timeout = RowSelection.NoValue; |
From: Michael D. <mik...@us...> - 2005-02-14 03:22:37
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Engine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13269/NHibernate/Engine Modified Files: Cascades.cs Log Message: Added a default private ctor to prevent .net from adding a default public one. Index: Cascades.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Engine/Cascades.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Cascades.cs 11 Feb 2005 22:02:07 -0000 1.14 --- Cascades.cs 14 Feb 2005 03:22:27 -0000 1.15 *************** *** 46,53 **** /// Summary description for Cascades. /// </summary> ! public class Cascades { private static readonly ILog log = LogManager.GetLogger( typeof( Cascades ) ); /// <summary> /// A session action that may be cascaded from parent entity to its children --- 46,58 ---- /// Summary description for Cascades. /// </summary> ! public sealed class Cascades { private static readonly ILog log = LogManager.GetLogger( typeof( Cascades ) ); + private Cascades() + { + // should not be initialized + } + /// <summary> /// A session action that may be cascaded from parent entity to its children |
From: Michael D. <mik...@us...> - 2005-02-14 03:19:33
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Type In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12078/NHibernate/Type Modified Files: TypeFactory.cs Log Message: sealed classes. Index: TypeFactory.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/TypeFactory.cs,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** TypeFactory.cs 17 Jan 2005 03:40:58 -0000 1.42 --- TypeFactory.cs 14 Feb 2005 03:19:25 -0000 1.43 *************** *** 18,22 **** /// a reference to the IType. /// </remarks> ! public class TypeFactory { private enum TypeClassification --- 18,22 ---- /// a reference to the IType. /// </remarks> ! public sealed class TypeFactory { private enum TypeClassification |
From: Michael D. <mik...@us...> - 2005-02-14 03:19:33
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12078/NHibernate/Hql Modified Files: ParserHelper.cs Log Message: sealed classes. Index: ParserHelper.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/ParserHelper.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ParserHelper.cs 31 Dec 2004 18:22:33 -0000 1.7 --- ParserHelper.cs 14 Feb 2005 03:19:25 -0000 1.8 *************** *** 4,8 **** { /// <summary></summary> ! public class ParserHelper { /// <summary></summary> --- 4,8 ---- { /// <summary></summary> ! public sealed class ParserHelper { /// <summary></summary> |
From: Michael D. <mik...@us...> - 2005-02-14 03:19:33
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Cache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12078/NHibernate/Cache Modified Files: CacheFactory.cs Log Message: sealed classes. Index: CacheFactory.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Cache/CacheFactory.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CacheFactory.cs 31 Dec 2004 15:24:29 -0000 1.4 --- CacheFactory.cs 14 Feb 2005 03:19:24 -0000 1.5 *************** *** 7,11 **** /// Factory class for creating an <see cref="ICacheConcurrencyStrategy"/>. /// </summary> ! public class CacheFactory { private static readonly ILog log = LogManager.GetLogger( typeof( CacheFactory ) ); --- 7,11 ---- /// Factory class for creating an <see cref="ICacheConcurrencyStrategy"/>. /// </summary> ! public sealed class CacheFactory { private static readonly ILog log = LogManager.GetLogger( typeof( CacheFactory ) ); |
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11213/NHibernate Modified Files: CallbackException.cs HibernateException.cs InstantiationException.cs LazyInitializationException.cs MappingException.cs ObjectDeletedException.cs ObjectNotFoundException.cs PersistentObjectException.cs PropertyAccessException.cs PropertyNotFoundException.cs QueryException.cs StaleObjectStateException.cs TransactionException.cs TransientObjectException.cs ValidationFailure.cs WrongClassException.cs Log Message: Followed FxCops rules on creating custom exceptions and supporting serialization. However, they still inherit from ApplicationException. Index: ObjectDeletedException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ObjectDeletedException.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ObjectDeletedException.cs 1 Jan 2005 03:34:16 -0000 1.5 --- ObjectDeletedException.cs 14 Feb 2005 03:17:06 -0000 1.6 *************** *** 8,75 **** /// </summary> [Serializable] ! public class ObjectDeletedException : HibernateException { private object identifier; /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="identifier"></param> ! public ObjectDeletedException( string message, object identifier ) : base( message ) { - this.identifier = identifier; } ! /// <summary></summary> ! public object Identifier { - get { return identifier; } } ! /// <summary></summary> ! public override string Message { ! get { return base.Message + ": " + identifier; } } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="root"></param> ! public ObjectDeletedException( string message, Exception root ) : this( message, root.Message ) { } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! public ObjectDeletedException( string message ) : this( message, message ) { } /// <summary> ! /// /// </summary> ! /// <param name="root"></param> ! public ObjectDeletedException( Exception root ) : this( root.Message, root.Message ) { } ! /// <summary></summary> ! public ObjectDeletedException() : this( string.Empty, string.Empty ) ! { ! } /// <summary> ! /// /// </summary> ! /// <param name="info"></param> ! /// <param name="context"></param> protected ObjectDeletedException( SerializationInfo info, StreamingContext context ) : base( info, context ) { } } } \ No newline at end of file --- 8,110 ---- /// </summary> [Serializable] ! public class ObjectDeletedException : HibernateException, ISerializable { private object identifier; /// <summary> ! /// Initializes a new instance of the <see cref="ObjectDeletedException"/> class. /// </summary> ! public ObjectDeletedException() : this( "User tried to pass a deleted object to the ISession." ) { } ! /// <summary> ! /// Initializes a new instance of the <see cref="ObjectDeletedException"/> class. ! /// </summary> ! /// <param name="message"></param> ! public ObjectDeletedException( string message ) : this( message, "n/a" ) { } ! /// <summary> ! /// Initializes a new instance of the <see cref="ObjectDeletedException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="identifier">The identifier of the object that was attempting to be deleted.</param> ! public ObjectDeletedException( string message, object identifier ) : base( message ) { ! this.identifier = identifier; } /// <summary> ! /// Initializes a new instance of the <see cref="ObjectDeletedException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public ObjectDeletedException( string message, Exception innerException ) : base( message, innerException ) { } /// <summary> ! /// Gets the identifier of the object that was attempting to be deleted. /// </summary> ! public object Identifier { + get { return identifier; } } /// <summary> ! /// Gets a message that describes the current <see cref="WrongClassException"/>. /// </summary> ! /// <value> ! /// The error message that explains the reason for this exception and the identifier ! /// of the object. ! /// </value> ! public override string Message { + get { return base.Message + ": " + identifier; } } ! #region ISerializable Members /// <summary> ! /// Initializes a new instance of the <see cref="ObjectDeletedException"/> class ! /// with serialized data. /// </summary> ! /// <param name="info"> ! /// The <see cref="SerializationInfo"/> that holds the serialized object ! /// data about the exception being thrown. ! /// </param> ! /// <param name="context"> ! /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. ! /// </param> protected ObjectDeletedException( SerializationInfo info, StreamingContext context ) : base( info, context ) { + identifier = info.GetValue( "identifer", typeof(object) ); } + + + /// <summary> + /// Sets the serialization info for <see cref="ObjectDeletedException"/> after + /// getting the info from the base Exception. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + base.GetObjectData( info, context ); + info.AddValue( "identifier", identifier ); + } + + #endregion } } \ No newline at end of file Index: CallbackException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/CallbackException.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CallbackException.cs 1 Jan 2005 03:31:31 -0000 1.5 --- CallbackException.cs 14 Feb 2005 03:17:05 -0000 1.6 *************** *** 8,12 **** public class CallbackException : HibernateException { ! /// <summary></summary> public CallbackException() : this( "An exception occured in a callback" ) { --- 8,14 ---- public class CallbackException : HibernateException { ! /// <summary> ! /// Initializes a new instance of the <see cref="CallbackException"/> class. ! /// </summary> public CallbackException() : this( "An exception occured in a callback" ) { *************** *** 14,28 **** /// <summary> ! /// /// </summary> ! /// <param name="root"></param> ! public CallbackException( Exception root ) : this( "An exception occured in a callback", root ) { } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> public CallbackException( string message ) : base( message ) { --- 16,34 ---- /// <summary> ! /// Initializes a new instance of the <see cref="CallbackException"/> class. /// </summary> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public CallbackException( Exception innerException ) : base( "An exception occured in a callback", innerException ) { } /// <summary> ! /// Initializes a new instance of the <see cref="CallbackException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> public CallbackException( string message ) : base( message ) { *************** *** 30,46 **** /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="e"></param> ! public CallbackException( string message, Exception e ) : base( message, e ) { } /// <summary> ! /// /// </summary> ! /// <param name="info"></param> ! /// <param name="context"></param> protected CallbackException( SerializationInfo info, StreamingContext context ) : base( info, context ) { --- 36,62 ---- /// <summary> ! /// Initializes a new instance of the <see cref="CallbackException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public CallbackException( string message, Exception innerException ) : base( message, innerException ) { } /// <summary> ! /// Initializes a new instance of the <see cref="CallbackException"/> class ! /// with serialized data. /// </summary> ! /// <param name="info"> ! /// The <see cref="SerializationInfo"/> that holds the serialized object ! /// data about the exception being thrown. ! /// </param> ! /// <param name="context"> ! /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. ! /// </param> protected CallbackException( SerializationInfo info, StreamingContext context ) : base( info, context ) { Index: PropertyAccessException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/PropertyAccessException.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PropertyAccessException.cs 1 Jan 2005 03:34:16 -0000 1.4 --- PropertyAccessException.cs 14 Feb 2005 03:17:06 -0000 1.5 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 7,11 **** /// </summary> [Serializable] ! public class PropertyAccessException : HibernateException { private System.Type persistentType; --- 8,12 ---- /// </summary> [Serializable] ! public class PropertyAccessException : HibernateException, ISerializable { private System.Type persistentType; *************** *** 14,25 **** /// <summary> ! /// /// </summary> ! /// <param name="root"></param> ! /// <param name="message"></param> ! /// <param name="wasSetter"></param> ! /// <param name="persistentType"></param> ! /// <param name="propertyName"></param> ! public PropertyAccessException( Exception root, string message, bool wasSetter, System.Type persistentType, string propertyName ) : base( message, root ) { this.persistentType = persistentType; --- 15,60 ---- /// <summary> ! /// Initializes a new instance of the <see cref="PropertyAccessException"/> class. /// </summary> ! public PropertyAccessException( ) : base( "A problem occurred accessing a mapped property of an instance of a persistent class by reflection." ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="PropertyAccessException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! public PropertyAccessException( string message ) : base( message ) ! { ! ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="PropertyAccessException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public PropertyAccessException( string message, Exception innerException ) : base( message, innerException ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="PropertyAccessException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! /// <param name="wasSetter">A <see cref="Boolean"/> indicating if this was a "setter" operation.</param> ! /// <param name="persistentType">The <see cref="System.Type"/> that NHibernate was trying find the Property or Field in.</param> ! /// <param name="propertyName">The mapped property name that was trying to be accessed.</param> ! public PropertyAccessException( Exception innerException, string message, bool wasSetter, System.Type persistentType, string propertyName ) ! : base( message, innerException ) { this.persistentType = persistentType; *************** *** 28,32 **** } ! /// <summary></summary> public System.Type PersistentType { --- 63,69 ---- } ! /// <summary> ! /// Gets the <see cref="System.Type"/> that NHibernate was trying find the Property or Field in. ! /// </summary> public System.Type PersistentType { *************** *** 34,38 **** } ! /// <summary></summary> public override string Message { --- 71,81 ---- } ! /// <summary> ! /// Gets a message that describes the current <see cref="PropertyAccessException"/>. ! /// </summary> ! /// <value> ! /// The error message that explains the reason for this exception and ! /// information about the mapped property and its usage. ! /// </value> public override string Message { *************** *** 46,49 **** --- 89,133 ---- } } + + #region ISerializable Members + + /// <summary> + /// Initializes a new instance of the <see cref="PropertyAccessException"/> class + /// with serialized data. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + protected PropertyAccessException( SerializationInfo info, StreamingContext context ) : base( info, context ) + { + persistentType = (System.Type)info.GetValue( "persistentType", typeof(System.Type) ); + propertyName = info.GetString( "propertyName" ); + wasSetter = info.GetBoolean( "wasSetter" ); + } + + /// <summary> + /// Sets the serialization info for <see cref="PropertyAccessException"/> after + /// getting the info from the base Exception. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + base.GetObjectData( info, context ); + info.AddValue( "persistentType", persistentType, typeof(System.Type) ); + info.AddValue( "propertyName", propertyName ); + info.AddValue( "wasSetter", wasSetter ); + } + + #endregion } } \ No newline at end of file Index: PersistentObjectException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/PersistentObjectException.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PersistentObjectException.cs 1 Jan 2005 03:34:16 -0000 1.4 --- PersistentObjectException.cs 14 Feb 2005 03:17:06 -0000 1.5 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 11,20 **** { /// <summary> ! /// /// </summary> ! /// <param name="message"></param> public PersistentObjectException( string message ) : base( message ) { } } } \ No newline at end of file --- 12,58 ---- { /// <summary> ! /// Initializes a new instance of the <see cref="PersistentObjectException"/> class. /// </summary> ! public PersistentObjectException() : this( "User passed a persistent instance to an ISession method that expected a transient instance." ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="PersistentObjectException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> public PersistentObjectException( string message ) : base( message ) { } + + /// <summary> + /// Initializes a new instance of the <see cref="PersistentObjectException"/> class. + /// </summary> + /// <param name="message">The message that describes the error. </param> + /// <param name="innerException"> + /// The exception that is the cause of the current exception. If the innerException parameter + /// is not a null reference, the current exception is raised in a catch block that handles + /// the inner exception. + /// </param> + public PersistentObjectException( string message, Exception innerException ) : base( message, innerException ) + { + } + + /// <summary> + /// Initializes a new instance of the <see cref="PersistentObjectException"/> class + /// with serialized data. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + protected PersistentObjectException( SerializationInfo info, StreamingContext context ) : base( info, context ) + { + } + + } } \ No newline at end of file Index: StaleObjectStateException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/StaleObjectStateException.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StaleObjectStateException.cs 1 Jan 2005 03:35:39 -0000 1.3 --- StaleObjectStateException.cs 14 Feb 2005 03:17:06 -0000 1.4 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; using log4net; *************** *** 10,25 **** /// </summary> [Serializable] ! public class StaleObjectStateException : HibernateException { - private static readonly ILog log = LogManager.GetLogger( typeof( StaleObjectStateException ) ); private System.Type persistentType; private object identifier; /// <summary> ! /// /// </summary> ! /// <param name="persistentType"></param> ! /// <param name="identifier"></param> ! public StaleObjectStateException( System.Type persistentType, object identifier ) : base( "Row was updated or deleted by another transaction" ) { this.persistentType = persistentType; --- 11,54 ---- /// </summary> [Serializable] ! public class StaleObjectStateException : HibernateException, ISerializable { private System.Type persistentType; private object identifier; /// <summary> ! /// Initializes a new instance of the <see cref="StaleObjectStateException"/> class. /// </summary> ! public StaleObjectStateException() : base( "A version number check failed. The ISession contained stale data." ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="StaleObjectStateException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! public StaleObjectStateException( string message ) : base( message ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="StaleObjectStateException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public StaleObjectStateException( string message, Exception innerException ) : base( message, innerException ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="StaleObjectStateException"/> class. ! /// </summary> ! /// <param name="persistentType">The <see cref="System.Type"/> that NHibernate was trying to update in the database.</param> ! /// <param name="identifier">The identifier of the object that is stale.</param> ! public StaleObjectStateException( System.Type persistentType, object identifier ) ! : base( "Row was updated or deleted by another transaction" ) { this.persistentType = persistentType; *************** *** 28,32 **** } ! /// <summary></summary> public System.Type PersistentType { --- 57,63 ---- } ! /// <summary> ! /// Gets the <see cref="System.Type"/> that NHibernate was trying to update in the database. ! /// </summary> public System.Type PersistentType { *************** *** 34,38 **** } ! /// <summary></summary> public object Identifier { --- 65,71 ---- } ! /// <summary> ! /// Gets the identifier of the object that is stale. ! /// </summary> public object Identifier { *************** *** 40,48 **** } ! /// <summary></summary> public override string Message { get { return base.Message + " for " + persistentType.FullName + " instance with identifier: " + identifier; } } } } \ No newline at end of file --- 73,123 ---- } ! /// <summary> ! /// Gets a message that describes the current <see cref="StaleObjectStateException"/>. ! /// </summary> ! /// <value>The error message that explains the reason for this exception.</value> public override string Message { get { return base.Message + " for " + persistentType.FullName + " instance with identifier: " + identifier; } } + + #region ISerializable Members + + /// <summary> + /// Initializes a new instance of the <see cref="StaleObjectStateException"/> class + /// with serialized data. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + protected StaleObjectStateException( SerializationInfo info, StreamingContext context ) : base( info, context ) + { + persistentType = (System.Type)info.GetValue( "persistentType", typeof(System.Type) ); + identifier = info.GetValue( "identifier", typeof(object) ); + } + + /// <summary> + /// Sets the serialization info for <see cref="StaleObjectStateException"/> after + /// getting the info from the base Exception. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + base.GetObjectData( info, context ); + info.AddValue( "persistentType", persistentType, typeof(System.Type) ); + info.AddValue( "identifier", identifier, typeof(object) ); + } + + #endregion } } \ No newline at end of file Index: TransactionException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/TransactionException.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TransactionException.cs 1 Jan 2005 03:35:39 -0000 1.4 --- TransactionException.cs 14 Feb 2005 03:17:06 -0000 1.5 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 9,28 **** public class TransactionException : HibernateException { /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="root"></param> ! public TransactionException( string message, Exception root ) : base( message, root ) { } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> public TransactionException( string message ) : base( message ) { } } } \ No newline at end of file --- 10,56 ---- public class TransactionException : HibernateException { + /// <summary> ! /// Initializes a new instance of the <see cref="TransactionException"/> class. /// </summary> ! public TransactionException() : base( "A Transaction could not be begun, committed, or rolled back.") { } /// <summary> ! /// Initializes a new instance of the <see cref="TransactionException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> public TransactionException( string message ) : base( message ) { } + + /// <summary> + /// Initializes a new instance of the <see cref="TransactionException"/> class. + /// </summary> + /// <param name="message">The message that describes the error. </param> + /// <param name="innerException"> + /// The exception that is the cause of the current exception. If the innerException parameter + /// is not a null reference, the current exception is raised in a catch block that handles + /// the inner exception. + /// </param> + public TransactionException( string message, Exception innerException ) : base( message, innerException ) + { + } + + /// <summary> + /// Initializes a new instance of the <see cref="TransactionException"/> class + /// with serialized data. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + protected TransactionException( SerializationInfo info, StreamingContext context ) : base( info, context ) + { + } } } \ No newline at end of file Index: ObjectNotFoundException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ObjectNotFoundException.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ObjectNotFoundException.cs 1 Jan 2005 03:34:16 -0000 1.5 --- ObjectNotFoundException.cs 14 Feb 2005 03:17:06 -0000 1.6 *************** *** 5,12 **** { /// <summary> ! /// Thrown when the user tries to pass a deleted object to the <c>ISession</c>. /// </summary> [Serializable] ! public class ObjectNotFoundException : HibernateException { private object identifier; --- 5,17 ---- { /// <summary> ! /// Thrown when <c>ISession.Load()</c> fails to select a row with ! /// the given primary key (identifier value). This exception might not ! /// be thrown when <c>Load()</c> is called, even if there was no ! /// row on the database, because <c>Load()</c> returns a proxy if ! /// possible. Applications should use <c>ISession.Get()</c> to test if ! /// a row exists in the database. /// </summary> [Serializable] ! public class ObjectNotFoundException : HibernateException, ISerializable { private object identifier; *************** *** 14,79 **** /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="identifier"></param> ! /// <param name="type"></param> ! public ObjectNotFoundException( string message, object identifier, System.Type type ) : base( message ) { - this.identifier = identifier; - this.type = type; } ! /// <summary></summary> ! public object Identifier { - get { return identifier; } } ! /// <summary></summary> ! public override string Message { - get { return base.Message + ": " + identifier + ", of class: " + type.FullName; } } ! /// <summary></summary> ! public System.Type Type { ! get { return type; } } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="root"></param> ! public ObjectNotFoundException( string message, Exception root ) : this( message, root.Message, typeof( ObjectNotFoundException ) ) { } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! public ObjectNotFoundException( string message ) : this( message, message, typeof( ObjectNotFoundException ) ) { } /// <summary> ! /// /// </summary> ! /// <param name="root"></param> ! public ObjectNotFoundException( Exception root ) : this( root.Message, root.Message, typeof( ObjectNotFoundException ) ) { } /// <summary> ! /// /// </summary> ! /// <param name="info"></param> ! /// <param name="context"></param> protected ObjectNotFoundException( SerializationInfo info, StreamingContext context ) : base( info, context ) { } } } \ No newline at end of file --- 19,127 ---- /// <summary> ! /// Initializes a new instance of the <see cref="ObjectNotFoundException"/> class. /// </summary> ! public ObjectNotFoundException( ) : base( "No object could be found with the supplied identifier." ) { } ! /// <summary> ! /// Initializes a new instance of the <see cref="ObjectNotFoundException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! public ObjectNotFoundException( string message ) : base( message ) { } ! /// <summary> ! /// Initializes a new instance of the <see cref="ObjectNotFoundException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public ObjectNotFoundException( string message, Exception innerException ) : base( message, innerException ) { } ! /// <summary> ! /// Initializes a new instance of the <see cref="ObjectNotFoundException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="identifier">The identifier of the object that was attempting to be loaded.</param> ! /// <param name="type">The <see cref="System.Type"/> that NHibernate was trying to find a row for in the database.</param> ! public ObjectNotFoundException( string message, object identifier, System.Type type ) : base( message ) { ! this.identifier = identifier; ! this.type = type; } /// <summary> ! /// Gets the identifier of the object that was attempting to be loaded. /// </summary> ! public object Identifier { + get { return identifier; } } /// <summary> ! /// Gets a message that describes the current <see cref="ObjectNotFoundException"/>. /// </summary> ! /// <value> ! /// The error message that explains the reason for this exception and details of ! /// the object that was attempting to be loaded. ! /// </value> ! public override string Message { + get { return base.Message + ": " + identifier + ", of class: " + type.FullName; } } /// <summary> ! /// Gets the <see cref="System.Type"/> that NHibernate was trying to find a row for in the database. /// </summary> ! public System.Type Type { + get { return type; } } + #region ISerializable Members + /// <summary> ! /// Initializes a new instance of the <see cref="ObjectNotFoundException"/> class ! /// with serialized data. /// </summary> ! /// <param name="info"> ! /// The <see cref="SerializationInfo"/> that holds the serialized object ! /// data about the exception being thrown. ! /// </param> ! /// <param name="context"> ! /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. ! /// </param> protected ObjectNotFoundException( SerializationInfo info, StreamingContext context ) : base( info, context ) { + type = (System.Type)info.GetValue( "type", typeof(System.Type) ); + identifier = info.GetValue( "identifier", typeof(object) ) ; } + + /// <summary> + /// Sets the serialization info for <see cref="ObjectNotFoundException"/> after + /// getting the info from the base Exception. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + base.GetObjectData( info, context ); + info.AddValue( "type", type, typeof(System.Type) ); + info.AddValue( "identifier", identifier, typeof(object) ); + } + + #endregion } } \ No newline at end of file Index: MappingException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/MappingException.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MappingException.cs 1 Jan 2005 03:34:01 -0000 1.6 --- MappingException.cs 14 Feb 2005 03:17:06 -0000 1.7 *************** *** 12,49 **** { /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="root"></param> ! public MappingException( string message, Exception root ) : base( message, root ) { } /// <summary> ! /// /// </summary> ! /// <param name="root"></param> ! public MappingException( Exception root ) : base( root ) { } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! public MappingException( string message ) : base( message ) { } ! /// <summary></summary> ! public MappingException() : base() { } /// <summary> ! /// /// </summary> ! /// <param name="info"></param> ! /// <param name="context"></param> protected MappingException( SerializationInfo info, StreamingContext context ) : base( info, context ) { --- 12,65 ---- { /// <summary> ! /// Initializes a new instance of the <see cref="MappingException"/> class. /// </summary> ! public MappingException() : base() { } /// <summary> ! /// Initializes a new instance of the <see cref="MappingException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> ! public MappingException( string message ) : base( message ) { } /// <summary> ! /// Initializes a new instance of the <see cref="MappingException"/> class. /// </summary> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public MappingException( Exception innerException ) : base( innerException ) { } ! /// <summary> ! /// Initializes a new instance of the <see cref="MappingException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public MappingException( string message, Exception innerException ) : base( message, innerException ) { } /// <summary> ! /// Initializes a new instance of the <see cref="MappingException"/> class ! /// with serialized data. /// </summary> ! /// <param name="info"> ! /// The <see cref="SerializationInfo"/> that holds the serialized object ! /// data about the exception being thrown. ! /// </param> ! /// <param name="context"> ! /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. ! /// </param> protected MappingException( SerializationInfo info, StreamingContext context ) : base( info, context ) { Index: ValidationFailure.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ValidationFailure.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ValidationFailure.cs 1 Jan 2005 03:35:39 -0000 1.4 --- ValidationFailure.cs 14 Feb 2005 03:17:06 -0000 1.5 *************** *** 12,49 **** { /// <summary> ! /// /// </summary> ! /// <param name="msg"></param> ! public ValidationFailure( string msg ) : base( msg ) { } /// <summary> ! /// /// </summary> ! /// <param name="msg"></param> ! /// <param name="e"></param> ! public ValidationFailure( string msg, Exception e ) : base( msg, e ) { } /// <summary> ! /// /// </summary> ! /// <param name="e"></param> ! public ValidationFailure( Exception e ) : base( "A validation failure occured", e ) { } ! /// <summary></summary> ! public ValidationFailure() : base( "A validation failure occured" ) { } /// <summary> ! /// /// </summary> ! /// <param name="info"></param> ! /// <param name="context"></param> protected ValidationFailure( SerializationInfo info, StreamingContext context ) : base( info, context ) { --- 12,65 ---- { /// <summary> ! /// Initializes a new instance of the <see cref="ValidationFailure"/> class. /// </summary> ! public ValidationFailure() : base( "A validation failure occured" ) { } /// <summary> ! /// Initializes a new instance of the <see cref="ValidationFailure"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> ! public ValidationFailure( string message ) : base( message ) { } /// <summary> ! /// Initializes a new instance of the <see cref="ValidationFailure"/> class. /// </summary> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public ValidationFailure( Exception innerException ) : base( "A validation failure occured", innerException ) { } ! /// <summary> ! /// Initializes a new instance of the <see cref="ValidationFailure"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public ValidationFailure( string message, Exception innerException ) : base( message, innerException ) { } /// <summary> ! /// Initializes a new instance of the <see cref="ValidationFailure"/> class ! /// with serialized data. /// </summary> ! /// <param name="info"> ! /// The <see cref="SerializationInfo"/> that holds the serialized object ! /// data about the exception being thrown. ! /// </param> ! /// <param name="context"> ! /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. ! /// </param> protected ValidationFailure( SerializationInfo info, StreamingContext context ) : base( info, context ) { Index: HibernateException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/HibernateException.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** HibernateException.cs 31 Dec 2004 15:24:05 -0000 1.8 --- HibernateException.cs 14 Feb 2005 03:17:05 -0000 1.9 *************** *** 7,51 **** /// Any exception that occurs in the O-R persistence layer. /// </summary> ! /// <remarks>Exceptions that occur in the database layer are left as native exceptions</remarks> [Serializable] public class HibernateException : ApplicationException { /// <summary> ! /// /// </summary> ! public HibernateException() : base( String.Empty ) { } /// <summary> ! /// /// </summary> ! /// <param name="e"></param> ! public HibernateException( Exception e ) : base( e.Message, e ) { } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="e"></param> ! public HibernateException( string message, Exception e ) : base( message, e ) { } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! public HibernateException( string message ) : base( message ) { } /// <summary> ! /// /// </summary> ! /// <param name="info"></param> ! /// <param name="context"></param> protected HibernateException( SerializationInfo info, StreamingContext context ) : base( info, context ) { --- 7,67 ---- /// Any exception that occurs in the O-R persistence layer. /// </summary> ! /// <remarks> ! /// Exceptions that occur in the database layer are left as native exceptions. ! /// </remarks> [Serializable] public class HibernateException : ApplicationException { /// <summary> ! /// Initializes a new instance of the <see cref="HibernateException"/> class. /// </summary> ! public HibernateException() : base( "An exception occurred in the persistence layer." ) { } /// <summary> ! /// Initializes a new instance of the <see cref="HibernateException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> ! public HibernateException( string message ) : base( message ) { } /// <summary> ! /// Initializes a new instance of the <see cref="HibernateException"/> class. /// </summary> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public HibernateException( Exception innerException ) : base( innerException.Message, innerException ) { } /// <summary> ! /// Initializes a new instance of the <see cref="HibernateException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public HibernateException( string message, Exception innerException ) : base( message, innerException ) { } /// <summary> ! /// Initializes a new instance of the <see cref="HibernateException"/> class ! /// with serialized data. /// </summary> ! /// <param name="info"> ! /// The <see cref="SerializationInfo"/> that holds the serialized object ! /// data about the exception being thrown. ! /// </param> ! /// <param name="context"> ! /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. ! /// </param> protected HibernateException( SerializationInfo info, StreamingContext context ) : base( info, context ) { Index: TransientObjectException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/TransientObjectException.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TransientObjectException.cs 1 Jan 2005 03:35:39 -0000 1.4 --- TransientObjectException.cs 14 Feb 2005 03:17:06 -0000 1.5 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 11,20 **** { /// <summary> ! /// /// </summary> ! /// <param name="message"></param> public TransientObjectException( string message ) : base( message ) { } } } \ No newline at end of file --- 12,57 ---- { /// <summary> ! /// Initializes a new instance of the <see cref="TransientObjectException"/> class. /// </summary> ! public TransientObjectException() ! : base( "The user passed a transient instance to an ISession method that expects a persistent instance." ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="TransientObjectException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> public TransientObjectException( string message ) : base( message ) { } + + /// <summary> + /// Initializes a new instance of the <see cref="TransientObjectException"/> class. + /// </summary> + /// <param name="message">The message that describes the error. </param> + /// <param name="innerException"> + /// The exception that is the cause of the current exception. If the innerException parameter + /// is not a null reference, the current exception is raised in a catch block that handles + /// the inner exception. + /// </param> + public TransientObjectException( string message, Exception innerException ) : base( message, innerException ) + { + } + + /// <summary> + /// Initializes a new instance of the <see cref="TransientObjectException"/> class + /// with serialized data. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + protected TransientObjectException( SerializationInfo info, StreamingContext context ) : base( info, context ) + { + } } } \ No newline at end of file Index: PropertyNotFoundException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/PropertyNotFoundException.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PropertyNotFoundException.cs 1 Jan 2005 03:34:16 -0000 1.4 --- PropertyNotFoundException.cs 14 Feb 2005 03:17:06 -0000 1.5 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 9,36 **** public class PropertyNotFoundException : MappingException { /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="root"></param> ! public PropertyNotFoundException( string message, Exception root ) : base( message, root ) { } /// <summary> ! /// /// </summary> ! /// <param name="root"></param> ! public PropertyNotFoundException( Exception root ) : base( root ) { } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! public PropertyNotFoundException( string message ) : base( message ) { } } } \ No newline at end of file --- 10,57 ---- public class PropertyNotFoundException : MappingException { + /// <summary> ! /// Initializes a new instance of the <see cref="PropertyNotFoundException"/> class. /// </summary> ! public PropertyNotFoundException() : base( "An expected getter, setter, or field could not be found." ) { } /// <summary> ! /// Initializes a new instance of the <see cref="PropertyNotFoundException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> ! public PropertyNotFoundException( string message ) : base( message ) { } /// <summary> ! /// Initializes a new instance of the <see cref="PropertyNotFoundException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public PropertyNotFoundException( string message, Exception innerException ) : base( message, innerException ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="PropertyNotFoundException"/> class ! /// with serialized data. ! /// </summary> ! /// <param name="info"> ! /// The <see cref="SerializationInfo"/> that holds the serialized object ! /// data about the exception being thrown. ! /// </param> ! /// <param name="context"> ! /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. ! /// </param> ! protected PropertyNotFoundException( SerializationInfo info, StreamingContext context ) : base( info, context ) { } + } } \ No newline at end of file Index: WrongClassException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/WrongClassException.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** WrongClassException.cs 1 Jan 2005 03:35:39 -0000 1.4 --- WrongClassException.cs 14 Feb 2005 03:17:06 -0000 1.5 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 8,12 **** /// </summary> [Serializable] ! public class WrongClassException : HibernateException { private object identifier; --- 9,13 ---- /// </summary> [Serializable] ! public class WrongClassException : HibernateException, ISerializable { private object identifier; *************** *** 14,22 **** /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="identifier"></param> ! /// <param name="type"></param> public WrongClassException( string message, object identifier, System.Type type ) : base( message ) { --- 15,52 ---- /// <summary> ! /// Initializes a new instance of the <see cref="WrongClassException"/> class. /// </summary> ! public WrongClassException( ) ! : base( "A row with the supplied identifier was found but the discriminator specifies a different subclass." ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="WrongClassException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! public WrongClassException( string message ) : base( message ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="WrongClassException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public WrongClassException( string message, Exception innerException ) : base( message, innerException ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="WrongClassException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="identifier">The identifier of the object that was being loaded.</param> ! /// <param name="type">The <see cref="System.Type"/> that NHibernate was told to load.</param> public WrongClassException( string message, object identifier, System.Type type ) : base( message ) { *************** *** 25,29 **** } ! /// <summary></summary> public object Identifier { --- 55,61 ---- } ! /// <summary> ! /// Gets the identifier of the object that was being loaded. ! /// </summary> public object Identifier { *************** *** 31,35 **** } ! /// <summary></summary> public System.Type Type { --- 63,69 ---- } ! /// <summary> ! /// Gets the <see cref="System.Type"/> that NHibernate was told to load. ! /// </summary> public System.Type Type { *************** *** 37,41 **** } ! /// <summary></summary> public override string Message { --- 71,78 ---- } ! /// <summary> ! /// Gets a message that describes the current <see cref="WrongClassException"/>. ! /// </summary> ! /// <value>The error message that explains the reason for this exception.</value> public override string Message { *************** *** 48,51 **** --- 85,126 ---- } + #region ISerializable Members + + /// <summary> + /// Initializes a new instance of the <see cref="WrongClassException"/> class + /// with serialized data. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + protected WrongClassException( SerializationInfo info, StreamingContext context ) : base( info, context ) + { + type = (System.Type)info.GetValue( "type", typeof(System.Type) ); + identifier = info.GetValue( "identifier", typeof(object) ) ; + } + + /// <summary> + /// Sets the serialization info for <see cref="WrongClassException"/> after + /// getting the info from the base Exception. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + base.GetObjectData( info, context ); + info.AddValue( "type", type, typeof(System.Type) ); + info.AddValue( "identifier", identifier, typeof(object) ); + } + + #endregion } } \ No newline at end of file Index: QueryException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/QueryException.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** QueryException.cs 1 Jan 2005 03:35:39 -0000 1.4 --- QueryException.cs 14 Feb 2005 03:17:06 -0000 1.5 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 7,18 **** /// </summary> [Serializable] ! public class QueryException : HibernateException { private string queryString; /// <summary> ! /// /// </summary> ! /// <param name="message"></param> public QueryException( string message ) : base( message ) { --- 8,26 ---- /// </summary> [Serializable] ! public class QueryException : HibernateException, ISerializable { private string queryString; /// <summary> ! /// Initializes a new instance of the <see cref="QueryException"/> class. /// </summary> ! public QueryException() : base( "The HQL could not be translated to SQL." ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="QueryException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> public QueryException( string message ) : base( message ) { *************** *** 20,40 **** /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="e"></param> ! public QueryException( string message, Exception e ) : base( message, e ) { } /// <summary> ! /// /// </summary> ! /// <param name="e"></param> ! public QueryException( Exception e ) : base( e ) { } ! /// <summary></summary> public string QueryString { --- 28,58 ---- /// <summary> ! /// Initializes a new instance of the <see cref="QueryException"/> class. /// </summary> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public QueryException( Exception innerException ) : base( innerException ) { } /// <summary> ! /// Initializes a new instance of the <see cref="QueryException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public QueryException( string message, Exception innerException ) : base( message, innerException ) { } ! /// <summary> ! /// Gets or sets the <see cref="String"/> of HQL that caused the Exception. ! /// </summary> public string QueryString { *************** *** 43,51 **** } ! /// <summary></summary> public override string Message { get { return base.Message + " [" + queryString + "]"; } } } } \ No newline at end of file --- 61,109 ---- } ! /// <summary> ! /// Gets a message that describes the current <see cref="QueryException"/>. ! /// </summary> ! /// <value>The error message that explains the reason for this exception including the HQL.</value> public override string Message { get { return base.Message + " [" + queryString + "]"; } ... [truncated message content] |
From: Michael D. <mik...@us...> - 2005-02-14 03:17:17
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Id In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11213/NHibernate/Id Modified Files: IdentifierGenerationException.cs Log Message: Followed FxCops rules on creating custom exceptions and supporting serialization. However, they still inherit from ApplicationException. Index: IdentifierGenerationException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Id/IdentifierGenerationException.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** IdentifierGenerationException.cs 31 Dec 2004 18:56:49 -0000 1.5 --- IdentifierGenerationException.cs 14 Feb 2005 03:17:06 -0000 1.6 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate.Id *************** *** 10,16 **** { /// <summary> ! /// /// </summary> ! /// <param name="message"></param> public IdentifierGenerationException( string message ) : base( message ) { --- 11,24 ---- { /// <summary> ! /// Initializes a new instance of the <see cref="IdentifierGenerationException"/> class. /// </summary> ! public IdentifierGenerationException( ) : base( "An exception occurred during ID generation." ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="IdentifierGenerationException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error.</param> public IdentifierGenerationException( string message ) : base( message ) { *************** *** 18,28 **** /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="e"></param> public IdentifierGenerationException( string message, Exception e ) : base( message, e ) { } } } \ No newline at end of file --- 26,55 ---- /// <summary> ! /// Initializes a new instance of the <see cref="IdentifierGenerationException"/> class. /// </summary> ! /// <param name="message">The message that describes the error.</param> ! /// <param name="e"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> public IdentifierGenerationException( string message, Exception e ) : base( message, e ) { } + + /// <summary> + /// Initializes a new instance of the <see cref="IdentifierGenerationException"/> class + /// with serialized data. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + protected IdentifierGenerationException( SerializationInfo info, StreamingContext context ) : base( info, context ) + { + } } } \ No newline at end of file |
From: Michael D. <mik...@us...> - 2005-02-14 03:17:15
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Cache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11213/NHibernate/Cache Modified Files: CacheException.cs Log Message: Followed FxCops rules on creating custom exceptions and supporting serialization. However, they still inherit from ApplicationException. Index: CacheException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Cache/CacheException.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CacheException.cs 31 Dec 2004 15:24:29 -0000 1.5 --- CacheException.cs 14 Feb 2005 03:17:06 -0000 1.6 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate.Cache *************** *** 10,16 **** { /// <summary> ! /// /// </summary> ! /// <param name="message"></param> public CacheException( string message ) : base( message ) { --- 11,24 ---- { /// <summary> ! /// Initializes a new instance of the <see cref="CacheException"/> class. /// </summary> ! public CacheException( ) : base( "There was an Exception in the Cache." ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="CacheException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error.</param> public CacheException( string message ) : base( message ) { *************** *** 18,25 **** /// <summary> ! /// /// </summary> ! /// <param name="e"></param> ! public CacheException( Exception e ) : base( e ) { } --- 26,65 ---- /// <summary> ! /// Initializes a new instance of the <see cref="CacheException"/> class. /// </summary> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public CacheException( Exception innerException ) : base( innerException ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="CacheException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public CacheException( string message, Exception innerException ) : base( message, innerException ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="CacheException"/> class ! /// with serialized data. ! /// </summary> ! /// <param name="info"> ! /// The <see cref="SerializationInfo"/> that holds the serialized object ! /// data about the exception being thrown. ! /// </param> ! /// <param name="context"> ! /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. ! /// </param> ! protected CacheException( SerializationInfo info, StreamingContext context ) : base( info, context ) { } |