Skip to content
This repository has been archived by the owner on Jan 27, 2019. It is now read-only.

Fix Properties and Events declared as internal failing rename #462

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Confuser.Renamer/AnalyzePhase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -223,11 +224,12 @@ 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);

else if (evt.IsRuntimeSpecialName)
service.SetCanRename(evt, false);
}
}
}
}