|
|
|
@ -812,14 +812,6 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms
@@ -812,14 +812,6 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Destructor
|
|
|
|
|
static readonly MethodDeclaration destructorPattern = new MethodDeclaration { |
|
|
|
|
Attributes = { new Repeat(new AnyNode()) }, |
|
|
|
|
Modifiers = Modifiers.Any, |
|
|
|
|
ReturnType = new PrimitiveType("void"), |
|
|
|
|
Name = "Finalize", |
|
|
|
|
Body = destructorBodyPattern |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
static readonly BlockStatement destructorBodyPattern = new BlockStatement { |
|
|
|
|
new TryCatchStatement { |
|
|
|
|
TryBlock = new AnyNode("body"), |
|
|
|
@ -829,6 +821,14 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms
@@ -829,6 +821,14 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
static readonly MethodDeclaration destructorPattern = new MethodDeclaration { |
|
|
|
|
Attributes = { new Repeat(new AnyNode()) }, |
|
|
|
|
Modifiers = Modifiers.Any, |
|
|
|
|
ReturnType = new PrimitiveType("void"), |
|
|
|
|
Name = "Finalize", |
|
|
|
|
Body = destructorBodyPattern |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
DestructorDeclaration TransformDestructor(MethodDeclaration methodDef) |
|
|
|
|
{ |
|
|
|
|
Match m = destructorPattern.Match(methodDef); |
|
|
|
|