Browse Source

Update documentation in CustomLanguage

pull/863/head
Siegfried Pammer 8 years ago
parent
commit
952880f400
  1. 20
      TestPlugin/CustomLanguage.cs

20
TestPlugin/CustomLanguage.cs

@ -41,16 +41,18 @@ namespace TestPlugin
smartOutput.AddButton(null, "Click me!", (sender, e) => (sender as Button).Content = "I was clicked!"); smartOutput.AddButton(null, "Click me!", (sender, e) => (sender as Button).Content = "I was clicked!");
smartOutput.WriteLine(); smartOutput.WriteLine();
} }
// ICSharpCode.Decompiler.Ast.AstBuilder can be used to decompile to C# // ICSharpCode.Decompiler.CSharp.CSharpDecompiler can be used to decompile to C#.
/* /*
AstBuilder b = new AstBuilder(new DecompilerContext(method.Module) { ModuleDefinition module = LoadModule(assemblyFileName);
Settings = options.DecompilerSettings, var typeSystem = new DecompilerTypeSystem(module);
CurrentType = method.DeclaringType CSharpDecompiler decompiler = new CSharpDecompiler(typeSystem, new DecompilerSettings());
});
b.AddMethod(method); decompiler.AstTransforms.Add(new EscapeInvalidIdentifiers());
b.RunTransformations(); SyntaxTree syntaxTree = decompiler.DecompileWholeModuleAsSingleFile();
output.WriteLine("Decompiled AST has {0} nodes", b.SyntaxTree.DescendantsAndSelf.Count());*/ var visitor = new CSharpOutputVisitor(output, FormattingOptionsFactory.CreateSharpDevelop());
syntaxTree.AcceptVisitor(visitor);
*/
} }
} }
} }

Loading…
Cancel
Save