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

Commit

Permalink
Fix checking renPublic on members of type
Browse files Browse the repository at this point in the history
Fix #439
  • Loading branch information
yck1509 committed Feb 18, 2016
1 parent 3c957a2 commit c0d6670
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Confuser.Renamer/AnalyzePhase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ void Analyze(NameService service, ConfuserContext context, ProtectionParameters
}

void Analyze(NameService service, ConfuserContext context, ProtectionParameters parameters, MethodDef method) {
if (method.DeclaringType.IsVisibleOutside() &&
if (IsVisibleOutside(context, parameters, method.DeclaringType) &&
(method.IsFamily || method.IsFamilyOrAssembly || method.IsPublic) &&
IsVisibleOutside(context, parameters, method))
service.SetCanRename(method, false);
Expand All @@ -174,7 +174,7 @@ void Analyze(NameService service, ConfuserContext context, ProtectionParameters
}

void Analyze(NameService service, ConfuserContext context, ProtectionParameters parameters, FieldDef field) {
if (field.DeclaringType.IsVisibleOutside() &&
if (IsVisibleOutside(context, parameters, field.DeclaringType) &&
(field.IsFamily || field.IsFamilyOrAssembly || field.IsPublic) &&
IsVisibleOutside(context, parameters, field))
service.SetCanRename(field, false);
Expand All @@ -194,7 +194,7 @@ void Analyze(NameService service, ConfuserContext context, ProtectionParameters
}

void Analyze(NameService service, ConfuserContext context, ProtectionParameters parameters, PropertyDef property) {
if (property.DeclaringType.IsVisibleOutside() &&
if (IsVisibleOutside(context, parameters, property.DeclaringType) &&
IsVisibleOutside(context, parameters, property))
service.SetCanRename(property, false);

Expand All @@ -212,7 +212,7 @@ void Analyze(NameService service, ConfuserContext context, ProtectionParameters
}

void Analyze(NameService service, ConfuserContext context, ProtectionParameters parameters, EventDef evt) {
if (evt.DeclaringType.IsVisibleOutside() &&
if (IsVisibleOutside(context, parameters, evt.DeclaringType) &&
IsVisibleOutside(context, parameters, evt))
service.SetCanRename(evt, false);

Expand Down

0 comments on commit c0d6670

Please sign in to comment.