File tree Expand file tree Collapse file tree
MethodBoundaryAspect.Fody.UnitTests.TestProgram.NetFramework
MethodBoundaryAspect.Fody Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,9 +12,6 @@ private static void Main()
1212 Debugger . Launch ( ) ;
1313 Debugger . Break ( ) ;
1414
15- var t0 = new WrongDebugVariableNames ( ) ;
16- t0 . Call ( ) ;
17-
1815 var t1 = new LogTest ( ) ;
1916 t1 . DoIt ( 7 ) ;
2017
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ private static MethodDefinition CloneMethod(MethodDefinition method)
9898 } ;
9999
100100 foreach ( var parameter in method . Parameters )
101- clonedMethod . Parameters . Add ( parameter ) ;
101+ clonedMethod . Parameters . Add ( parameter ) ;
102102
103103 foreach ( var variable in method . Body . Variables )
104104 clonedMethod . Body . Variables . Add ( variable ) ;
@@ -162,7 +162,22 @@ private static MethodDefinition CloneMethod(MethodDefinition method)
162162 }
163163 }
164164
165- clonedMethod . DebugInformation . Scope = method . DebugInformation . Scope ;
165+ if ( method . DebugInformation . HasSequencePoints )
166+ {
167+ foreach ( var sequencePoint in method . DebugInformation . SequencePoints )
168+ clonedMethod . DebugInformation . SequencePoints . Add ( sequencePoint ) ;
169+ }
170+
171+ clonedMethod . DebugInformation . Scope = new ScopeDebugInformation ( method . Body . Instructions . First ( ) , method . Body . Instructions . Last ( ) ) ;
172+
173+ if ( method . DebugInformation ? . Scope ? . Variables != null )
174+ {
175+ foreach ( var variableDebugInformation in method . DebugInformation . Scope . Variables )
176+ {
177+ clonedMethod . DebugInformation . Scope . Variables . Add ( variableDebugInformation ) ;
178+ }
179+ }
180+
166181 return clonedMethod ;
167182 }
168183
You can’t perform that action at this time.
0 commit comments