Skip to content

Commit 377c78c

Browse files
SND\yck1509_cpSND\yck1509_cp
authored andcommitted
fix attach property's accessors
git-svn-id: https://confuser.svn.codeplex.com/svn@76974 a83551a4-30f6-4d81-a974-c6ced450ddbf
1 parent d61e72d commit 377c78c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Confuser.Core/Analyzers/NameAnalyzer.Baml.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,18 @@ void AnalyzeResource(ModuleDefinition mod, int resId)
403403
{
404404
((field as IAnnotationProvider).Annotations[RenRef] as List<IReference>).Add(new BamlAttributeReference(rec));
405405
}
406+
407+
//Attached property
408+
MethodDefinition getM = types[rec.OwnerTypeId].Methods.SingleOrDefault(p => p.Name == "Get" + rec.Name);
409+
if (getM != null)
410+
{
411+
(getM as IAnnotationProvider).Annotations[RenOk] = false;
412+
}
413+
MethodDefinition setM = types[rec.OwnerTypeId].Methods.SingleOrDefault(p => p.Name == "Set" + rec.Name);
414+
if (setM != null)
415+
{
416+
(setM as IAnnotationProvider).Annotations[RenOk] = false;
417+
}
406418
}
407419
ps.Add(rec.AttributeId, rec.Name);
408420
}

0 commit comments

Comments
 (0)