Class PublicApiSurfaceTestUtil
- Namespace
- Invex.RepoUtils.TestUtils
- Assembly
- Invex.RepoUtils.TestUtils.dll
A test helper that captures the public API surface of an assembly as JSON, for use in snapshot tests that detect unintended public API changes.
public sealed class PublicApiSurfaceTestUtil
- Inheritance
-
objectPublicApiSurfaceTestUtil
Constructors
PublicApiSurfaceTestUtil()
public PublicApiSurfaceTestUtil()
Methods
GetPublicApiSurface(Assembly)
Gets a JSON description of the public types declared in assembly and their public
members.
public static string GetPublicApiSurface(Assembly assembly)
Parameters
assemblyAssemblyThe assembly whose public API surface to capture.
Returns
- string
A JSON array with one entry per top-level public type, ordered by full name, each listing the names of its declared public instance and static fields, properties and methods (excluding constructors, accessors and other special-name methods), ordered by name.
Remarks
Nested types are not included. Members are recorded by name only, so overloads appear once per overload and signature changes that keep the same name are not detected.