icsharpcode/ILSpy — pull request #401 by vwoodzell (2013-04-30 23:23:48+00:00)
Title: Baml reader markup extension bug fix

This commit fixes a bug which causes some property assignments to be omitted from decompiled xaml.

In some cases the `XmlBamlReader` puts markup extension attributes after child elements in the list of nodes. However, the `MoveToNextAttribute()` method assumes that the attributes all appear before any nested elements in the list, so these attributes are omitted from the output. This commit ensures that markup extension attributes are inserted into the node list before any child elements.

As far as I can tell, the bug is exercised by funny property ordering in the baml. I haven't been able to reproduce it in an assembly of my own, but I ran across it in one of the System Center 2012 SP1 assemblies. (Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.dll, resource notification/subscriptions/page1_general.baml. There's a `ComboBox` whose `SelectedItem` binding doesn't show up in the decompiled xaml.)