{"id":15036391,"url":"https://github.com/msdn-whiteknight/ciltools","last_synced_at":"2025-10-12T02:21:43.577Z","repository":{"id":37389306,"uuid":"176575934","full_name":"MSDN-WhiteKnight/CilTools","owner":"MSDN-WhiteKnight","description":"A set of tools to work with CIL in .NET applications","archived":false,"fork":false,"pushed_at":"2024-09-24T16:03:32.000Z","size":7720,"stargazers_count":28,"open_issues_count":20,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T01:12:54.529Z","etag":null,"topics":["analysis","bytecode","cil","csharp","csharp-library","dotnet","library","msil","parser"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MSDN-WhiteKnight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-03-19T18:34:37.000Z","updated_at":"2025-03-20T17:24:20.000Z","dependencies_parsed_at":"2024-03-17T12:26:35.920Z","dependency_job_id":"22e515a0-5371-4838-8e43-971cd7a19324","html_url":"https://github.com/MSDN-WhiteKnight/CilTools","commit_stats":null,"previous_names":["msdn-whiteknight/cilbytecodeparser"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSDN-WhiteKnight%2FCilTools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSDN-WhiteKnight%2FCilTools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSDN-WhiteKnight%2FCilTools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSDN-WhiteKnight%2FCilTools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MSDN-WhiteKnight","download_url":"https://codeload.github.com/MSDN-WhiteKnight/CilTools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248127016,"owners_count":21052136,"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":["analysis","bytecode","cil","csharp","csharp-library","dotnet","library","msil","parser"],"created_at":"2024-09-24T20:31:01.049Z","updated_at":"2025-10-12T02:21:38.524Z","avatar_url":"https://github.com/MSDN-WhiteKnight.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CIL Tools\n\n![logo](https://msdn-whiteknight.github.io/CilTools/images/IL.png)\n\n**License:** [BSD 2.0](https://gitflic.ru/project/smallsoft/ciltools/blob?file=LICENSE\u0026branch=master)\n\n[![gitflic-catalog](https://img.shields.io/badge/gitflic--catalog-blue)](https://gitflic.ru/project/smallsoft/gitflic-catalog) \u0026nbsp; [![GitHub release (latest by date)](https://img.shields.io/github/v/release/MSDN-WhiteKnight/CilTools)](https://github.com/MSDN-WhiteKnight/CilTools/releases)\n\n[Documentation](https://msdn-whiteknight.github.io/CilTools/) | [Examples](Examples/)\n\nCIL tools is a set of software to work with Common Intermediate Language in .NET.\n\nLibraries:\n\n- [CilTools.BytecodeAnalysis](https://www.nuget.org/packages/CilTools.BytecodeAnalysis/) - inspect or disassemble bytecode of methods\n- [CilTools.Runtime](https://www.nuget.org/packages/CilTools.Runtime/) - inspect assemblies from external .NET process\n- [CilTools.Metadata](https://www.nuget.org/packages/CilTools.Metadata/) - inspect assembly via reflection without loading it into the current process\n- [CilTools.SourceCode](https://www.nuget.org/packages/CilTools.SourceCode/) - provides APIs that assist in lexical analysis of source code\n\nApplications:\n\n- [CilTools.CommandLine](https://www.nuget.org/packages/CilTools.CommandLine/) - cross-platform command line disassembler tool\n- [CIL View](https://gitflic.ru/project/smallsoft/ciltools/file?file=CilView\u0026branch=master) - graphical CIL viewer application for Windows\n\n## Using CilTools.BytecodeAnalysis\n\n**Requirements:** .NET Framework 3.5+ or .NET Standard 2.0+ \n\n[![Nuget](https://img.shields.io/nuget/v/CilTools.BytecodeAnalysis)](https://www.nuget.org/packages/CilTools.BytecodeAnalysis/)\n\nCilTools.BytecodeAnalysis reads .NET methods' Common Intermediate Language (CIL) bytecode and converts it into high-level objects or textual CIL representation so they can be easily studied and programmatically processed.\n\n*Usage*\n\nAdd reference to CilTools.BytecodeAnalysis.dll, import CilTools.BytecodeAnalysis namespace. Use CilReader.GetInstructions to get the collection of instructions from method, CilGraph.Create to get a graph that represents a flow of control between method's instructions, or CilAnalysis.MethodToText when you need to output method's CIL code as text. CilTools.BytecodeAnalysis.Extensions namespace provides an alternative syntax via extension methods.\n\n*Example*\n\n```\nusing System;\nusing System.Collections.Generic;\nusing CilTools.BytecodeAnalysis;\nusing CilTools.BytecodeAnalysis.Extensions;\n\nnamespace CilToolsExample\n{\n    class Program\n    {\n        public static void Hello()\n        {\n            int a = 1;\n            int b = 2;\n            Console.WriteLine(\"Hello, World\");\n            Console.WriteLine(\"{0} + {1} = {2}\",a,b,a+b);\n        }\n\n        static void Main(string[] args)\n        {\n            IEnumerable\u003cCilInstruction\u003e instructions = typeof(Program).GetMethod(\"Hello\").GetInstructions();\n\n            foreach (CilInstruction instr in instructions)\n            {\n                Console.WriteLine(instr.ToString());\n            }\n            Console.ReadKey();\n        }\n\n    }\n}\n\n/* Output:\n\nnop\nldc.i4.1\nstloc.0\nldc.i4.2\nstloc.1\nldstr      \"Hello, World\"\ncall       void [mscorlib]System.Console::WriteLine(string)\nnop\nldstr      \"{0} \\053 {1} \\075 {2}\"\nldloc.0\nbox        [mscorlib]System.Int32\nldloc.1\nbox        [mscorlib]System.Int32\nldloc.0\nldloc.1\nadd\nbox        [mscorlib]System.Int32\ncall       void [mscorlib]System.Console::WriteLine(string, object, object, object)\nnop\nret\n*/\n```\n\nFor more information, see [documentation](https://msdn-whiteknight.github.io/CilTools/articles/using-bytecode-analysis.html).\n\n---\n\nCopyright (c) 2023,  SmallSoft\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsdn-whiteknight%2Fciltools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsdn-whiteknight%2Fciltools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsdn-whiteknight%2Fciltools/lists"}