From: Rolf Bjarne Kvinge Date: Sat, 23 Jan 2016 02:08:56 +0000 (+0100) Subject: [linker] Add API to notify subclasses of removed attributes. X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mono.git;a=commitdiff_plain;h=8bab3f81f28ef50d42234e76249f7acac84975a5 [linker] Add API to notify subclasses of removed attributes. --- diff --git a/mcs/tools/tuner/Mono.Tuner/RemoveAttributesBase.cs b/mcs/tools/tuner/Mono.Tuner/RemoveAttributesBase.cs index 9f7872f7a7d..61101809fd4 100644 --- a/mcs/tools/tuner/Mono.Tuner/RemoveAttributesBase.cs +++ b/mcs/tools/tuner/Mono.Tuner/RemoveAttributesBase.cs @@ -88,13 +88,16 @@ namespace Mono.Tuner { return; for (int i = 0; i < provider.CustomAttributes.Count; i++) { - if (!IsRemovedAttribute (provider.CustomAttributes [i])) + var attrib = provider.CustomAttributes [i]; + if (!IsRemovedAttribute (attrib)) continue; + WillRemoveAttribute (provider, attrib); provider.CustomAttributes.RemoveAt (i--); } } protected abstract bool IsRemovedAttribute (CustomAttribute attribute); + protected virtual void WillRemoveAttribute (ICustomAttributeProvider provider, CustomAttribute attribute) { } } }