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
registryContentFormatRegistryservicesIServiceProvider
Methods
ParseAsync
#public Task<ContentItem> ParseAsync(DiscoveredItem item)
Parse a discovered item. Returns ParsedItem on success, FailedItem on failure.
Parameters
itemDiscoveredItem
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)
;
}