This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy at the same URL with .md appended. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

XrefResolver Pennington.Infrastructure

Resolves cross-reference UIDs to URLs and titles. Builds a case-insensitive lookup from all registered content services on first use. When managed by FileWatchDependencyFactory, the instance is recreated on file changes, ensuring fresh data from content services.

Constructors

XrefResolver

#
public XrefResolver(IEnumerable<IContentService> contentServices)

Initializes the resolver and prepares lazy aggregation of UID entries across content services.

Parameters

contentServices IEnumerable<IContentService>

Methods

OnFileChanged

#
public FileWatchResponse OnFileChanged(FileChangeNotification change)

Called on the file-watcher thread for every watched change. Must be quick and thread-safe.

Parameters

change FileChangeNotification

Returns

FileWatchResponse

ResolveAsync

#
public Task<CrossReference> ResolveAsync(string uid)

Returns the CrossReference for uid, or null when not found.

Parameters

uid string

Returns

Task<CrossReference>

Pennington.Infrastructure.XrefResolver

namespace Pennington.Infrastructure;

/// Resolves cross-reference UIDs to URLs and titles. Builds a case-insensitive lookup from all registered content services on first use. When managed by FileWatchDependencyFactory, the instance is recreated on file changes, ensuring fresh data from content services.
public class XrefResolver
{
    /// Called on the file-watcher thread for every watched change. Must be quick and thread-safe.
    
public FileWatchResponse OnFileChanged(FileChangeNotification change)
; /// Returns the CrossReference for uid, or null when not found.
public Task<CrossReference> ResolveAsync(string uid)
; /// Initializes the resolver and prepares lazy aggregation of UID entries across content services.
public XrefResolver(IEnumerable<IContentService> contentServices)
; }