From 41861974fb48e816292ae1c0297a5ed87304688c Mon Sep 17 00:00:00 2001 From: RachamimYaakobov Date: Mon, 3 Apr 2017 20:07:59 +0300 Subject: [PATCH] Remove DebuggerDisplayAttribute Remove DebuggerDisplayAttribute from all types --- Confuser.Core/ConfuserEngine.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Confuser.Core/ConfuserEngine.cs b/Confuser.Core/ConfuserEngine.cs index 211da3a56..ca40a9199 100644 --- a/Confuser.Core/ConfuserEngine.cs +++ b/Confuser.Core/ConfuserEngine.cs @@ -372,6 +372,16 @@ static void OptimizeMethods(ConfuserContext context) { } static void EndModule(ConfuserContext context) { + + foreach (var module in context.Modules) + foreach (var type in module.Types) + for (int i = type.CustomAttributes.Count - 1; i > -1; --i) + { + var attribute = type.CustomAttributes[i]; + if (attribute.AttributeType.FullName == "System.Diagnostics.DebuggerDisplayAttribute") + type.CustomAttributes.Remove(attribute); + } + string output = context.Modules[context.CurrentModuleIndex].Location; if (output != null) { if (!Path.IsPathRooted(output)) @@ -535,4 +545,4 @@ static void PrintEnvironmentInfo(ConfuserContext context) { context.Logger.Error("---END DEBUG INFO---"); } } -} \ No newline at end of file +}