Skip to content

Scan Report

Specular generates a public SpecularScanReport class alongside SpecularProvider. Its GetScanResults() method returns a Specular.Diagnostics.ScanResults value containing every assembly, type, and service-descriptor scan resolved during compilation.

var results = SpecularScanReport.GetScanResults();

Each report includes the name of the assembly that defined the scan expression and its selector expression normalized to one line. The result collections are grouped by scan kind:

  • AssemblyScanReports lists the selected assemblies.
  • TypeScanReports groups selected types by every assembly that was scanned. An assembly remains in the report even when no types matched.
  • ServiceDescriptorScanReports groups emitted service descriptors by every assembly that was scanned. Each descriptor carries its effective ServiceLifetime, registered service type name, and implementation type name. Empty scan results are retained.

The report is pure compile-time metadata: it does not perform reflection or add trim/AOT requirements. It is suitable for tooling such as an external Mermaid renderer.

Scan reports are generated by default. Disable them with:

<PropertyGroup>
<SpecularGenerateDiagnostics>false</SpecularGenerateDiagnostics>
</PropertyGroup>