Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Generate
In directory usw-pr-cvs1:/tmp/cvs-serv28292/DotNetMock/Dynamic/Generate
Modified Files:
ClassGenerator.cs
Log Message:
Index: ClassGenerator.cs
===================================================================
RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Generate/ClassGenerator.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ClassGenerator.cs 12 Oct 2002 03:29:53 -0000 1.1
--- ClassGenerator.cs 30 Oct 2002 04:16:32 -0000 1.2
***************
*** 3,6 ****
--- 3,7 ----
using System.Reflection;
using System.Reflection.Emit;
+ using System.Security;
namespace DotNetMock.Dynamic.Generate
***************
*** 9,13 ****
{
private static IDictionary boxingOpCodes;
!
public object Generate(Type type, IMock mock)
{
--- 10,14 ----
{
private static IDictionary boxingOpCodes;
!
public object Generate(Type type, IMock mock)
{
***************
*** 116,125 ****
il.MarkLabel(l);
il.Emit(OpCodes.Ldloc_0);
! }
il.Emit(OpCodes.Ret);
}
! public OpCode GetBoxingOpCode( Type aType )
{
if (boxingOpCodes == null)
--- 117,126 ----
il.MarkLabel(l);
il.Emit(OpCodes.Ldloc_0);
! }
il.Emit(OpCodes.Ret);
}
! public OpCode GetBoxingOpCode( Type currentType )
{
if (boxingOpCodes == null)
***************
*** 139,145 ****
boxingOpCodes[typeof(bool)] = OpCodes.Ldind_I1;
}
! if (boxingOpCodes.Contains(aType))
{
! return (OpCode)boxingOpCodes[aType];
}
else
--- 140,146 ----
boxingOpCodes[typeof(bool)] = OpCodes.Ldind_I1;
}
! if (boxingOpCodes.Contains(currentType))
{
! return (OpCode)boxingOpCodes[currentType];
}
else
***************
*** 150,153 ****
}
!
}
--- 151,155 ----
}
!
!
}
|