{"id":21047108,"url":"https://github.com/stakx/delegatedecompiler","last_synced_at":"2025-04-12T16:10:38.237Z","repository":{"id":131344202,"uuid":"98230865","full_name":"stakx/DelegateDecompiler","owner":"stakx","description":"Simple .NET decompiler that turns compiled methods back into LINQ expression trees.","archived":false,"fork":false,"pushed_at":"2017-07-25T21:00:26.000Z","size":23,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-04-04T18:52:05.474Z","etag":null,"topics":["decompilation","dotnet","expression-tree","il","intermediate-language","linq"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stakx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-24T20:13:02.000Z","updated_at":"2024-08-30T21:42:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"8694c81c-2dbc-4481-84d5-b905e35e8384","html_url":"https://github.com/stakx/DelegateDecompiler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stakx%2FDelegateDecompiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stakx%2FDelegateDecompiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stakx%2FDelegateDecompiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stakx%2FDelegateDecompiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stakx","download_url":"https://codeload.github.com/stakx/DelegateDecompiler/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248594140,"owners_count":21130312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decompilation","dotnet","expression-tree","il","intermediate-language","linq"],"created_at":"2024-11-19T14:35:27.747Z","updated_at":"2025-04-12T16:10:38.195Z","avatar_url":"https://github.com/stakx.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DelegateDecompiler #\n\nProof-of-concept utility library that decompiles delegates (`Action`, `Func\u003cT\u003e`, etc.) into LINQ expression trees (`Expression\u003cAction\u003e`, `Expression\u003cFunc\u003cT\u003e\u003e`, etc.).\n\n\n### Short demonstration ###\n\n```csharp\ninterface IFoo\n{\n    IBar Bar { get; }\n}\n\ninterface IBar\n{\n    string Property { get; set; }\n}\n\n// This is the lambda we're going to decompile from IL:\nint message = \"Hello world.\";\nAction\u003cIFoo\u003e action = foo =\u003e foo.Bar.Property = message;\n\n// Decompile it into an expression tree:\nExpression expr = action.Decompile();\n\n// Replace property accessor methods with more semantic property expressions:\nexpr = new SpecialNameMethodReplacer().Visit(expr);\n\n// Evaluate captured variables to their value:\nexpr = new PartialEvaluator().Visit(expr);\n\n// Show the result:\nConsole.WriteLine(expr);  // =\u003e foo =\u003e (foo.Bar.Property = \"Hello world!\")\n```\n\n\n### Limitations ###\n\n* Multi-statement methods are not yet supported.\n\n* Conditionals, branches, and exception handling are not supported (and probably won't be).\n\n* Currently, this library only targets the full .NET Framework. (Targeting .NET Standard 2.0 should be possible with only a few minor modifications. Earlier .NET Standard versions likely cannot be supported due to missing APIs.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstakx%2Fdelegatedecompiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstakx%2Fdelegatedecompiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstakx%2Fdelegatedecompiler/lists"}