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 @@ -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) {

22
ICSharpCode.Decompiler/Options.cs

@ -4,19 +4,13 @@ namespace Decompiler @@ -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;
}
}

Loading…
Cancel
Save