Author: gbayon
Date: Thu Apr 27 10:00:21 2006
New Revision: 397590

URL: http://svn.apache.org/viewcvs?rev=397590&view=rev
Log:
- Removed last use of Activator

Modified:
    
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ArgumentProperty.cs
    
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs

Modified: 
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ArgumentProperty.cs
URL: 
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ArgumentProperty.cs?rev=397590&r1=397589&r2=397590&view=diff
==============================================================================
--- 
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ArgumentProperty.cs
 (original)
+++ 
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ArgumentProperty.cs
 Thu Apr 27 10:00:21 2006
@@ -108,7 +108,7 @@
                /// <param name="configScope"></param>
                public void Initialize( ConfigurationScope configScope, 
ConstructorInfo constructorInfo )
                {
-                       // Recherche l'argument et son index / à son nom
+            // Search argument by his name to set his type
                        ParameterInfo[] parameters = 
constructorInfo.GetParameters();
 
                        bool found = false;
@@ -121,7 +121,6 @@
                                        break;
                                }
                        }
-
                        if (this.CallBackName!=null && this.CallBackName.Length 
>0)
                        {
                                configScope.ErrorContext.MoreInfo = "Argument 
property ("+_argumentName+"), check the typeHandler attribute '" + 
this.CallBackName + "' (must be a ITypeHandlerCallback implementation).";

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=397590&r1=397589&r2=397590&view=diff
==============================================================================
--- 
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs 
(original)
+++ 
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs 
Thu Apr 27 10:00:21 2006
@@ -1135,7 +1135,8 @@
                                }
                                else if (postSelect.Method == 
ExecuteMethod.ExecuteQueryForStrongTypedIList)
                                {
-                                       object values = 
Activator.CreateInstance(postSelect.ResultProperty.MemberAccessor.MemberType);
+                    IFactory factory =  
request.ObjectFactory.CreateFactory(postSelect.ResultProperty.MemberAccessor.MemberType,
 Type.EmptyTypes);
+                    object values = factory.CreateInstance(null);
                                        
postSelect.Statement.ExecuteQueryForList(session, postSelect.Keys, 
(IList)values);
 
                                        
postSelect.ResultProperty.MemberAccessor.Set(postSelect.Target, values);
@@ -1529,7 +1530,8 @@
                                                else // Strongly typed List
                                                {
                                                        reader = 
DataReaderTransformer.Transforme(reader, request.Session.DataSource.DbProvider);
-                                                       object values = 
Activator.CreateInstance(mapping.MemberType);
+                            IFactory factory = 
request.ObjectFactory.CreateFactory(mapping.MemberType, Type.EmptyTypes);
+                            object values = factory.CreateInstance(null);
                                                        
queryStatement.ExecuteQueryForList(request.Session, keys, (IList)values);
                                                        return values;
                                                }


Reply via email to