You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by gb...@apache.org on 2006/02/14 23:01:31 UTC
svn commit: r377854 -
/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
Author: gbayon
Date: Tue Feb 14 14:01:30 2006
New Revision: 377854
URL: http://svn.apache.org/viewcvs?rev=377854&view=rev
Log:
- Added conditional compilation directive for .NET V2
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
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=377854&r1=377853&r2=377854&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs Tue Feb 14 14:01:30 2006
@@ -1128,6 +1128,7 @@
postSelect.ResultProperty.PropertyInfo.SetValue(postSelect.Target, array, null);
}
+#if dotnet2
else if (postSelect.Method == ExecuteMethod.ExecuteQueryForGenericIList)
{
// How to: Examine and Instantiate Generic Types with Reflection
@@ -1162,8 +1163,8 @@
object values = miConstructed.Invoke(postSelect.Statement, args);
ObjectProbe.SetPropertyValue(postSelect.Target, postSelect.ResultProperty.PropertyName, values);
-
}
+#endif
else if (postSelect.Method == ExecuteMethod.ExecuteQueryForObject)
{
object value = postSelect.Statement.ExecuteQueryForObject(session, postSelect.Keys);
@@ -1321,11 +1322,13 @@
}
}
}
+#if dotnet2
else if ( mapping.PropertyInfo.PropertyType.IsGenericType &&
mapping.PropertyInfo.PropertyType.GetGenericTypeDefinition() == typeof(IList<>))
{
postSelect.Method = ExecuteMethod.ExecuteQueryForGenericIList;
}
+#endif
else // The ResultProperty is map to a .Net object
{
postSelect.Method = ExecuteMethod.ExecuteQueryForObject;