File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Rubberduck.Main/ComClientLibrary/UnitTesting Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ public void DateCallback(IntPtr retVal)
2424 }
2525 if ( PassThrough )
2626 {
27- FakesProvider . SuspendFake ( " Now" ) ;
27+ FakesProvider . SuspendFake ( typeof ( Now ) ) ;
2828 var nativeCall = Marshal . GetDelegateForFunctionPointer < DateDelegate > ( NativeFunctionAddress ) ;
2929 nativeCall ( retVal ) ;
30- FakesProvider . ResumeFake ( " Now" ) ;
30+ FakesProvider . ResumeFake ( typeof ( Now ) ) ;
3131 return ;
3232 }
3333 Marshal . GetNativeVariantForObject ( ReturnValue ?? 0 , retVal ) ;
Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ public void TimeCallback(IntPtr retVal)
2424 }
2525 if ( PassThrough )
2626 {
27- FakesProvider . SuspendFake ( " Now" ) ;
27+ FakesProvider . SuspendFake ( typeof ( Now ) ) ;
2828 var nativeCall = Marshal . GetDelegateForFunctionPointer < TimeDelegate > ( NativeFunctionAddress ) ;
2929 nativeCall ( retVal ) ;
30- FakesProvider . ResumeFake ( " Now" ) ;
30+ FakesProvider . ResumeFake ( typeof ( Now ) ) ;
3131 return ;
3232 }
3333 Marshal . GetNativeVariantForObject ( ReturnValue ?? 0 , retVal ) ;
Original file line number Diff line number Diff line change @@ -37,23 +37,23 @@ public void StartTest()
3737 CodeIsUnderTest = true ;
3838 }
3939
40- public static void SuspendFake ( String typename )
40+ public static void SuspendFake ( Type type )
4141 {
4242 foreach ( var fake in ActiveFakes . Values )
4343 {
44- if ( fake . GetType ( ) . Name == typename )
44+ if ( fake . GetType ( ) == type )
4545 {
4646 fake . DisableHook ( ) ;
4747 return ;
4848 }
4949 }
5050 }
5151
52- public static void ResumeFake ( String typename )
52+ public static void ResumeFake ( Type type )
5353 {
5454 foreach ( var fake in ActiveFakes . Values )
5555 {
56- if ( fake . GetType ( ) . Name == typename )
56+ if ( fake . GetType ( ) == type )
5757 {
5858 fake . EnableHook ( ) ;
5959 return ;
You can’t perform that action at this time.
0 commit comments