The DeclarePublicAPIAnalyzer
analyzer is a popular third-party analyzer developed at the (https://github.com/dotnet/roslyn-analyzers) repo and published as a NuGet package at https://www.nuget.org/packages/Roslyn.Diagnostics.Analyzers. This analyzer helps track the public surface area of a project with additional readable and reviewable text files that live along with the project sources and provide API documentation as a source. For example, consider the following source file with public and non-public symbols:
public class Class1 { public int Field1; public object Property1 => null; public void Method1() { } public void Method1(int x) { } private void Method2() { } }
The additional API surface text file for this type will look as follows:
Class1 Class1.Class1() -> void Class1.Field1 -> int Class1.Method1() -> void Class1.Method1(int x) -> void Class1.Property1.get -> object
There is an entry for every...