Browse Source

Make static Options readonly (will likely be removed later)

pull/1/head^2
Daniel Grunwald 15 years ago
parent
commit
cb973e0c74
  1. 2
      ICSharpCode.Decompiler/Ast/AstBuilder.cs
  2. 22
      ICSharpCode.Decompiler/Options.cs

2
ICSharpCode.Decompiler/Ast/AstBuilder.cs

@ -116,8 +116,6 @@ namespace Decompiler
public void AddType(TypeDefinition typeDef) public void AddType(TypeDefinition typeDef)
{ {
if (!string.IsNullOrEmpty(Options.TypeFilter) && typeDef.Name != Options.TypeFilter) return;
TypeDeclaration astType = CreateType(typeDef); TypeDeclaration astType = CreateType(typeDef);
NamespaceDeclaration astNS = GetCodeNamespace(typeDef.Namespace); NamespaceDeclaration astNS = GetCodeNamespace(typeDef.Namespace);
if (astNS != null) { if (astNS != null) {

22
ICSharpCode.Decompiler/Options.cs

@ -4,19 +4,13 @@ namespace Decompiler
{ {
public static class Options public static class Options
{ {
public static string TypeFilter = null; public static readonly int CollapseExpression = 1000;
public static int CollapseExpression = 1000; public static readonly int ReduceGraph = 1000;
public static int ReduceGraph = 1000; public static readonly bool NodeComments = false;
public static bool NodeComments = false; public static readonly bool ReduceLoops = true;
public static bool ReduceLoops = true; public static readonly bool ReduceConditonals = true;
public static bool ReduceConditonals = true; public static readonly bool ReduceAstJumps = true;
public static bool ReduceAstJumps = true; public static readonly bool ReduceAstLoops = true;
public static bool ReduceAstLoops = true; public static readonly bool ReduceAstOther = true;
public static bool ReduceAstOther = true;
}
class StopOptimizations: Exception
{
} }
} }

Loading…
Cancel
Save