public static Lambda Decompile(this MethodBase mb) { #if DEBUG return(mb.Decompile(Semantics.CSharp35_WithDebugInfo)); #else return(mb.Decompile(Semantics.CSharp35_WithoutDebugInfo)); #endif }
public static Lambda Decompile(this Semantics semantics, MethodBase mb) { var domain = new Domain(semantics); if (semantics == Domain.Current.Semantics) { domain = Domain.Current; } return(mb.Decompile(domain)); }
protected void TestMethodDecompilation(MethodBase mb) { Flash["Method Being Decompiled"] = mb; Func <Lambda> decompile = () => mb.Decompile(Semantics.CSharp35_WithDebugInfo); 1.UpTo(10).Select(_ => decompile().Body).Ping(); var lam = decompile(); Func <String> dumpAsText = () => String.Format("{1}{0}{2}", Environment.NewLine, lam.Sig.DumpAsText(), lam.Body.DumpAsText()); 1.UpTo(10).ForEach(_ => dumpAsText()); var s_actual = dumpAsText(); VerifyResult(s_actual); }
public static Lambda Decompile(this Language language, MethodBase mb) { return(mb.Decompile(new Semantics(language, true))); }