From 8bab3f81f28ef50d42234e76249f7acac84975a5 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Sat, 23 Jan 2016 03:08:56 +0100 Subject: [PATCH] [linker] Add API to notify subclasses of removed attributes. --- mcs/tools/tuner/Mono.Tuner/RemoveAttributesBase.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) { } } } -- 2.25.1