From: <fab...@us...> - 2008-11-26 12:38:56
|
Revision: 3931 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=3931&view=rev Author: fabiomaulo Date: 2008-11-26 12:38:52 +0000 (Wed, 26 Nov 2008) Log Message: ----------- Fix NH-1589 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Bytecode/Lightweight/ReflectionOptimizer.cs Modified: trunk/nhibernate/src/NHibernate/Bytecode/Lightweight/ReflectionOptimizer.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Bytecode/Lightweight/ReflectionOptimizer.cs 2008-11-26 04:19:41 UTC (rev 3930) +++ trunk/nhibernate/src/NHibernate/Bytecode/Lightweight/ReflectionOptimizer.cs 2008-11-26 12:38:52 UTC (rev 3931) @@ -52,7 +52,7 @@ /// Generates a dynamic method which creates a new instance of <paramref name="type" /> /// when invoked. /// </summary> - private static CreateInstanceInvoker CreateCreateInstanceMethod(System.Type type) + protected virtual CreateInstanceInvoker CreateCreateInstanceMethod(System.Type type) { if (type.IsInterface || type.IsAbstract) { @@ -110,7 +110,7 @@ /// </summary> private GetPropertyValuesInvoker GenerateGetPropertyValuesMethod(IGetter[] getters) { - System.Type[] methodArguments = new System.Type[] {typeof (object), typeof (GetterCallback)}; + System.Type[] methodArguments = new[] {typeof (object), typeof (GetterCallback)}; DynamicMethod method = CreateDynamicMethod(typeof (object[]), methodArguments); ILGenerator il = method.GetILGenerator(); @@ -151,7 +151,7 @@ { // using the getter itself via a callback MethodInfo invokeMethod = typeof (GetterCallback).GetMethod("Invoke", - new System.Type[] {typeof (object), typeof (int)}); + new[] {typeof (object), typeof (int)}); il.Emit(OpCodes.Ldarg_1); il.Emit(OpCodes.Ldarg_0); il.Emit(OpCodes.Ldc_I4, i); @@ -175,7 +175,7 @@ /// <returns></returns> private SetPropertyValuesInvoker GenerateSetPropertyValuesMethod(IGetter[] getters, ISetter[] setters) { - System.Type[] methodArguments = new System.Type[] {typeof (object), typeof (object[]), typeof (SetterCallback)}; + System.Type[] methodArguments = new[] {typeof (object), typeof (object[]), typeof (SetterCallback)}; DynamicMethod method = CreateDynamicMethod(null, methodArguments); ILGenerator il = method.GetILGenerator(); @@ -213,8 +213,7 @@ { // using the setter itself via a callback MethodInfo invokeMethod = typeof (SetterCallback).GetMethod("Invoke", - new System.Type[] - {typeof (object), typeof (int), typeof (object)}); + new[] {typeof (object), typeof (int), typeof (object)}); il.Emit(OpCodes.Ldarg_2); il.Emit(OpCodes.Ldarg_0); il.Emit(OpCodes.Ldc_I4, i); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |