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 under /_llms/. 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

DispatchingContentParser Pennington.Pipeline

The single IContentParser the pipeline resolves: routes each discovered item to the parser registered for its format (see ContentFormatRegistry) and stamps the resolved format onto the returned ParsedItem so DispatchingContentRenderer can dispatch on it.

Constructors

DispatchingContentParser

#
public DispatchingContentParser(ContentFormatRegistry registry, IServiceProvider services)

Creates the dispatcher from the format registry and the service provider it resolves parsers from.

Parameters

registry ContentFormatRegistry
services IServiceProvider

Methods

ParseAsync

#
public Task<ContentItem> ParseAsync(DiscoveredItem item)

Parse a discovered item. Returns ParsedItem on success, FailedItem on failure.

Parameters

item DiscoveredItem

Returns

Task<ContentItem>

Pennington.Pipeline.DispatchingContentParser

namespace Pennington.Pipeline;

/// The single IContentParser the pipeline resolves: routes each discovered item to the parser registered for its format (see ContentFormatRegistry) and stamps the resolved format onto the returned ParsedItem so DispatchingContentRenderer can dispatch on it.
public class DispatchingContentParser
{
    /// Creates the dispatcher from the format registry and the service provider it resolves parsers from.
    
public DispatchingContentParser(ContentFormatRegistry registry, IServiceProvider services)
; /// Parse a discovered item. Returns ParsedItem on success, FailedItem on failure.
public Task<ContentItem> ParseAsync(DiscoveredItem item)
; }