File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 11/*
22 JustMock Lite
3- Copyright © 2010-2015,2018 Progress Software Corporation
3+ Copyright © 2010-2015,2018-2019 Progress Software Corporation
44
55 Licensed under the Apache License, Version 2.0 (the "License");
66 you may not use this file except in compliance with the License.
@@ -94,12 +94,20 @@ private PrivateAccessor(object instance, Type type)
9494#if ( ! COREFX && ! NETCORE )
9595 var realProxy = MockingProxy . GetRealProxy ( instance ) ;
9696 if ( realProxy != null )
97+ {
9798 instance = realProxy . WrappedInstance ;
99+ }
98100#endif
99101 type = instance . GetType ( ) ;
100102 }
101103 if ( type . IsProxy ( ) && type . BaseType != typeof ( object ) )
104+ {
102105 type = type . BaseType ;
106+ }
107+
108+ #if ( ! PORTABLE && ! LITE_EDITION )
109+ Mock . Intercept ( type ) ;
110+ #endif
103111 } ) ;
104112
105113 this . instance = instance ;
@@ -516,8 +524,8 @@ private static bool CheckReflectionPermission()
516524#if ( COREFX )
517525 return false ;
518526#else
519- try
520- {
527+ try
528+ {
521529 new ReflectionPermission ( ReflectionPermissionFlag . MemberAccess ) . Demand ( ) ;
522530 return true ;
523531 }
You can’t perform that action at this time.
0 commit comments