LinkVerificationServiceBuilder
Pennington.Infrastructure
Shared builder for LinkVerificationService instances. Both the in-pipeline per-page verifier (PageLinkVerifier) and the corpus-wide build auditor (LinkAuditor) collect the same (knownRoutes, copiedAssetPaths, MapGet) triple from the content surface. Artifact-tier URLs are folded in one of two ways, selected by enumerateArtifactRoutes:
false(request path): only the cheap, options-derivedClaimsare folded — a link into a claimed territory is trusted. Artifact discovery fans out through the site projection, which must never run on the request path (seeISiteProjection).true(build mode): exact artifact routes are enumerated into the known set and no claims are folded, so a typo inside a claimed territory is still flagged.
Methods
BuildAsync
#public static Task<LinkVerificationService> BuildAsync(IEnumerable<IContentService> contentServices, IEnumerable<IArtifactContentService> artifactServices, EndpointDataSource endpointDataSource, OutputOptions outputOptions, bool enumerateArtifactRoutes, IFileProvider webRootFileProvider = null, CancellationToken cancellationToken = default)
Builds a verifier from the content services, artifact services, endpoint table, and output options. Pass enumerateArtifactRoutes=true only from build-mode callers. Pass webRootFileProvider (the host's WebRootFileProvider) so wwwroot/RCL assets — copied by the build but owned by no content service — are treated as known assets.
Parameters
contentServicesIEnumerable<IContentService>artifactServicesIEnumerable<IArtifactContentService>endpointDataSourceEndpointDataSourceoutputOptionsOutputOptionsenumerateArtifactRoutesboolwebRootFileProviderIFileProvidercancellationTokenCancellationToken
Returns
Task<LinkVerificationService>Pennington.Infrastructure.LinkVerificationServiceBuilder
namespace Pennington.Infrastructure;
/// Shared builder for LinkVerificationService instances. Both the in-pipeline per-page verifier (PageLinkVerifier) and the corpus-wide build auditor (LinkAuditor) collect the same (knownRoutes, copiedAssetPaths, MapGet) triple from the content surface. Artifact-tier URLs are folded in one of two ways, selected by enumerateArtifactRoutes: false (request path): only the cheap, options-derived Claims are folded — a link into a claimed territory is trusted. Artifact discovery fans out through the site projection, which must never run on the request path (see ISiteProjection).true (build mode): exact artifact routes are enumerated into the known set and no claims are folded, so a typo inside a claimed territory is still flagged.
public class LinkVerificationServiceBuilder
{
/// Builds a verifier from the content services, artifact services, endpoint table, and output options. Pass enumerateArtifactRoutes=true only from build-mode callers. Pass webRootFileProvider (the host's WebRootFileProvider) so wwwroot/RCL assets — copied by the build but owned by no content service — are treated as known assets.
public static Task<LinkVerificationService> BuildAsync(IEnumerable<IContentService> contentServices, IEnumerable<IArtifactContentService> artifactServices, EndpointDataSource endpointDataSource, OutputOptions outputOptions, bool enumerateArtifactRoutes, IFileProvider webRootFileProvider = null, CancellationToken cancellationToken = default)
;
}