Skip to content

Commit

Permalink
Merge pull request #10 from neilt6/patch-1
Browse files Browse the repository at this point in the history
Improved Caliburn Action Detection
  • Loading branch information
PhonicUK authored Jun 16, 2017
2 parents 11bf9e3 + 574f377 commit 7606ad8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Confuser.Renamer/Analyzers/CaliburnAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void AnalyzeBAMLElement(BAMLAnalyzer analyzer, BamlElement elem) {
else if (attr.Item1 != null)
attrName = attr.Item1.Name;

if (attrName == "Attach")
if (attrName == "Attach" || (attrName == "Value" && prop.Value.Contains("Action")))
AnalyzeMessageAttach(analyzer, attr, prop.Value);

if (attrName == "Name")
Expand All @@ -60,7 +60,7 @@ void AnalyzeMessageAttach(BAMLAnalyzer analyzer, Tuple<IDnlibDef, AttributeInfoR
if (attr.Item2 == null)
return;
var attrDeclType = analyzer.ResolveType(attr.Item2.OwnerTypeId);
if (attrDeclType.FullName != "Caliburn.Micro.Message")
if (attrDeclType.FullName != "Caliburn.Micro.Message" && attrDeclType.FullName != "System.Windows.Setter")
return;

foreach (var msg in value.Split(';')) {
Expand Down Expand Up @@ -113,4 +113,4 @@ public void PostRename(ConfuserContext context, INameService service, Protection
//
}
}
}
}

0 comments on commit 7606ad8

Please sign in to comment.