From cb973e0c744d38abf10db2324c6f26a8479e9646 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Tue, 8 Feb 2011 21:41:31 +0100 Subject: [PATCH] Make static Options readonly (will likely be removed later) --- ICSharpCode.Decompiler/Ast/AstBuilder.cs | 2 -- ICSharpCode.Decompiler/Options.cs | 22 ++++++++-------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/ICSharpCode.Decompiler/Ast/AstBuilder.cs b/ICSharpCode.Decompiler/Ast/AstBuilder.cs index e94cfb4c3..85fe952e0 100644 --- a/ICSharpCode.Decompiler/Ast/AstBuilder.cs +++ b/ICSharpCode.Decompiler/Ast/AstBuilder.cs @@ -116,8 +116,6 @@ namespace Decompiler public void AddType(TypeDefinition typeDef) { - if (!string.IsNullOrEmpty(Options.TypeFilter) && typeDef.Name != Options.TypeFilter) return; - TypeDeclaration astType = CreateType(typeDef); NamespaceDeclaration astNS = GetCodeNamespace(typeDef.Namespace); if (astNS != null) { diff --git a/ICSharpCode.Decompiler/Options.cs b/ICSharpCode.Decompiler/Options.cs index 7c9091ab7..d3aa421e1 100644 --- a/ICSharpCode.Decompiler/Options.cs +++ b/ICSharpCode.Decompiler/Options.cs @@ -4,19 +4,13 @@ namespace Decompiler { public static class Options { - public static string TypeFilter = null; - public static int CollapseExpression = 1000; - public static int ReduceGraph = 1000; - public static bool NodeComments = false; - public static bool ReduceLoops = true; - public static bool ReduceConditonals = true; - public static bool ReduceAstJumps = true; - public static bool ReduceAstLoops = true; - public static bool ReduceAstOther = true; - } - - class StopOptimizations: Exception - { - + public static readonly int CollapseExpression = 1000; + public static readonly int ReduceGraph = 1000; + public static readonly bool NodeComments = false; + public static readonly bool ReduceLoops = true; + public static readonly bool ReduceConditonals = true; + public static readonly bool ReduceAstJumps = true; + public static readonly bool ReduceAstLoops = true; + public static readonly bool ReduceAstOther = true; } }