From: Kevin W. <kev...@us...> - 2004-12-31 17:54:47
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Expression In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22686 Modified Files: LePropertyExpression.cs LikeExpression.cs LogicalExpression.cs Log Message: fixing xml comments and letting ReSharper do reformatting Index: LogicalExpression.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Expression/LogicalExpression.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LogicalExpression.cs 22 Nov 2004 03:55:59 -0000 1.4 --- LogicalExpression.cs 31 Dec 2004 17:54:36 -0000 1.5 *************** *** 1,19 **** using System; - using System.Text; - using System.Collections; - using NHibernate.Engine; using NHibernate.SqlCommand; - using NHibernate.Util; ! namespace NHibernate.Expression { - /// <summary> /// Base Class of binary logical expressions. /// </summary> ! public abstract class LogicalExpression : Expression { - protected Expression lhs; protected Expression rhs; --- 1,13 ---- using System; using NHibernate.Engine; using NHibernate.SqlCommand; ! namespace NHibernate.Expression { /// <summary> /// Base Class of binary logical expressions. /// </summary> ! public abstract class LogicalExpression : Expression { protected Expression lhs; protected Expression rhs; *************** *** 25,29 **** /// <param name="lhs">The Expression to use in the Left Hand Side.</param> /// <param name="rhs">The Expression to use in the Right Hand Side.</param> ! internal LogicalExpression(Expression lhs, Expression rhs) { this.lhs = lhs; --- 19,23 ---- /// <param name="lhs">The Expression to use in the Left Hand Side.</param> /// <param name="rhs">The Expression to use in the Right Hand Side.</param> ! internal LogicalExpression( Expression lhs, Expression rhs ) { this.lhs = lhs; *************** *** 34,38 **** /// The Expression that will be on the Left Hand Side of the Op. /// </summary> ! protected Expression LeftHandSide { get { return lhs; } --- 28,32 ---- /// The Expression that will be on the Left Hand Side of the Op. /// </summary> ! protected Expression LeftHandSide { get { return lhs; } *************** *** 42,46 **** /// The Expression that will be on the Right Hand Side of the Op. /// </summary> ! protected Expression RightHandSide { get { return rhs; } --- 36,40 ---- /// The Expression that will be on the Right Hand Side of the Op. /// </summary> ! protected Expression RightHandSide { get { return rhs; } *************** *** 53,64 **** /// <param name="sessionFactory">The ISessionFactory to get the Persistence information from.</param> /// <param name="persistentClass">The Type we are constructing the Expression for.</param> ! /// <returns>An arry of <see cref="TypeValue"/>s.</returns> ! public override TypedValue[] GetTypedValues(ISessionFactoryImplementor sessionFactory, System.Type persistentClass) { ! TypedValue[] lhstv = lhs.GetTypedValues(sessionFactory, persistentClass); ! TypedValue[] rhstv = rhs.GetTypedValues(sessionFactory, persistentClass); ! TypedValue[] result = new TypedValue[ lhstv.Length + rhstv.Length ]; ! Array.Copy(lhstv, 0, result, 0, lhstv.Length); ! Array.Copy(rhstv, 0, result, lhstv.Length, rhstv.Length); return result; } --- 47,58 ---- /// <param name="sessionFactory">The ISessionFactory to get the Persistence information from.</param> /// <param name="persistentClass">The Type we are constructing the Expression for.</param> ! /// <returns>An arry of <see cref="TypedValue"/>s.</returns> ! public override TypedValue[ ] GetTypedValues( ISessionFactoryImplementor sessionFactory, System.Type persistentClass ) { ! TypedValue[ ] lhstv = lhs.GetTypedValues( sessionFactory, persistentClass ); ! TypedValue[ ] rhstv = rhs.GetTypedValues( sessionFactory, persistentClass ); ! TypedValue[ ] result = new TypedValue[lhstv.Length + rhstv.Length]; ! Array.Copy( lhstv, 0, result, 0, lhstv.Length ); ! Array.Copy( rhstv, 0, result, lhstv.Length, rhstv.Length ); return result; } *************** *** 72,89 **** /// <returns>A well formed SqlString for the Where clause.</returns> /// <remarks>The SqlString will be enclosed by <c>(</c> and <c>)</c>.</remarks> ! public override SqlString ToSqlString(ISessionFactoryImplementor factory, System.Type persistentClass, string alias) { //TODO: add default capacity SqlStringBuilder sqlBuilder = new SqlStringBuilder(); ! SqlString lhSqlString = lhs.ToSqlString(factory, persistentClass, alias); ! SqlString rhSqlString = rhs.ToSqlString(factory, persistentClass, alias); - sqlBuilder.Add(new SqlString[] {lhSqlString, rhSqlString}, - "(", - Op, - ")"); - - return sqlBuilder.ToSqlString(); } --- 66,83 ---- /// <returns>A well formed SqlString for the Where clause.</returns> /// <remarks>The SqlString will be enclosed by <c>(</c> and <c>)</c>.</remarks> ! public override SqlString ToSqlString( ISessionFactoryImplementor factory, System.Type persistentClass, string alias ) { //TODO: add default capacity SqlStringBuilder sqlBuilder = new SqlStringBuilder(); ! SqlString lhSqlString = lhs.ToSqlString( factory, persistentClass, alias ); ! SqlString rhSqlString = rhs.ToSqlString( factory, persistentClass, alias ); ! ! sqlBuilder.Add( new SqlString[ ] {lhSqlString, rhSqlString}, ! "(", ! Op, ! ")" ); ! return sqlBuilder.ToSqlString(); } *************** *** 105,109 **** /// are being combined. /// </remarks> ! public override string ToString() { return lhs.ToString() + ' ' + Op + ' ' + rhs.ToString(); --- 99,103 ---- /// are being combined. /// </remarks> ! public override string ToString() { return lhs.ToString() + ' ' + Op + ' ' + rhs.ToString(); Index: LikeExpression.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Expression/LikeExpression.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LikeExpression.cs 28 Mar 2004 06:05:09 -0000 1.3 --- LikeExpression.cs 31 Dec 2004 17:54:36 -0000 1.4 *************** *** 1,4 **** - using System; - namespace NHibernate.Expression { --- 1,2 ---- *************** *** 6,18 **** /// Summary description for LikeExpression. /// </summary> ! public class LikeExpression: SimpleExpression { ! internal LikeExpression(string propertyName, object value) : base (propertyName, value) {} ! ! protected override string Op { get { return " like "; } } } ! } --- 4,23 ---- /// Summary description for LikeExpression. /// </summary> ! public class LikeExpression : SimpleExpression { + /// <summary> + /// + /// </summary> + /// <param name="propertyName"></param> + /// <param name="value"></param> + internal LikeExpression( string propertyName, object value ) : base( propertyName, value ) + { + } ! /// <summary></summary> ! protected override string Op { get { return " like "; } } } ! } \ No newline at end of file Index: LePropertyExpression.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Expression/LePropertyExpression.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LePropertyExpression.cs 2 Aug 2004 04:30:37 -0000 1.1 --- LePropertyExpression.cs 31 Dec 2004 17:54:36 -0000 1.2 *************** *** 1,17 **** - using System; - namespace NHibernate.Expression { ! public class LePropertyExpression : PropertyExpression ! { ! public LePropertyExpression(string propertyName, string otherPropertyName) ! : base(propertyName, otherPropertyName) ! { ! } ! protected override string Op ! { ! get { return " <= "; } ! } ! } } \ No newline at end of file --- 1,22 ---- namespace NHibernate.Expression { ! /// <summary></summary> ! public class LePropertyExpression : PropertyExpression ! { ! /// <summary> ! /// ! /// </summary> ! /// <param name="propertyName"></param> ! /// <param name="otherPropertyName"></param> ! public LePropertyExpression( string propertyName, string otherPropertyName ) ! : base( propertyName, otherPropertyName ) ! { ! } ! /// <summary></summary> ! protected override string Op ! { ! get { return " <= "; } ! } ! } } \ No newline at end of file |