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
contentServicesIEnumerable<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
changeFileChangeNotification
Returns
FileWatchResponseResolveAsync
#public Task<CrossReference> ResolveAsync(string uid)
Returns the CrossReference for uid, or null when not found.
Parameters
uidstring
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)
;
}