An open API service indexing awesome lists of open source software.

https://github.com/r3c/nbrowse

Playing with Roslyn's CSharpScript API to browse .NET assemblies
https://github.com/r3c/nbrowse

code-analysis disassembler disassembly dotnet ndepend net-assemblies

Last synced: 5 months ago
JSON representation

Playing with Roslyn's CSharpScript API to browse .NET assemblies

Awesome Lists containing this project

README

          

# NBrowse: .NET assembly query utility

[![Build Status](https://img.shields.io/github/actions/workflow/status/r3c/nbrowse/verify.yml?branch=master)](https://github.com/r3c/nbrowse/actions/workflows/verify.yml)
[![License](https://img.shields.io/github/license/r3c/nbrowse.svg)](https://opensource.org/licenses/MIT)

## Overview

NBrowse is a command-line utility to browse and execute search queries in .NET
compiled assemblies. It exposes loaded assemblies through a standard set of
traversable entities (e.g. "assembly", "project", "type", "method", etc.) and
running C# statements to query anything you want to retrieve from them.

You can think of it as a stripped down [NDepend](https://www.ndepend.com/)
equivalent with no graphical interface.

This example will search in assembly `NBrowse.dll` for every type that
implements interface `IPrinter` and print them to standard output:

$ dotnet NBrowse.CLI.dll '
project // From current project
.Assemblies // ...pick all loaded assemblies
.SelectMany(a => a.Types) // ...find their declared types
.Where(t => // ...keep those implementing interface `IPrinter`
t.Interfaces.Any(i => i.Name == "IPrinter"))' NBrowse.dll

## Usage

Download latest [release](https://github.com/r3c/nbrowse/releases) from GitHub
or checkout code and build using your preferred
[.NET](https://dotnet.microsoft.com/download) SDK.

Once you have a NBrowse.CLI executable file, run it with `-h` command line
argument to display help.

$ dotnet NBrowse.CLI -h

## Resource

- Contact: v.github.com+nbrowse [at] mirari [dot] fr
- License: [license.md](license.md)