Vixen
02b45cc4
csharp
public static class ApiSurfaceReader

Reads the publicly visible surface of a compiled assembly as a sorted list of one-line entries, which is the form a baseline file can be diffed in.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The surface is read from the assembly rather than from source. A source-based reading would have to reproduce what the compiler does with partial types, generators, conditional compilation and InternalsVisibleTo; the assembly is what consumers actually reference, and it is the same artefact Pack ships.

One line per API element, sorted ordinally. That is the whole design: a line is either there or it is not, an addition is one added line, and a signature change is one line removed and one added — which makes the review of an API change a review of a diff.

Methods (2)

  • public static IReadOnlyList<string> Read(string assemblyPath)

    Reads the surface of the assembly at .

  • public static IReadOnlyList<string> Read(IAssemblySymbol assembly)

    Reads the surface of an already-resolved assembly symbol.

Used by (1)

  • ApiSurfaceReaderTestsVixen.ApiCheck.Tests