Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Generate
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22636/DotNetMock/Dynamic/Generate
Modified Files:
MockClassBuilder.cs
Log Message:
BUG [ 1194538 ] MethodCall::MethodName property has "somewhat-invalid" logic
* needed to pass through the SpecialName attribute to the created mock method on the proxy type.
* added check for IsSpecialName in handling of property access method calls.
Index: MockClassBuilder.cs
===================================================================
RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Generate/MockClassBuilder.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** MockClassBuilder.cs 23 Apr 2005 21:53:33 -0000 1.3
--- MockClassBuilder.cs 11 May 2005 04:08:32 -0000 1.4
***************
*** 149,156 ****
"Cannot add methods after class has been compiled."
);
! }
MethodBuilder methodBuilder = _typeBuilder.DefineMethod(
methodName,
! MethodAttributes.Public | MethodAttributes.Virtual,
returnType,
parameterTypes
--- 149,163 ----
"Cannot add methods after class has been compiled."
);
! }
! MethodAttributes attributes = MethodAttributes.Public |
! MethodAttributes.Virtual;
! if ( mi!=null )
! {
! // only overlay SpecialName attribute
! attributes |= mi.Attributes & (MethodAttributes.SpecialName);
! }
MethodBuilder methodBuilder = _typeBuilder.DefineMethod(
methodName,
! attributes,
returnType,
parameterTypes
|