@@ -155,7 +155,7 @@ void Analyze(NameService service, ConfuserContext context, ProtectionParameters
155155 }
156156
157157 void Analyze ( NameService service , ConfuserContext context , ProtectionParameters parameters , MethodDef method ) {
158- if ( method . DeclaringType . IsVisibleOutside ( ) &&
158+ if ( IsVisibleOutside ( context , parameters , method . DeclaringType ) &&
159159 ( method . IsFamily || method . IsFamilyOrAssembly || method . IsPublic ) &&
160160 IsVisibleOutside ( context , parameters , method ) )
161161 service . SetCanRename ( method , false ) ;
@@ -174,7 +174,7 @@ void Analyze(NameService service, ConfuserContext context, ProtectionParameters
174174 }
175175
176176 void Analyze ( NameService service , ConfuserContext context , ProtectionParameters parameters , FieldDef field ) {
177- if ( field . DeclaringType . IsVisibleOutside ( ) &&
177+ if ( IsVisibleOutside ( context , parameters , field . DeclaringType ) &&
178178 ( field . IsFamily || field . IsFamilyOrAssembly || field . IsPublic ) &&
179179 IsVisibleOutside ( context , parameters , field ) )
180180 service . SetCanRename ( field , false ) ;
@@ -194,7 +194,7 @@ void Analyze(NameService service, ConfuserContext context, ProtectionParameters
194194 }
195195
196196 void Analyze ( NameService service , ConfuserContext context , ProtectionParameters parameters , PropertyDef property ) {
197- if ( property . DeclaringType . IsVisibleOutside ( ) &&
197+ if ( IsVisibleOutside ( context , parameters , property . DeclaringType ) &&
198198 IsVisibleOutside ( context , parameters , property ) )
199199 service . SetCanRename ( property , false ) ;
200200
@@ -212,7 +212,7 @@ void Analyze(NameService service, ConfuserContext context, ProtectionParameters
212212 }
213213
214214 void Analyze ( NameService service , ConfuserContext context , ProtectionParameters parameters , EventDef evt ) {
215- if ( evt . DeclaringType . IsVisibleOutside ( ) &&
215+ if ( IsVisibleOutside ( context , parameters , evt . DeclaringType ) &&
216216 IsVisibleOutside ( context , parameters , evt ) )
217217 service . SetCanRename ( evt , false ) ;
218218
0 commit comments