From: Kevin W. <kev...@us...> - 2004-12-31 23:53:18
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Type In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24342 Modified Files: IDiscriminatorType.cs IIdentifierType.cs ILiteralType.cs ImmutableType.cs Int16Type.cs Log Message: fixing xml comments and letting ReSharper do reformatting Index: IDiscriminatorType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/IDiscriminatorType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IDiscriminatorType.cs 10 Feb 2004 18:41:42 -0000 1.2 --- IDiscriminatorType.cs 31 Dec 2004 23:53:08 -0000 1.3 *************** *** 1,5 **** ! using System; ! ! namespace NHibernate.Type { /// <summary> /// An IType that may be used for a discriminator column. --- 1,4 ---- ! namespace NHibernate.Type ! { /// <summary> /// An IType that may be used for a discriminator column. *************** *** 10,14 **** /// both the <see cref="IIdentifierType"/> and <see cref="ILiteralType"/> interfaces. /// </remarks> ! public interface IDiscriminatorType : IIdentifierType, ILiteralType { } ! } --- 9,14 ---- /// both the <see cref="IIdentifierType"/> and <see cref="ILiteralType"/> interfaces. /// </remarks> ! public interface IDiscriminatorType : IIdentifierType, ILiteralType ! { } ! } \ No newline at end of file Index: ILiteralType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/ILiteralType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ILiteralType.cs 10 Feb 2004 18:41:42 -0000 1.2 --- ILiteralType.cs 31 Dec 2004 23:53:08 -0000 1.3 *************** *** 1,17 **** ! using System; ! ! namespace NHibernate.Type { /// <summary> /// An <see cref="IType"/> that may appear as an SQL literal /// </summary> ! public interface ILiteralType { ! /// <summary> ! /// When implemented by a class, return a <see cref="String"/> representation /// of the value, suitable for embedding in an SQL statement /// </summary> /// <param name="value">The object to convert to a string for the SQL statement.</param> /// <returns>A string that containts a well formed SQL Statement.</returns> ! string ObjectToSQLString(object value); } ! } --- 1,16 ---- ! namespace NHibernate.Type ! { /// <summary> /// An <see cref="IType"/> that may appear as an SQL literal /// </summary> ! public interface ILiteralType ! { /// <summary> ! /// When implemented by a class, return a <see cref="string"/> representation /// of the value, suitable for embedding in an SQL statement /// </summary> /// <param name="value">The object to convert to a string for the SQL statement.</param> /// <returns>A string that containts a well formed SQL Statement.</returns> ! string ObjectToSQLString( object value ); } ! } \ No newline at end of file Index: Int16Type.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/Int16Type.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Int16Type.cs 20 Nov 2004 21:13:03 -0000 1.7 --- Int16Type.cs 31 Dec 2004 23:53:08 -0000 1.8 *************** *** 1,61 **** using System; using System.Data; - using NHibernate.SqlTypes; ! namespace NHibernate.Type { ! /// <summary> /// Maps a <see cref="System.Int16"/> Property /// to a <see cref="DbType.Int16"/> column. /// </summary> ! public class Int16Type : ValueTypeType, IDiscriminatorType, IVersionType { ! ! internal Int16Type() : base( new Int16SqlType() ) { } ! public override object Get(IDataReader rs, int index) { ! return Convert.ToInt16(rs[index]); } ! public override object Get(IDataReader rs, string name) { ! return Convert.ToInt16(rs[name]); } ! public override System.Type ReturnedClass { ! get { return typeof(System.Int16); } } ! public override void Set(IDbCommand rs, object value, int index) { ! IDataParameter parm = rs.Parameters[index] as IDataParameter; parm.Value = value; } ! public override string Name { get { return "Int16"; } } ! public override string ObjectToSQLString(object value) { return value.ToString(); } ! public object StringToObject(string xml) { ! return short.Parse(xml); } #region IVersionType Members ! public object Next(object current) { ! return (short)( (short)current + 1 ); } ! ! public object Seed { ! get { return (short)0; } } #endregion - } ! } --- 1,104 ---- using System; using System.Data; using NHibernate.SqlTypes; ! namespace NHibernate.Type ! { /// <summary> /// Maps a <see cref="System.Int16"/> Property /// to a <see cref="DbType.Int16"/> column. /// </summary> ! public class Int16Type : ValueTypeType, IDiscriminatorType, IVersionType { ! /// <summary></summary> ! internal Int16Type() : base( new Int16SqlType() ) { } ! /// <summary> ! /// ! /// </summary> ! /// <param name="rs"></param> ! /// <param name="index"></param> ! /// <returns></returns> ! public override object Get( IDataReader rs, int index ) ! { ! return Convert.ToInt16( rs[ index ] ); } ! /// <summary> ! /// ! /// </summary> ! /// <param name="rs"></param> ! /// <param name="name"></param> ! /// <returns></returns> ! public override object Get( IDataReader rs, string name ) ! { ! return Convert.ToInt16( rs[ name ] ); } ! /// <summary></summary> ! public override System.Type ReturnedClass ! { ! get { return typeof( Int16 ); } } ! /// <summary> ! /// ! /// </summary> ! /// <param name="rs"></param> ! /// <param name="value"></param> ! /// <param name="index"></param> ! public override void Set( IDbCommand rs, object value, int index ) ! { ! IDataParameter parm = rs.Parameters[ index ] as IDataParameter; parm.Value = value; } ! /// <summary></summary> ! public override string Name ! { get { return "Int16"; } } ! ! /// <summary> ! /// ! /// </summary> ! /// <param name="value"></param> ! /// <returns></returns> ! public override string ObjectToSQLString( object value ) ! { return value.ToString(); } ! ! /// <summary> ! /// ! /// </summary> ! /// <param name="xml"></param> ! /// <returns></returns> ! public object StringToObject( string xml ) ! { ! return short.Parse( xml ); } #region IVersionType Members ! /// <summary> ! /// ! /// </summary> ! /// <param name="current"></param> ! /// <returns></returns> ! public object Next( object current ) { ! return ( short ) ( ( short ) current + 1 ); } ! ! /// <summary></summary> ! public object Seed { ! get { return ( short ) 0; } } #endregion } ! } \ No newline at end of file Index: ImmutableType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/ImmutableType.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ImmutableType.cs 20 Sep 2004 03:00:29 -0000 1.6 --- ImmutableType.cs 31 Dec 2004 23:53:08 -0000 1.7 *************** *** 1,12 **** using System; - using NHibernate.SqlTypes; ! namespace NHibernate.Type { /// <summary> /// Superclass of nullable immutable types. /// </summary> ! public abstract class ImmutableType : NullableType { /// <summary> --- 1,11 ---- using System; using NHibernate.SqlTypes; ! namespace NHibernate.Type { /// <summary> /// Superclass of nullable immutable types. /// </summary> ! public abstract class ImmutableType : NullableType { /// <summary> *************** *** 15,19 **** /// </summary> /// <param name="sqlType">The underlying <see cref="SqlType"/>.</param> ! protected ImmutableType(SqlType sqlType) : base(sqlType) { } --- 14,18 ---- /// </summary> /// <param name="sqlType">The underlying <see cref="SqlType"/>.</param> ! protected ImmutableType( SqlType sqlType ) : base( sqlType ) { } *************** *** 30,34 **** /// then reboxed. /// </remarks> ! public override sealed object DeepCopyNotNull(object val) { return val; --- 29,33 ---- /// then reboxed. /// </remarks> ! public override sealed object DeepCopyNotNull( object val ) { return val; *************** *** 43,47 **** /// the type is mutable then they should inherit from <see cref="MutableType"/>. /// </remarks> ! public override sealed bool IsMutable { get { return false; } --- 42,46 ---- /// the type is mutable then they should inherit from <see cref="MutableType"/>. /// </remarks> ! public override sealed bool IsMutable { get { return false; } *************** *** 61,69 **** /// not implement the <c>Equals()</c> then set this to <c>false</c>. /// </remarks> ! public override bool HasNiceEquals { get { return true; } } ! } } \ No newline at end of file --- 60,68 ---- /// not implement the <c>Equals()</c> then set this to <c>false</c>. /// </remarks> ! public override bool HasNiceEquals { get { return true; } } ! } } \ No newline at end of file Index: IIdentifierType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/IIdentifierType.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IIdentifierType.cs 10 Feb 2004 18:41:42 -0000 1.3 --- IIdentifierType.cs 31 Dec 2004 23:53:08 -0000 1.4 *************** *** 1,11 **** ! using System; ! ! namespace NHibernate.Type { ! /// <summary> /// An <see cref="IType"/> that may be used as an identifier. /// </summary> ! public interface IIdentifierType : IType { ! /// <summary> /// When implemented by a class, converts the xml string from the --- 1,9 ---- ! namespace NHibernate.Type ! { /// <summary> /// An <see cref="IType"/> that may be used as an identifier. /// </summary> ! public interface IIdentifierType : IType ! { /// <summary> /// When implemented by a class, converts the xml string from the *************** *** 19,23 **** /// for the System.Type. /// </remarks> ! object StringToObject(string xml); } ! } --- 17,21 ---- /// for the System.Type. /// </remarks> ! object StringToObject( string xml ); } ! } \ No newline at end of file |