From: Kevin W. <kev...@us...> - 2005-01-01 03:34:11
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1607 Modified Files: ITransaction.cs IUserType.cs IValidatable.cs LazyInitializationException.cs LockMode.cs MappingException.cs Log Message: fix xml documentation and allow ReSharper to reformat Index: ITransaction.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ITransaction.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ITransaction.cs 15 Sep 2004 03:17:46 -0000 1.2 --- ITransaction.cs 1 Jan 2005 03:34:01 -0000 1.3 *************** *** 1,6 **** - using System; using System.Data; ! namespace NHibernate { /// <summary> /// Allows the application to define units of work, while maintaining abstraction from the --- 1,6 ---- using System.Data; ! namespace NHibernate ! { /// <summary> /// Allows the application to define units of work, while maintaining abstraction from the *************** *** 15,20 **** /// at a time. Implementors are not intended to be threadsafe. /// </remarks> ! public interface ITransaction { ! /// <summary> /// Flush the associated <c>ISession</c> and end the unit of work. --- 15,20 ---- /// at a time. Implementors are not intended to be threadsafe. /// </remarks> ! public interface ITransaction ! { /// <summary> /// Flush the associated <c>ISession</c> and end the unit of work. *************** *** 43,47 **** /// </remarks> bool WasCommitted { get; } ! /// <summary> /// Enlist the <see cref="IDbCommand"/> in the current Transaction. --- 43,47 ---- /// </remarks> bool WasCommitted { get; } ! /// <summary> /// Enlist the <see cref="IDbCommand"/> in the current Transaction. *************** *** 51,55 **** /// It is okay for this to be a no op implementation. /// </remarks> ! void Enlist(IDbCommand command); } ! } --- 51,55 ---- /// It is okay for this to be a no op implementation. /// </remarks> ! void Enlist( IDbCommand command ); } ! } \ No newline at end of file Index: LockMode.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/LockMode.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LockMode.cs 9 Aug 2004 03:10:26 -0000 1.4 --- LockMode.cs 1 Jan 2005 03:34:01 -0000 1.5 *************** *** 1,6 **** using System; - using System.Collections; ! namespace NHibernate { /// <summary> --- 1,5 ---- using System; ! namespace NHibernate { /// <summary> *************** *** 13,22 **** /// </remarks> [Serializable] ! public sealed class LockMode { private int level; private string name; ! private LockMode(int level, string name) { this.level = level; --- 12,26 ---- /// </remarks> [Serializable] ! public sealed class LockMode { private int level; private string name; ! /// <summary> ! /// ! /// </summary> ! /// <param name="level"></param> ! /// <param name="name"></param> ! private LockMode( int level, string name ) { this.level = level; *************** *** 24,28 **** } ! public override string ToString() { return name; --- 28,33 ---- } ! /// <summary></summary> ! public override string ToString() { return name; *************** *** 32,43 **** /// Is this lock mode more restrictive than the given lock mode? /// </summary> ! public bool GreaterThan(LockMode mode) { return level > mode.level; } /// <summary> /// Is this lock mode less restrictive than the given lock mode? /// </summary> ! public bool LessThan(LockMode mode) { return level < mode.level; --- 37,51 ---- /// Is this lock mode more restrictive than the given lock mode? /// </summary> ! /// <param name="mode"></param> ! public bool GreaterThan( LockMode mode ) { return level > mode.level; } + /// <summary> /// Is this lock mode less restrictive than the given lock mode? /// </summary> ! /// <param name="mode"></param> ! public bool LessThan( LockMode mode ) { return level < mode.level; *************** *** 51,55 **** /// might be obtained if necessary. /// </remarks> ! public static LockMode None = new LockMode(0, "None"); /// <summary> --- 59,63 ---- /// might be obtained if necessary. /// </remarks> ! public static LockMode None = new LockMode( 0, "None" ); /// <summary> *************** *** 59,63 **** /// Objects are loaded in <c>Read</c> mode by default /// </remarks> ! public static LockMode Read = new LockMode(5, "Read"); /// <summary> --- 67,71 ---- /// Objects are loaded in <c>Read</c> mode by default /// </remarks> ! public static LockMode Read = new LockMode( 5, "Read" ); /// <summary> *************** *** 68,72 **** /// SQL <c>SELECT ... FOR UPDATE</c> /// </remarks> ! public static LockMode Upgrade = new LockMode(10, "Upgrade"); /// <summary> --- 76,80 ---- /// SQL <c>SELECT ... FOR UPDATE</c> /// </remarks> ! public static LockMode Upgrade = new LockMode( 10, "Upgrade" ); /// <summary> *************** *** 77,81 **** /// The semantics of this lock mode, once obtained, are the same as <c>Upgrade</c> /// </remarks> ! public static LockMode UpgradeNoWait = new LockMode(10, "UpgradeNoWait"); /// <summary> --- 85,89 ---- /// The semantics of this lock mode, once obtained, are the same as <c>Upgrade</c> /// </remarks> ! public static LockMode UpgradeNoWait = new LockMode( 10, "UpgradeNoWait" ); /// <summary> *************** *** 85,93 **** /// This is not a valid mode for <c>Load()</c> or <c>Lock()</c>. /// </remarks> ! public static LockMode Write = new LockMode(10, "Write"); //TODO: need to implement .NET equivalent of readResolve - believe it is // the IObjectReference interface... ! } ! } --- 93,101 ---- /// This is not a valid mode for <c>Load()</c> or <c>Lock()</c>. /// </remarks> ! public static LockMode Write = new LockMode( 10, "Write" ); //TODO: need to implement .NET equivalent of readResolve - believe it is // the IObjectReference interface... ! } ! } \ No newline at end of file Index: IUserType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/IUserType.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** IUserType.cs 6 Dec 2004 03:01:26 -0000 1.4 --- IUserType.cs 1 Jan 2005 03:34:01 -0000 1.5 *************** *** 1,8 **** - using System; using System.Data; - using NHibernate.SqlTypes; ! namespace NHibernate { /// <summary> /// The inteface to be implemented by user-defined types. --- 1,7 ---- using System.Data; using NHibernate.SqlTypes; ! namespace NHibernate ! { /// <summary> /// The inteface to be implemented by user-defined types. *************** *** 22,37 **** /// </para> /// <para> ! /// Alternatively, custom types could implement <see cref="Types.IType"/> directly or extend one of the /// abstract classes in <c>NHibernate.Type</c>. This approach risks future incompatible changes /// to classes or intefaces in the package. /// </para> /// </remarks> ! public interface IUserType { /// <summary> /// The SQL types for the columns mapped by this type. /// </summary> ! SqlType[] SqlTypes {get;} ! /// <summary> /// The type returned by <c>NullSafeGet()</c> --- 21,36 ---- /// </para> /// <para> ! /// Alternatively, custom types could implement <see cref="Type.IType"/> directly or extend one of the /// abstract classes in <c>NHibernate.Type</c>. This approach risks future incompatible changes /// to classes or intefaces in the package. /// </para> /// </remarks> ! public interface IUserType { /// <summary> /// The SQL types for the columns mapped by this type. /// </summary> ! SqlType[] SqlTypes { get; } ! /// <summary> /// The type returned by <c>NullSafeGet()</c> *************** *** 46,51 **** /// <param name="y"></param> /// <returns></returns> ! bool Equals(object x, object y); ! /// <summary> /// Retrieve an instance of the mapped class from a JDBC resultset. --- 45,50 ---- /// <param name="y"></param> /// <returns></returns> ! bool Equals( object x, object y ); ! /// <summary> /// Retrieve an instance of the mapped class from a JDBC resultset. *************** *** 57,63 **** /// <returns></returns> /// <exception cref="HibernateException">HibernateException</exception> ! /// <exception cref="SQLException">SQLException</exception> ! object NullSafeGet(IDataReader rs, string[] names, object owner); ! /// <summary> /// Write an instance of the mapped class to a prepared statement. --- 56,62 ---- /// <returns></returns> /// <exception cref="HibernateException">HibernateException</exception> ! // /// <exception cref="SQLException">SQLException</exception> ! object NullSafeGet( IDataReader rs, string[] names, object owner ); ! /// <summary> /// Write an instance of the mapped class to a prepared statement. *************** *** 69,75 **** /// <param name="index">command parameter index</param> /// <exception cref="HibernateException">HibernateException</exception> ! /// <exception cref="SQLException">SQLException</exception> ! void NullSafeSet(IDbCommand cmd, object value, int index); ! /// <summary> /// Return a deep copy of the persistent state, stopping at entities and at collections. --- 68,74 ---- /// <param name="index">command parameter index</param> /// <exception cref="HibernateException">HibernateException</exception> ! // /// <exception cref="SQLException">SQLException</exception> ! void NullSafeSet( IDbCommand cmd, object value, int index ); ! /// <summary> /// Return a deep copy of the persistent state, stopping at entities and at collections. *************** *** 77,82 **** /// <param name="value">generally a collection element or entity field</param> /// <returns>a copy</returns> ! object DeepCopy(object value); ! /// <summary> /// Are objects of this type mutable? --- 76,81 ---- /// <param name="value">generally a collection element or entity field</param> /// <returns>a copy</returns> ! object DeepCopy( object value ); ! /// <summary> /// Are objects of this type mutable? *************** *** 85,87 **** } ! } --- 84,86 ---- } ! } \ No newline at end of file Index: MappingException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/MappingException.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MappingException.cs 22 Nov 2004 03:50:03 -0000 1.5 --- MappingException.cs 1 Jan 2005 03:34:01 -0000 1.6 *************** *** 2,6 **** using System.Runtime.Serialization; ! namespace NHibernate { /// <summary> --- 2,6 ---- using System.Runtime.Serialization; ! namespace NHibernate { /// <summary> *************** *** 9,23 **** /// </summary> [Serializable] ! public class MappingException : HibernateException { ! public MappingException(string message, Exception root) : base(message, root) {} ! public MappingException(Exception root) : base(root) { } ! public MappingException(string message) : base(message) {} ! public MappingException() : base() {} ! protected MappingException(SerializationInfo info, StreamingContext context) : base(info, context) { } } ! } --- 9,52 ---- /// </summary> [Serializable] ! public class MappingException : HibernateException { ! /// <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 ) ! { ! } } ! } \ No newline at end of file Index: LazyInitializationException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/LazyInitializationException.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LazyInitializationException.cs 22 Nov 2004 03:50:03 -0000 1.5 --- LazyInitializationException.cs 1 Jan 2005 03:34:01 -0000 1.6 *************** *** 1,6 **** using System; using System.Runtime.Serialization; ! namespace NHibernate { /// <summary> --- 1,7 ---- using System; using System.Runtime.Serialization; + using log4net; ! namespace NHibernate { /// <summary> *************** *** 9,27 **** /// </summary> [Serializable] ! public class LazyInitializationException : Exception { ! public LazyInitializationException(Exception root) : this(root.Message) {} ! public LazyInitializationException(string message) : base(message) { ! log4net.LogManager.GetLogger( typeof(LazyInitializationException) ).Error(message, this); } ! public LazyInitializationException(string message, Exception root) : this(message + " " + root.Message) {} ! public LazyInitializationException() : this("LazyInitalizationException") {} ! protected LazyInitializationException(SerializationInfo info, StreamingContext context) : base(info, context) { } } ! } --- 10,55 ---- /// </summary> [Serializable] ! public class LazyInitializationException : Exception { ! /// <summary> ! /// ! /// </summary> ! /// <param name="root"></param> ! public LazyInitializationException( Exception root ) : this( root.Message ) ! { ! } ! /// <summary> ! /// ! /// </summary> ! /// <param name="message"></param> ! public LazyInitializationException( string message ) : base( message ) { ! LogManager.GetLogger( typeof( LazyInitializationException ) ).Error( message, this ); } ! /// <summary> ! /// ! /// </summary> ! /// <param name="message"></param> ! /// <param name="root"></param> ! public LazyInitializationException( string message, Exception root ) : this( message + " " + root.Message ) ! { ! } ! /// <summary></summary> ! public LazyInitializationException() : this( "LazyInitalizationException" ) ! { ! } ! /// <summary> ! /// ! /// </summary> ! /// <param name="info"></param> ! /// <param name="context"></param> ! protected LazyInitializationException( SerializationInfo info, StreamingContext context ) : base( info, context ) ! { ! } } ! } \ No newline at end of file Index: IValidatable.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/IValidatable.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IValidatable.cs 17 Feb 2003 18:16:13 -0000 1.1 --- IValidatable.cs 1 Jan 2005 03:34:01 -0000 1.2 *************** *** 1,11 **** ! using System; ! ! namespace NHibernate { /// <summary> /// Implemented by persistent classes with invariants that must be checked before inserting /// into or updating the database /// </summary> ! public interface IValidatable { ! /// <summary> /// Validate the state of the object before persisting it. If a violation occurs, --- 1,10 ---- ! namespace NHibernate ! { /// <summary> /// Implemented by persistent classes with invariants that must be checked before inserting /// into or updating the database /// </summary> ! public interface IValidatable ! { /// <summary> /// Validate the state of the object before persisting it. If a violation occurs, *************** *** 15,17 **** void Validate(); } ! } --- 14,16 ---- void Validate(); } ! } \ No newline at end of file |