Author: rgrabowski
Date: Sun Sep 18 13:01:35 2005
New Revision: 289967
URL: http://svn.apache.org/viewcvs?rev=289967&view=rev
Log:
Fix for IBATISNET-111: Pass in parameterObject to row/map delegates
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapper.cs
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs?rev=289967&r1=289966&r2=289967&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs
Sun Sep 18 13:01:35 2005
@@ -1053,7 +1053,7 @@
private int _index = 0;
- public void RowHandler(object obj, IList list)
+ public void RowHandler(object obj, object paramterObject, IList
list)
{
_index++;
Assert.AreEqual(_index, ((Account) obj).Id);
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs?rev=289967&r1=289966&r2=289967&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
Sun Sep 18 13:01:35 2005
@@ -562,7 +562,7 @@
{
object obj =
ApplyResultMap(request, reader, null);
- rowDelegate(obj, list);
+ rowDelegate(obj,
parameterObject, list);
n++;
}
}
@@ -777,7 +777,7 @@
{
value =
ObjectProbe.GetPropertyValue(obj, valueProperty);
}
- rowDelegate(key, value,
map);
+ rowDelegate(key, value,
parameterObject, map);
}
}
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapper.cs
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapper.cs?rev=289967&r1=289966&r2=289967&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapper.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapper.cs Sun Sep 18
13:01:35 2005
@@ -53,17 +53,22 @@
/// </summary>
public class SqlMapper
{
-
/// <summary>
/// A delegate called once per row in the QueryWithRowDelegate
method
/// </summary>
- public delegate void RowDelegate(object obj, IList list);
+ /// <param name="obj">The object currently being
processed.</param>
+ /// <param name="parameterObject">The optional parameter object
passed into the QueryWithRowDelegate method.</param>
+ /// <param name="list">The IList that will be returned to the
caller.</param>
+ public delegate void RowDelegate(object obj, object
parameterObject, IList list);
/// <summary>
- /// A delegate called once per row in the QueryWithRowDelegate
method
+ /// A delegate called once per row in the
QueryForMapWithRowDelegate method
/// </summary>
- public delegate void DictionaryRowDelegate(object key, object
value, IDictionary dictionary);
-
+ /// <param name="key"></param>
+ /// <param name="value"></param>
+ /// <param name="parameterObject">The optional parameter object
passed into the QueryForMapWithRowDelegate method.</param>
+ /// <param name="dictionary">The IDictionary that will be
returned to the caller.</param>
+ public delegate void DictionaryRowDelegate(object key, object
value, object parameterObject, IDictionary dictionary);
#region Fields
//(MappedStatement Name, MappedStatement)