diff --git a/Confuser.Renamer/AnalyzePhase.cs b/Confuser.Renamer/AnalyzePhase.cs index 2207167c7..d0e2697f0 100644 --- a/Confuser.Renamer/AnalyzePhase.cs +++ b/Confuser.Renamer/AnalyzePhase.cs @@ -205,6 +205,7 @@ void Analyze(NameService service, ConfuserContext context, ProtectionParameters void Analyze(NameService service, ConfuserContext context, ProtectionParameters parameters, PropertyDef property) { if (IsVisibleOutside(context, parameters, property.DeclaringType) && + property.IsPublic() && IsVisibleOutside(context, parameters, property)) service.SetCanRename(property, false); @@ -223,6 +224,7 @@ void Analyze(NameService service, ConfuserContext context, ProtectionParameters void Analyze(NameService service, ConfuserContext context, ProtectionParameters parameters, EventDef evt) { if (IsVisibleOutside(context, parameters, evt.DeclaringType) && + evt.IsPublic() && IsVisibleOutside(context, parameters, evt)) service.SetCanRename(evt, false); @@ -230,4 +232,4 @@ void Analyze(NameService service, ConfuserContext context, ProtectionParameters service.SetCanRename(evt, false); } } -} \ No newline at end of file +}