[tuner] handle the case with multiple "preserve" attributes
commit8eae19473d83ac3bf5bb3096da1c82a94d8e33cb
authorRadek Doulik <rodo@xamarin.com>
Thu, 15 Jan 2015 15:16:17 +0000 (15 16:16 +0100)
committerRadek Doulik <rodo@xamarin.com>
Wed, 21 Oct 2015 08:27:30 +0000 (21 10:27 +0200)
treeaabcc56d5bfc90d65234ab90d1fd99ea6ecaa5a3
parente64bc660106ac0ecdaa27427e26ad812db698f08
[tuner] handle the case with multiple "preserve" attributes

 - when more than one "preserve" attribute is set (see IsPreservedAttribute),
   make sure we handle all of them and not just last one
 - fixes https://bugzilla.xamarin.com/show_bug.cgi?id=19391
 - example code which suffered from this issue:

    [Preserve(AllMembers=true)]
    [DataContract]
    public class TestClass
    {
      ...
    }

  later when a method from this class was queried using the reflection,
  it wasn't available as it was linked out
mcs/tools/tuner/Mono.Tuner/ApplyPreserveAttributeBase.cs