Scan Report
Scan Report
Section titled “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:
AssemblyScanReportslists the selected assemblies.TypeScanReportsgroups selected types by every assembly that was scanned. An assembly remains in the report even when no types matched.ServiceDescriptorScanReportsgroups emitted service descriptors by every assembly that was scanned. Each descriptor carries its effectiveServiceLifetime, 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.
Opting Out
Section titled “Opting Out”Scan reports are generated by default. Disable them with:
<PropertyGroup> <SpecularGenerateDiagnostics>false</SpecularGenerateDiagnostics></PropertyGroup>
